Page 1 of 1
how to connect to sql express 2005/2018/2014 ?
Posted: Thu Dec 08, 2016 10:39 am
by sartic
please post example. thx
Re: how to connect to sql express 2005/2018/2014 ?
Posted: Thu Dec 08, 2016 11:28 am
by bbanelli
sartic wrote:please post example. thx
If you don't have one, install Microsoft ODBC driver.
https://www.microsoft.com/en-us/downloa ... x?id=53339
After that, create a User DSN via Control Panel's Administrative Tool Data Sources (ODBC) (or you can even do it directly via PB, see
this great example) and simply use PB's database ODBC instructions from documentation.
Code: Select all
UseODBCDatabase()
;Makeconnection("ODBC Driver 13 for SQL Server", "Dsn=myDSNName;Server=tcp:myAzureName.database.windows.net,1433;Database=myDbNAME;Encrypt=yes;TrustServerCertificate=no;") ;Optional
Define.s dbName = "myDSNName", dbUser = "yourDBName", dbPass = "yourDBPass"
Define.i dbHandle
dbHandle = OpenDatabase(#PB_Any, dbName, dbUser, dbPass, #PB_Database_ODBC)
If dbHandle
;Do your SQL stuff as you normaly would...
EndIf
Re: how to connect to sql express 2005/2018/2014 ?
Posted: Thu Dec 08, 2016 11:49 pm
by swan
Is the database local or remote ?
Re: how to connect to sql express 2005/2018/2014 ?
Posted: Fri Dec 09, 2016 5:29 pm
by sartic
it is local.i will explore it this weekend if i solve problem with crush in closewindow()
Re: how to connect to sql express 2005/2018/2014 ?
Posted: Fri Dec 09, 2016 6:18 pm
by TI-994A
sartic wrote:please post example...
Perhaps this little tutorial might help:
>
A Simple ODBC Primer