Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connect to sqlserver in a foxisapi server
Message
From
11/10/2005 02:01:51
 
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01057566
Message ID:
01057856
Views:
9
This message has been marked as the solution to the initial question of the thread.
>Hi
>I want to connect with this line of code
>handle=SQLSTRINGCONNECT('dsn=rbhoo;uid=rbhoo;pwd=rbhoo')
>it works great when i exam it in prg but when i compile it to exe and hit the adress it retyrn a 0< value
>why?

If using ODBC you first have to create a system DSN and give SQL access to IUSR_Computername. The reason it works for you in the prg is that you are logged in as yourself, but the web user is logged in under a different id with different access - usually IUSR_Computername.

The solution is to create a System DSN and give IUSR_ access.

The other solution is to use SQLSTRINGCONNECT as you have done and pass in a userid and password. Since this Uid has access it works.
Previous
Reply
Map
View

Click here to load this message in the networking platform