>Hi.
>I have following commands:
>strConn = "Driver=SQL Server;Server=GERARDXP\SQLEXPRESS;" +;
> "Database=C:\MYFOLDER\MYDATABASE.MDF;Trusted_connection=yes"
>lnHandle = SQLSTRINGCONNECT(strConn)
>
>I get a -1 returned in lnHandle , but I can browse the table fine in SQL management Studio.
>
>Anybody any idea of whats wrong?
>Regards,
>Gerard
Gerard,
If you'd 'attach' then use AttachDbFilename attribute. ie:
strConn = "Driver={SQL Native Client};Server=.\SQLEXPRESS;" +;
"AttachDbFileName=C:\MYFOLDER\MYDATABASE.MDF;Trusted_connection=yes"+;
"Database=yourdatabasenamehere"
Cetin