After a number of unsuccessful tries, I could finally install SQLServer 
Express 2008 in my VISTA Home Premium notebook.

I created a database called test and one simple table called customers with 
one pk field and two regular fields, firstname and lastname.

I also created an ODBC connection called myconnection.dsn with the following 
script (just used notepad to read the file)

*!* [ODBC]
*!* DRIVER=SQL Server
*!* UID=marcelo
*!* WSID=RAFAEL
*!* APP=Microsoft® Windows® Operating System
*!* Trusted_Connection=Yes
*!* SERVER=RAFAEL\SQLEXPRESS

I tested the connection and got the successful connection message. BTW, I 
use windows authentication, no password at all.

I want to run this program from VFP9

cConnString ='dsn=c:\users\marcelo\documents\myconnection;uid=marcelo'

cSQLCmd = "select * from customers"

 nHandle = SQLSTRINGCONNECT (cConnString)



SQLEXEC (nHandle, cSQLCMD, 'curCustomers' )


 SQLDISCONNECT (nHandle)

select curCustomers
browse


My problem is that I can't get the connection string right and of course, I 
get an error (the program checks for the handle number and if it is 
negative, returns an error message. Omitted here for clarity)

Could you guys please tell me how to write the connection string?

TIA

Rafael Copquin



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/985f0a4b9bb14673be323577c8391...@rafael
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to