Conect to Acces

forum.centura.team.developer (2000-2005) & forum.sqlwindows (2000-2005)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Conect to Acces

Post by NewsgroupServer » 28 Mar 2005, 14:46

 Posted by:  // Matias Gaston Querel // 

Hi CAn someone tell me the step to connect to a acces db from CEntura...
thanks...

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Conect to Acces

Post by NewsgroupServer » 28 Mar 2005, 21:44

 Posted by:  Raúl Andrés Duque M. 

Matias:

You can use OLEDB:

1. Create a DSN source to your Access database. For example "customer".
2. Add this variables to your application (maybe global):
String: strConexion
Session Handle: sDB
Sql Handle: hSql
3. Add this code to your application:
Set strConexion = "Provider=MSDASQL; Data Source=customer"
Call SqlCreateSession (sDB, strConexion)
Call SqlCreateStatement (sDB, hSql)
4. You can use the hSql as a ordinary Sql Handle.
5. Close your session with:
Call SqlFreeSession (sDB)

Raul Duque
Bogotá, Colombia

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests