I would greatly appreciate a sample of the syntax required to connect
from VFP 6 to a SQL server - either one on my own machine or one that
resides on another machine that I can access by IP address.

TIA.

-S-

Re: Connect to SQL server by Rick

Rick
Mon Jan 10 13:12:58 CST 2005

Steve,
lnHandle =3D sqlstringconnect('driver=3DSQL =
Server;server=3D192.168.100.41;database=3Dnorthwind;uid=3Dsa;pwd=3D')
sqlexec(lnHandle, 'select * from orders')

* <your code>

sqldisconnect(lnHandle)

Rick

"Steve Freides" <steve@fridayscomputer.com> wrote in message =
news:34fpcrF4b1aveU1@individual.net...
>I would greatly appreciate a sample of the syntax required to connect=20
> from VFP 6 to a SQL server - either one on my own machine or one that=20
> resides on another machine that I can access by IP address.
>=20
> TIA.
>=20
> -S-=20
>=20
>

Re: Connect to SQL server by Steve

Steve
Mon Jan 10 14:04:54 CST 2005

Excellent - that should do what we need. Many thanks.

-S-

"Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
news:OtaJmh09EHA.3592@TK2MSFTNGP09.phx.gbl...
Steve,
lnHandle = sqlstringconnect('driver=SQL
Server;server=192.168.100.41;database=northwind;uid=sa;pwd=')
sqlexec(lnHandle, 'select * from orders')

* <your code>

sqldisconnect(lnHandle)

Rick

"Steve Freides" <steve@fridayscomputer.com> wrote in message
news:34fpcrF4b1aveU1@individual.net...
>I would greatly appreciate a sample of the syntax required to connect
> from VFP 6 to a SQL server - either one on my own machine or one that
> resides on another machine that I can access by IP address.
>
> TIA.
>
> -S-
>
>



Re: Connect to SQL server by David

David
Mon Jan 10 19:13:16 CST 2005

Seve,

excepting that you probably don't wand the sa login to actually be
passwordless *s*

gnSQLConnection = SQLSTRINGCONNECT( "driver={SQL
Server};server=(local);database=test;trusted_connection=yes;" )

will talk to the local instance of SQL. Or put your other machine name/ip in

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"Steve Freides" <steve@fridayscomputer.com> wrote in message
news:34g5f9F47q93cU1@individual.net...
> Excellent - that should do what we need. Many thanks.
>
> -S-
>
> "Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
> news:OtaJmh09EHA.3592@TK2MSFTNGP09.phx.gbl...
> Steve,
> lnHandle = sqlstringconnect('driver=SQL
> Server;server=192.168.100.41;database=northwind;uid=sa;pwd=')
> sqlexec(lnHandle, 'select * from orders')
>
> * <your code>
>
> sqldisconnect(lnHandle)



Re: Connect to SQL server by Rick

Rick
Tue Jan 11 13:23:15 CST 2005

David,
I just took those statements from some sample code that Doug H. supplied =
at the last DevCon. Are you suggesting that that's "bad form"? <vbg>

Rick

"David Frankenbach" <sendnospam@sendnospam.net> wrote in message =
news:ONVR8q39EHA.1264@TK2MSFTNGP12.phx.gbl...
> Seve,
>=20
> excepting that you probably don't wand the sa login to actually be=20
> passwordless *s*
>=20
> gnSQLConnection =3D SQLSTRINGCONNECT( "driver=3D{SQL=20
> Server};server=3D(local);database=3Dtest;trusted_connection=3Dyes;" )
>=20
> will talk to the local instance of SQL. Or put your other machine =
name/ip in
>=20
> --=20
> df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
>=20
> "Steve Freides" <steve@fridayscomputer.com> wrote in message=20
> news:34g5f9F47q93cU1@individual.net...
>> Excellent - that should do what we need. Many thanks.
>>
>> -S-
>>
>> "Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message=20
>> news:OtaJmh09EHA.3592@TK2MSFTNGP09.phx.gbl...
>> Steve,
>> lnHandle =3D sqlstringconnect('driver=3DSQL=20
>> Server;server=3D192.168.100.41;database=3Dnorthwind;uid=3Dsa;pwd=3D')
>> sqlexec(lnHandle, 'select * from orders')
>>
>> * <your code>
>>
>> sqldisconnect(lnHandle)
>=20
>

Re: Connect to SQL server by David

David
Tue Jan 11 22:55:00 CST 2005

hmmmmmmmm let me see what I can go find on Doug's server... *wg*

df

"Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
news:%23e$ZAMB%23EHA.2596@tk2msftngp13.phx.gbl...
David,
I just took those statements from some sample code that Doug H. supplied at
the last DevCon. Are you suggesting that that's "bad form"? <vbg>

Rick

"David Frankenbach" <sendnospam@sendnospam.net> wrote in message
news:ONVR8q39EHA.1264@TK2MSFTNGP12.phx.gbl...
> Seve,
>
> excepting that you probably don't wand the sa login to actually be
> passwordless *s*
>
> gnSQLConnection = SQLSTRINGCONNECT( "driver={SQL
> Server};server=(local);database=test;trusted_connection=yes;" )
>
> will talk to the local instance of SQL. Or put your other machine name/ip
> in
>
> --
> df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
>
> "Steve Freides" <steve@fridayscomputer.com> wrote in message
> news:34g5f9F47q93cU1@individual.net...
>> Excellent - that should do what we need. Many thanks.
>>
>> -S-
>>
>> "Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
>> news:OtaJmh09EHA.3592@TK2MSFTNGP09.phx.gbl...
>> Steve,
>> lnHandle = sqlstringconnect('driver=SQL
>> Server;server=192.168.100.41;database=northwind;uid=sa;pwd=')
>> sqlexec(lnHandle, 'select * from orders')
>>
>> * <your code>
>>
>> sqldisconnect(lnHandle)
>
>