Conect to Acces

forum.centura.team.developer (1998-2005) & forum.sqlwindows (2000-2005)
Matias Gaston Querel

Conect to Acces

Post by Matias Gaston Querel » 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...

Raúl Andrés Duque M.

Re: Conect to Acces

Post by Raúl Andrés Duque M. » 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] and 5 guests