Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Created SQL stored procedures from VFP
Message
From
12/06/2006 11:47:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Created SQL stored procedures from VFP
Miscellaneous
Thread ID:
01128458
Message ID:
01128458
Views:
66
Hi All,

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.
Next
Reply
Map
View

Click here to load this message in the networking platform