Home   Contents   Index   Member Center   Download   Collect! Users   Help 
Collect! logo
Collect! logo
 
Collect.org

Collect! Credit and Collection Software™

  Related Information Examples & Tutorials

Insert Records With SQL

Collect! enables you to insert records into your database from an external application with an ODBC connection. Records from any Collect! SQL record type may be added. This includes Clients, Debtors, Contacts, Transactions, Attachments, Cosigners and more. Basically, all record types contained in the "collect" databases (d00_collect, d01_collect, d02_collect) may be inserted from external queries.

tip.gif You can use the CV11 Admin Tool to view the complete list of SQL record types in the "collect" database. Please refer to Help topic, CV11 Admin Tool for details.

Inserting records into Collect! with ODBC and SQL is available in Collect! Version 11.4.1.1 and newer.

SQL Insert

You can create new records in Collect! using ODBC and SQL. Collect! creates a unique identifier whenever a record is created. This ensures the integrity of your database. The result is the same as if you entered the record manually or through an import routine.

One important difference is that when you insert a record through ODBC and SQL, all numeric fields in the new record must be properly initialized by your SQL query. If you do not initialize the fields, several fields in your new record may display "garbage" data.

tip.gif SQL templates for each record are available for download in the Collect! Member Center Widgets area. You can use these as examples for creating properly initialized field data for each record type.

Download SQL Templates for SQL Insert

Top of page.

SQL Update

You can update records in Collect! using ODBC and SQL. For updated records, you only need to update the fields you want to change.

Top of page.

Testing SQL Queries

The CV11 Admin Tool SQL Browser can be used for testing your SQL inserts and updates. Please refer to Help topic, CV11 Admin Tool for details.

tip.gif You must end your queries with a commit; command to finalize the insertion of your record into the Collect! database.

Top of page.

ODBC Writing To Notes

When writing to Notes using SQL, you may encounter an Error 22001 - File too big.

Changing the value of MAXSTRING in the catalog\rdmserver.ini in the "SQL PARAMETERS" section should correct this.

[SQL]
MaxString=256
;
; Specifies the maximum length of a string literal.

Set this to:

MaxString=256000

This would accommodate writing approximately 4000 lines of Debtor Notes to a single account.

Top of page.

Summary

The CV11 Server engine available in Collect! Version 11.4.1.1 and newer enables you to insert records into your database through ODBC and SQL. Records from any SQL record type may be added. This includes Clients, Debtors, Contacts, Transactions, Attachments, Cosigners and more. You can use the CV11 Admin Tool to view the complete list of SQL record types in the "collect" database.

You must construct your SQL queries to properly initialize all numeric fields in each record so that they are not filled with random digits when a new record is inserted into Collect!.

tip.gif Several templates are available for download from the Collect! Member Center Widgets area.

Top of page.

See Also

- ODBC Topics

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this help page.

Please click this link to send us your comments: helpinfo@collect.org
© 2012 Comtech Systems Inc. * Email: info@collect.org * Web: www.collect.org * Voice: 1-800-661-6722, 250-391-0466