Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

won't write to db!!!

Status
Not open for further replies.

frogggg

Programmer
Jan 17, 2002
182
US
My problem is that no matter what I try - rs.addImmediate, or rs.setValue I always get the error : multiple steps generated errors or something like that.

Also, the parameters tab in the recordset properties is always greyed out. I started doing my sql manually, rs.setSqlText, but with writing to the db I'm stuck.

Could the problem be with my data connection? I was having trouble with it in the beinning.

Thanks for any help.
 
Oh, also, when I try to debug, as soon as the debugger gets to the first recordset, it complains. It's not recognizing some part of the recordsets.

Any ideas?
 
The multi-step error is hiding the 'real' error - which is typically that:
- there is a blank value for a non-null column
- a relationship is violated

Try turning on the trace feature, this sometimes helps.

Not sure about the debug thing - except that debug in VI is painful to setup correctly. (Content Management)
 
What is the trace feature and how do I turn it on?

Thanks for your tip.
 
If you use the SOM (Script Object Model) - which would be used if you have DTC's on the page - then at the top of your page you have a few code lines:

<SCRIPT id=DebugDirectives runat=server language=javascript>
// Set these to true to enable debugging or tracing
@set @debug=false
@set @trace=false
</SCRIPT>

Just change the trace to true

You could also use any database profiling tools (if you use SQLServer, it has a profiler utility) or for ODBC, you could try turning on the ODBC log and examining the log file. Rememeber to turn it off afterwards! (Content Management)
 
I am using the scripting object model, but I don't have those lines. Can I just add them in? Why don't I have them?
 
What database platform are you writing to? I found that those ado &quot;add&quot; functions dont work well for IBM DB2 (which is the platform we use). If all else fails, you could try simply building sql insert statements and use the recordset OPEN method to insert the row. This seems to work much more reliably for me (at least with db2).

Hope this helps. Gilbert M. Vanegas
Programmer Analyst III
County of San Bernardino - ISD
Email : gvanegas@isd.sbcounty.gov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top