Related Information Examples & Tutorials
Membership with Collect! provides value in software upgrades, discount pricing for additional seats, modules and technical service, downloadable extras and full access to all the Member Center resources.
“ Collect! works flawlessly and is extremely fast and easy to use; even running on a Celeron until our new server arrives. ” Thomas B.

Insert Records With SQL

With Collect!, you have the ability 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, and is not limited to Clients, Debtors, Contacts, Transactions, Attachments, and Cosigners. All record types contained in the databases (i.e. 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" databases. See the 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, your results may display gibberish data rather than the expected values.

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

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" is located by the menu path \System\ Network and Environment\Launch the CV11 Admin Tool. Once the Admin Tool is launched, you click on RDS and log in with your administrator credentials. The SQL Browser is the last option in the visual icons to choose from in the icon hierarchy which will open under the RDS blue catalog of icon options. This browser can be used for testing your SQL inserts and updates. See the Help topic, CV11 Admin Tool for more info on this subject.

tip.gif You must end your queries with a commit; command to finalize the insertion of your record into a 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 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!.

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 page.

Please click this link to send us your comments: helpinfo@collect.org

Collection Advisor
HIPAA One® Certified Seal
ACA Member DBA RMA