Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending data to SQL Server 7.0
Message
From
14/07/2002 14:42:56
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00678420
Message ID:
00678511
Views:
12
Hello Sergey,

That worked great, of course, thank you!

Two questions:

? SqlExec(lnConn, [EXEC proc_test ?ldDt, ?lnInt])

apparently the ldDT and lnInt need the ? Tried running it without. What do the question marks do??

Modified the sproc to insert the values into a test table

CREATE PROCEDURE proc_test
@p1 datetime, @p2 int = 0
AS
INSERT INTO test
VALUES( @p2,@p1)

This worked fine, except when I ran the foxpro code several times the remote view to this table did not show the updates until I quit foxpro and reopened foxpro. Why doesn't the remote view refresh itself?

Thanks Again
Jim


>>Hello Group,
>>
>>If I want to send a date or a numeric data to a SQL stored procedure do I send it as a date or numeric or do I need to send it as a text type.
>>
>
>It depends on how you call SP. Assuming that you're using ODBC connection.
CREATE PROCEDURE proc_test
>	@p1 datetime, @p2 int = 0
>AS
>	SELECT @p1, @p2
>
>...
>ldDt = DATE()
>lnInt = 5
>* You can call it using parameters
>? SqlExec(lnConn, [EXEC proc_test ?ldDt, ?lnInt])
>* Or build a string
>? SqlExec(lnConn, [EXEC proc_test '] + DTOC(ldDt,1) + [', ] + TRANSFORM(lnInt))
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform