Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : How do I build a connection string using FlexODBC?Search Forum

Forum Home > FlexODBC - ODBC Driver for DataFlex Embedded DBMS > FlexODBC Frequently Asked Questions

 New Topic 
 
 Post Reply 
 How do I build a connection string using FlexODBC? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-13 14:11:25

Connection String
The most difficult part of using FlexODBC in programming is the connection string. The simplest form includes a reference to a DSN. A DSN called "DataFlex Test32" is automatically created when FlexODBC is installed. "DataFlex Test32" will be used in all examples but can be substituted with any different DSN name you create.
 
Normally ADO pools connections. FlexODBC does not support connection pooling. It is recommended to tell ADO to not do connection pooling on any FlexODBC connection. This is done with OLE DB Services=-2.

Example of simple DSN:
    sConnectString = "DSN=DataFlex Test32;OLE DB Services=-2;"
 
Example of a DSNless connection string:
    sConnectString = "Driver={DataFlex Driver};DFQ=C:\PROGRA~1\FLEXOD~1\TestData;OLE DB Services=-2;"
 
Example using current ADO syntax:
    sConnectString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=DataFlex Test32;OLE DB Services=-2;"

Standard syntax:
"DRIVER={DataFlex Driver};SERVER=FlexODBC;DFQ=.;OLE DB Services=-2;

Where:
DFQ=
 (./[path to DataFlex .dat files]) where . means the current DFPath environment setting or the DOS path to the datafiles.
OLE DB Services=-2;

 

 

  Top 
 New Topic 
 
 Post Reply 

Jump to