Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection String
Message
From
04/05/2006 09:38:37
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01119086
Message ID:
01119131
Views:
18
Thanks Borislav,

that code works here too, which means that there is some problem with the way I am applying it in my application.

FWIW, I had created a new connection in my database and selected the file dsn that I created and got the string off that, then created a remote view using that connection and it worked.

So both things point to some problem in the code.

Thanks for your time.

>Strange, It works for me here:
>
>lnSqlH = SQLSTRINGCONNECT([Driver={SQL Native Client};Server=SAMAAN3\SQLEXPRESS;Database=mist2006;Trusted_Connection=yes;])
>IF lnSqlH < 0
>   AERROR(laError)
>   MessageBox(laError[1,2])
>ELSE
>   MessageBox([Success])
>ENDIF
>
>
>
>>Sorry, that didn't work either.
>>
>>Just to make sure it's not my code causing the problem, do you have a simple sample that I could run from the command window?
>>
>>
>>>Try:
>>>[Driver={SQL Native Client};Server=SAMAAN3\SQLEXPRESS;Database=mist2006;Trusted_Connection=yes;]
>>>
>>>
>>>
>>>>Hi Borislav,
>>>>
>>>>unfortunately that hasn't worked either. :(
>>>>
>>>>>Try:
>>>>>[DRIVER=SQL Native Client;SERVER=SAMAAN3\SQLEXPRESS;DATABASE=mist2006;WSID=SAMAAN3;APP=Your APP Name Here;Trusted_Connection=Yes;]
>>>>>
>>>>>>Hi,
>>>>>>I'm having trouble getting a connection to a SQL Server database. The connection string I am trying is:
>>>>>>
>>>>>>DRIVER=SQL Native Client;SERVER=SAMAAN3\SQLEXPRESS;UID=frank;DATABASE=mist2006;WSID=SAMAAN3;APP=Microsoft Data Access Components;Trusted_Connection=Yes;
>>>>>>
>>>>>>This gives me an "Unable to connect to the server using the specified connection" error.
>>>>>>
>>>>>>I created a File DSN and tested it using the Data Sources (ODBC) applet and that gave me this :
>>>>>>
>>>>>>[ODBC]
>>>>>>DRIVER=SQL Native Client
>>>>>>UID=frank
>>>>>>DATABASE=mist2006
>>>>>>WSID=SAMAAN3
>>>>>>APP=Microsoft Data Access Components
>>>>>>Trusted_Connection=Yes
>>>>>>SERVER=SAMAAN3\SQLEXPRESS
>>>>>>Description=MIST 2006
>>>>>>
>>>>>>Does anyone have any idea what I have done wrong?
>>>>>>
>>>>>>Thanks,
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform