SQL Server 6.5 + ADO problem... 
Author Message
 SQL Server 6.5 + ADO problem...

Hi,

The Source property return something like (not exactly) "Ole db provider for
SQL Server".
Actually, I've add a watch to the Errors collection, and examine all the
properties, but found nothing related to error source (i.e. field name), so
any better method?

Regards,
Ming


Quote:


> > Hi,

> > I'm using SQL Server 6.5 and VB+ADO for writing simple application. My
> table
> > has two field with CHECK and RULE binded:
> ...

> > When I use VB to add save a new record, with both field entering invalid
> > value, the state rule fires first. I've check the connection object's
> Errors
> > collection, and found the correct error message indicating which field
was
> > the error source.

> > "A column insert or update conflicts with a rule imposed by a previous
> > CREATE RULE command. The command was aborted. The conflict occurred in
> > database 'pubs', table 'testing', column 'state' "

> > My problem is: The only way I can found to handle this error is to check
> the
> > message to locate the field with error, in this case, 'state'. This is a
> > test application only, in real world application, there are probably
more
> > fields to handle, so I need to have an array of fields and scan each
> against
> > the message to find the error source? or I need to check the message to
> look
> > for specific keyword to locate the error field ("in database 'xxxx'")?
> > What will happen if this message change in later implementation? Any
> object
> > will have a specific property storing the error source (database, table,
> > field, etc)?
> ...

> Lots of questions, not sure of all the answers.  First, have you checked
the
> Source property on the ADO Errors object?  Does it perhaps give you the
> tablename or fieldname?



Mon, 31 Mar 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB5, ADO 1.5, SQL Server 6.5 problem

2. VB5, ADO 1.5, SQL Server 6.5 problem

3. Data objects closed error in ADO 2.1 and SQL server 6.5

4. sql server 6.5 ado error

5. ADO OLEDB SQL Server 6.5

6. Strange Behavior - ADO and SQL Server 6.5

7. ADO 2.0 connection to SQL Server 6.5

8. SQL Server 6.5 & VB6 ADO

9. ADO 1.5 - VB5.0 - SQL Server 6.5

10. VB5 / ADO 1.5 / SQL Server 6.5

11. Strange Behavior - ADO and SQL Server 6.5

12. ADO 2.1/SQL Server 6.5 - IDENTITY Question

 

 
Powered by phpBB® Forum Software