Kwong, I think you should post to the VB6 newsgroup. This one is the VB.NET
newsgroup.
--
Greetz,
Jan
__________________________________
Read my weblog:
http://weblogs.asp.net/jan
"Kwong" <(E-Mail Removed)> schreef in bericht
news:05a701c3bcd7$143da280$(E-Mail Removed)...
> Hi,
> I am using VB6 to create a DataEnvironment object
> and setup a connection to a database(Access 2K).
>
> The connection was setup using the data link properties
> of the connection and the connection is tested to be
> successful.
> Then I created a few unbound text boxes. When user clicked
> the Save button, this data will be added to an ado
> recordset and updated successfully.
>
> My problem is when I use the following statement to reset
> the connection string to the connection object(examConn)
> as below
>
> DataEnvironment1.ExamConn.ConnectionString = strConn
>
>
> then when user click the save button a run-time error 3251
> appear and the error statement is:
>
> Object or provider is not capable of performing requested
> operation.
>
> The connection string is the same connection string which
> I copy directly from the connection object property.
>
> I checked all my setting for the cursur location and lock
> type properties are set correctly.
> Why using the data link properties to set up the
> connection the recordset created by the command object can
> be updated correctly but on the other hand the same
> recordset and the same connection string set by programing
> method failed?
>
> Why this happen? Please help!!!