Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Created SQL stored procedures from VFP
Message
 
 
To
12/06/2006 11:47:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01128458
Message ID:
01128467
Views:
19
Yes, you can do it with sqlexec().

> I did a search on stored procedures, but did not find anything on how to write stored procedures to SQL Server. Can someone give me a sample of have it would be done. I am looking for more then a one liner stored procedure.
>
>This is what I think it should be, and have not tried it yet;
>
>
>TEXT TO lcSqlStr TEXTMERGE NOSHOW
>create procedure EventList_Insert
>(
>    @Code varchar (16),
>    @ShortDesc varchar (20),
>    @Description varchar (50),
>    @IsInternal int,
>    @IsTicketLastUpdated int
>)
>AS
>
>SET NOCOUNT ON
>
>INSERT INTO EventList
>(
>    Code,
>    ShortDesc,
>    Description,
>    IsInternal,
>    IsTicketLastUpdated
>)
>VALUES
>(
>    @Code,
>    @ShortDesc,
>    @Description,
>    @IsInternal,
>    @IsTicketLastUpdated
>)
>ENDTEXT
>
>lnReturn = sqlexec(ghConnectionHandle, lcSqlStr)
>
>
>Thanks In advance.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform