Build DSN-less connection

If you are familiar with writing DSN syntax you may check option ‘Build Connection String (DSN-less)’ to manually set up connection.
 
At the end of this guide, there are examples of DSN connections for some commonly used databases.
 
Activate CPS Plus ODBC Connection Wizard, select “Build Connection String (DSN-less)” and from the drop down list, select one of available ODBC drivers and click Next >>

collect RS232 data into database - build dsnless connection

Image: CPS Plus - ODBC Connection Wizard

Add all informations required for establishing DSN-Less ODBC  connection and click Test Connection.

Notice: most of DSN connection descriptors should end with semicolon (;)

 
If the connection is successful, you will see appropriate message. If not, alter the connection string and try again.
After successful connection, click Next >>
 
At next step, you should enter table name and the name of the columns in which the data will be inserted. The way how CPS will separate the data and in which columns data will be placed, is defined by data field separator value.

collect RS232 data into database - table setup

 
Enter the table name into 'TABLE_NAME' field and enter the column names into 'FIELD NAMES' field.
 
CPS DATA FIELD SEPARATOR field defines how CPS will split the data. In example shown in picture above we have used pound key (#) as a Data Field Separator, and first second and fifth part of separated string (FIELD1,FIELD2,FIELD3).
 
Placeholder variable FIELD0 holds complete read string. CPS will write value into this variable even if CPS FIELD SEPARATOR is not set.

 

 
 

collect RS232 data into database - SQL Setup

In example in picture above we have entered table name (BARCODES) and columns' names (COMDATA and COMPORT).

You can also change the SQL statement directly in SQL text box.
 
After you are done, click Next >>
 
CPS Plus will offer you to check if table you have entered exists.
verify table barcodes
 
 
Acknowledge connection details and click on Finish to activate connection.
 
Send barcodes to MS access
CPS Plus will activate connection and during first data read it will construct SQL insertion statement, which will be executed on the defined database.
 
Note: CPS Plus will save username/password, required to connect to database,
in its internal properties file. This file may be fairly easily read so it is 
recommended that user using this ODBC connection, have limited privileges! 
For example, only write privilege for table used in this connection.