Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConnect() not working from COM object
Message
 
 
To
29/08/2005 20:48:34
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01044667
Message ID:
01044994
Views:
12
The ASP doesn't run under your login but rather under IUSR_ or IWAM_ accounts. See http://west-wind.com/presentations/aspobjects/ASPObjects.htm for detailed explanation on how to run a VFP COM object from ASP.

>I am the user who created it! My connection to MSDE (does it make any difference that it is not SQL-Server?) is a trusted connection, so there is no userid or password involved.
>
>Some more info. that may be relevant - I am testing the ASP page using IIS on my own laptop before installing it on the webserver. The calling url is http://localhost/mypage.asp, and the page can be found, but is displaying the error returned by COMRETURNERROR.
>
>>You can create System DSN
>I deleted the user DSN and created a system DSN with the same name - no change.
>
>>but I would suggest to use DSN-less connections with SQLSTRINGCONNECT.
>Tried that, and the results are the same, ie. returns a +ve handle number when called from within VFP, but returns -1 when called from the ASP page via. a .dll COM object.
>
>The strings I have tried so far are...
> SQLCONNECT('MyODBCDataSource')
> SQLSTRINGCONNECT('Driver={SQL Server};Server=(local);Database=MyDatabase;')
> SQLSTRINGCONNECT('Driver={SQL Server};Server=(local);Database=MyDatabase;Trusted_Connection=yes')
>
>My ODBC datasource name has the same as the main database, would that have any bearing?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform