Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to Connect MSDE 2000
Message
From
11/11/2005 15:08:52
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01067794
Message ID:
01067892
Views:
15
i have rectified your below given code as there were some spelling mistakes but result it same i.e. it is not connecting to sql server.

now i have disabled mcafee firewall also, just in case if that is creating any problems but still result is same.


>OK.
>I accept that [Driver={SQL Server};Server=(vinodhome);Database=(vinod);UID=vinod;PWD=mypass;] is the right connection string:
>
>
>ConnStr = [Driver={SQL Server};Server=(vinodhome);Database=(vinod);UID=vinod;PWD=mypass;]
>lcSQLHandle = SQLStringConnect(ConnStr)
>IF lcSQLHandle < 0
>   AERROR(laError)
>   MESSAGEBOX("Can not coonect to SQL Server. Reason: "+TRANSOFRM(laError[1,1])+" "+laError[1,2])
>   RETURN
>ENDIF
>
>*** Get all Records from Table named zsample
>IF SQLEXEC(lcSQLHandle, [SELECT * FROM ZSample],"crsZSample") < 0
>   AERROR(laError)
>   SQLDISCONECT(lcSQLHandle
>   MESSAGEBOX("Can not execute SQL Statement. Reason: "+TRANSOFRM(laError[1,1])+" "+laError[1,2])
>   RETURN
>ENDIF
>
>SELECT crsZSample
>BROWSE NORMAL
>
>
>This is SQL PassThough method.
>I prefer to use Cursor Adapters to handle the date in SQL Server. But you must learn them yourself. I not say that you can't ask for help, but try to learn them and then ask. You have so ma many possibilities to manage the data with them, that I could not explain here (not so many English words in my vocabulary) :o)
Previous
Reply
Map
View

Click here to load this message in the networking platform