Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to open local SQL Server database
Message
De
16/01/2006 09:50:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/01/2006 03:05:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01087065
Message ID:
01087144
Vues:
12
Michel,
Include "driver=SQL server;" with SQLConnectstring and change true to yes (didn't try with true before maybe it'd work too).
In VS2005 it'd work as is because it uses SQL native client and doesn't need driver specified.
For SQL2005 you can also use (if ODBC driver is installed):
Driver = {SQL Native client}
lnHandle = SQLStringConnect('Driver=SQL server;'+;
 'Data Source = .\SQLEXPRESS;'+;
 'AttachDbFilename="D:\Visual Studio Projects\Test\Test.mdf";'+;
 'Integrated Security=SSPI;User Instance=yes')
Cetin


>I am trying to open a local SQL Server database. From the VS 2005 interface, the connection string gives this:
>
>
>Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Visual Studio Projects\Test\Test.mdf";Integrated Security=True;User Instance=True
>
>
>So, from VFP, I do this:
>
>
>lcSQLString=[Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Visual Studio Projects\Test\Test.mdf";Integrated Security=True;User Instance=True]
>lnSqlHandle = SQLSTRINGCONNECT(lcSQLString)
>
>
>But, as soon as I execute the SQLSTRINGCONNECT line, I have this Select Data Source window which is appearing. How can I succeed to open this connection?
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform