Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to open local SQL Server database
Message
De
16/01/2006 15:31:04
 
 
À
16/01/2006 13:18:58
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:
01087302
Vues:
11
>>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')
>>
>
>I think the problem relies with the server name. I put the computer name but this doesn't work.

Just a SWAG, but in the Data Source isn't the ".\" syntax referring to the local machine? Is the SQL server you're trying to attach to on the local machine, or a remote one? If remote you might need something like
Data Source=\\MachineName\InstanceName
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform