Visual Basic, ODBC drivers, and Informix
Posted in 1995
I am currently working on a Window's based application that using Visual Basic 3.0. The backend is Informix Online 5.01 and we are using version 2.0 ODBC drivers from Intersolv (better known as Q+E). The problem I am having is updating or inserting records in a Dynaset. The database has been opened for read/write access (I have even check the Updatable property and it is true). I create the dynaset with the code below: Set f_dsAddCriteria = g_dbNSCrit.CreateDynaset(sQrySel_CopyCriteria(v_lCriteriaID), DB_SQLPASSTHROUGH) The function sQrySel_CopyCriteria just returns the SQL for the dynaset as a string. I can then move through the records without any problem using the MoveFirst and MoveNext methods, but when I use the AddNew method I get the error message below: "Can't perform operation; it is illegal." When I check the Updatable property for the dynaset is returns false. I do not understand why the dynaset is not updatable. I have granted read/write permission to all of the tables in this database to Public. I have also tested my logic against an Access 2.0 database that mirrors the Informix database and it works fine. I also tried creating the dynaset with and without the SQL Passthrough option. Could it possibly be that the ODBC driver does not support these methods? If so how have others who are using VB and Informix handling updates to the database? Any input would be greatly appreciated Thanks Scott +--------------------------------------+---------------------------------------+ |Scott Allred INTERNET: scott.allred@nsc.sprint.com | |Sprint/North Supply Tel : (913) 791-7000 | |600 Industrial Pkwy. FAX : (913) 791-7671 | |Industrial Airport, KS 66031 | |USA | +--------------------------------------+---------------------------------------+