PC Review


Reply
Thread Tools Rate Thread

Bug with ADO ??

 
 
Kwong
Guest
Posts: n/a
 
      7th Dec 2003
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!!!
 
Reply With Quote
 
 
 
 
Jan Tielens
Guest
Posts: n/a
 
      7th Dec 2003
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!!!



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      7th Dec 2003
* "Kwong" <(E-Mail Removed)> scripsit:
> I am using VB6 to create a DataEnvironment object
> and setup a connection to a database(Access 2K).


This is a VB.NET language group. Please turn to one of the
microsoft.public.vb.database[.*] groups.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:43 PM.