Simple question: debugging VB6\SQL6.5 app - what is the best approach?

Simple question: debugging VB6\SQL6.5 app - what is the best approach?

Post by Keith Loma » Wed, 04 Aug 1999 04:00:00



I have an SQL 6.5 (Enterprise) database, which is referenced by a VB6
application using ADO. Both the application and DB were written by an other
(unavailable) person.

A few days ago, the VB6 application crashed and it appears to have left the
DB in a bad way. Whenever the application tries to insert an entry into the
Journal table the DB raises an error saying that the constraint on the
primary key is being broken by a duplicate value for the primary key. The
insertion is performed by calling a stored procedure. There have been no
source code or DB changes inthe recent past. The system had been running for
several weeks without any problems.

Could somebody please advise me on the best approaches to take to solve this
problem. I have access to the application source code, Visual Basic 6
Enterprise Edition, and the SQL 6.5 server.

All responses appreciated,

Keith Lomax MCSE MCP+I

 
 
 

Simple question: debugging VB6\SQL6.5 app - what is the best approach?

Post by DPSatHy » Wed, 04 Aug 1999 04:00:00


try running dbcc checkident('tablename')

--
Thanks,
Dave
(Please respond to the newsgroup.)


Quote:> I have an SQL 6.5 (Enterprise) database, which is referenced by a VB6
> application using ADO. Both the application and DB were written by an
other
> (unavailable) person.

> A few days ago, the VB6 application crashed and it appears to have left
the
> DB in a bad way. Whenever the application tries to insert an entry into
the
> Journal table the DB raises an error saying that the constraint on the
> primary key is being broken by a duplicate value for the primary key. The
> insertion is performed by calling a stored procedure. There have been no
> source code or DB changes inthe recent past. The system had been running
for
> several weeks without any problems.

> Could somebody please advise me on the best approaches to take to solve
this
> problem. I have access to the application source code, Visual Basic 6
> Enterprise Edition, and the SQL 6.5 server.

> All responses appreciated,

> Keith Lomax MCSE MCP+I


 
 
 

Simple question: debugging VB6\SQL6.5 app - what is the best approach?

Post by Tjibbe Chris Kuiper » Thu, 05 Aug 1999 04:00:00


Read the stored proc code to see why a duplicate key is being inserted. (Use
sp_helptext <procname> in ISQL/w).
 
 
 

1. Simple question: debugging VB6\SQL6.5 app - what is the best approach?

I have an SQL 6.5 (Enterprise) database, which is referenced by a VB6
application using ADO. Both the application and DB were written by an other
(unavailable) person.

A few days ago, the VB6 application crashed and it appears to have left the
DB in a bad way. Whenever the application tries to insert an entry into the
Journal table the DB raises an error saying that the constraint on the
primary key is being broken by a duplicate value for the primary key. The
insertion is performed by calling a stored procedure. There have been no
source code or DB changes inthe recent past. The system had been running for
several weeks without any problems.

Could somebody please advise me on the best approaches to take to solve this
problem. I have access to the application source code, Visual Basic 6
Enterprise Edition, and the SQL 6.5 server.

All responses appreciated,

Keith Lomax MCSE MCP+I

2. HELP!! Need Hints on building Uninstall app

3. Client server database app -- Best approach?

4. Connection string

5. Best query+report approach in PdxWin app?

6. Params limit on xml-sql template?

7. VB6 and SQL6.5 question

8. Any idea what the SQL 7 alternative to SETUSER is?

9. Simple question..I am running a stored procedure from SQL PLUS

10. Embarassingly simple SQL question - what am I missing?!

11. Simple(?) Approach Question

12. Simple question..I am running a stored procedure from SQL PLUS