Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Error -2147217871 Using DBActivateMap in CVI

Primary Software: LabWindows/CVI Development Systems>>Full Development System
Primary Software Version: 6.0
Primary Software Fixed Version: N/A
Secondary Software: LabWindows/CVI Add-ons>>Enterprise Connectivity Toolset

Problem: I try to communicate with my SQL database using DBActivateMap, but I keep getting the error -2147217871 - The timeout expired. How do I fix this?

Solution: This error is caused by running out of time before the database returns a response. Sometimes it takes a while to receive a response because of the large size of a database.  Because the error is an error generated by the database provider and not necessarily CVI, this is more of a provider (ole db or odbc) issue.  However, we do have a way to remedy this. By default, the Command Timeout is set to 30 seconds. You can change this property to zero (0), and make it wait indefinitely.  To do this, use the DBSetConnectionAttribute function and select ATTR_DB_CONN_COMMAND_TIMEOUT for your attribute. Set the value to zero.

Related Links:

Attachments:





Report Date: 10/01/2004
Last Updated: 10/07/2004
Document ID: 3E0IDD29

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit