Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing SQL Stored Procedure over dialup connection
Message
From
17/10/1998 23:57:32
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00147807
Message ID:
00147896
Views:
41
>Here's the code I'm using:
>
>nconn=sqlconn('odbcName')
>? SQLexec(nconn, 's_get_tpv')
>
>nconn is 1
>I know that s_get_tpv is the name of the stored procedure. I even tried it in VB 5.0 with a User Connection and it recognizes the stored procudure. However, when I execute the SQLexec statement, it consistantly returns a -1. Is there something specific to the syntax in SQL 6.5 that I'm missing in calling a stored procedure? Also, there are 2 parameters that I need to pass to the procedure. Any help would be appreciated!
>
>Tom
>
>
>>Hi John
>>
>>Thanks!
>>
>>>Hi Tom ---
>>>
>>>You're going to want to use SQL passthrough techniques such as:
>>>
>>>nConn=SQLCONNECT('DataSourceName') && DataaSourceName given the ODBC driver
>>>=SQLEXEC(nConn,'sp_MyStoredProc')
>>>
>>>>I have established an ODBC connection to a SQL 6.5 Server over a dialup connection. I need to call two stored procedures in the SQL Database. I haven't been able to figure out how.
>>>>


lcProcedure = "Exec SP_ProcedureName ?Parameter1, ?Parameter2"
lnResult = sqlexec(nSqlHandle, lcProcedure, "MyCursor")
System Analyst
Nabil B. Ghrayyeb
nabilg@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform