Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Derrick Bruce
  Where is Derrick Bruce?
 Charlestown
 Indiana - United States
 Derrick Bruce
 To: Rajneesh Talwar
  Where is Rajneesh Talwar?
 New Delhi
 India
 Rajneesh Talwar
 Tags
Subject: RE: ODBC connection run through RDP
Thread ID: 228770 Message ID: 228789 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: ODBC, ADO and OLEDB
Date: Thursday, May 21, 2009 4:20:34 PM         
   


> Dear Expert,
>
> I Need your HELP .....
>
>
> Sir, I have a server2003 running with SQL2005 i have made one application which is run with this very fine all the database connection ODBC connection are run very smoothly..
>
> I AM USING THIS CONNECTION COMMAND:
> ---------------------------------------------------------------------
> Store SQLConnect('itdlimagetec', 'sa','') To gnConnHandle
> If gnConnHandle <= 0
> = Messagebox('Cannot make connection with Server Check Server status...',16,'Message From Rajneesh.')
> quit
> Else
> Wait Wind "Server connection made..." nowait
> Endif
> ---------------------------------------------------------------------
>
> Now i have to connect this application throug RDP terminal server but always shows
> the 'Cannot make connection with Server Check Server status...'
> But at server site everything is running perfectly...
> I have created RDP user via "start>>Run>>mstsc " command
> and here i give the administrator right to this rdp user and in environment i have given my particular directory name and application name.
>
> KINDLY Tell me the where I am wrong.
>
>
> Raj...
> rajneesh2350@yahoo.co.in
> rajneesh2350@gmail.com
> M-999-999-3560 (India)


Where ever the application is being launched from needs to have the ODBC connection with the name in your connection ('itdlimagetec') as a system DSN or similar set up.

Easier way is to embed the connection in the application so you don't have to worry about setting the ODBC up on all the computers you may want to run it on.

PUBLIC loconnectstring
PUBLIC gnhandle
loconnectstring = "DRIVER=SQL Server;SERVER=192.168.1.xxx;UID=xxxxx;PWD=xxxxx;DATABASE=xxx;Network=DBMSSOCN"
gnhandle = SQLSTRINGCONNECT (loconnectstring, .t.)


I've found using RDP it better to use the IP address of the server rather than the name. To build the string, just build a connection in P21 and then copy the connection string it comes up with.

D

ENTIRE THREAD

ODBC connection run through RDP Posted by Rajneesh Talwar @ 5/21/2009 1:58:11 PM
RE: ODBC connection run through RDP Posted by Derrick Bruce @ 5/21/2009 4:20:34 PM