Quote:
>I am doing some very simple experimentation with VB (pro) and
>ODBC to talk to an Ingres database.
>The Ingres database lives on a SunOS 4.1.3 system with Ingres/Net
>installed.
>The client side is Windows for Workgroups 3.11, with Ingres/Net
>and the Ingres ODBC driver installed. I threw together a VB
>app that should dislpay the database and allow me to add records.
>The app is just one form with a single data control which points
>to the ODBC driver and a few text boxes which are bound to this
>data control. The display works fine.
>When I try to add a new record to the record set with the
> Data1.Recordset.AddNew
>statement, I get an error 3219 "Can't perform operation;
>it is illegal."
>Any ideas?
Did you use DB_SQLPASSTHROUGH or any other SQL passthrough setting to
allow yourself to use Ingres SQL rather than the JET engine's SQL?
If so, any dynasets you create will be read-only, just like a snapshot.
If you are using no SQL or JET SQL, then I'd check the configuration of
the ODBC driver itself to see if there is a setting which causes it
to return read-only datasets (probably as a speed enhancement).
In my experience with using ODBC drivers from VB, I have found it best
to use DB_SQLPASSTHROUGH, generate snapshots at all times and then to
use the ExecuteSQL statement to do UPDATE or INSERT INTO statements when
editing the data.
This will typically result in a nice performance gain at the cost of not
being able to use the data control to its fullest potential. Then again,
I personally find that the data control's overhead is far too high for
most applications and so I don't use it anyway... :-)
--
Rocky Lhotka