Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Database update problem


Message #1 by "Lucas Haines" <LucasHaines@a...> on Wed, 12 Mar 2003 09:37:48 -0800
Hello Everyone,
	Here is my issue I just can not find the solution to, maybe some one here
can shine some light on the subject. I Have a script I did not create the
original, but I have to work with it. On this form I added a Text area and
called it "ContractNotes", Here is my HTML and ASP to show the text area.
	<tr>
	<td align="Right" valign="top" height="100" width="196">Contract
Notes:</td>
LINE 385---> <td><textarea rows=4 cols=35
name="ContractNotes"><%=RS.Fields("ContractNotes")%></textarea></td>
	</tr>

Now when I try and load the script it gives me this message in the actual
text box I'm trying to load information into.
	<font face="Arial" size=2>
	<p>ADODB.Recordset</font> <font face="Arial" size=2>error '800a0cc1'</font>
	<p>
	<font face="Arial" size=2>Item cannot be found in the collection
corresponding to the requested name or ordinal.</font>
	<p>
	<font face="Arial" size=2>/admin/Home_editContractDisplay.asp</font><font
face="Arial" size=2>, line 385</font>

And does not load the rest of the page, now when I remark the line
<%=RS.FIELDS("CONTRACTNOTES")%> it loads fine,

But here is the second point to the issue, When I use this line to update
the Database...
	RS("ContractNotes").Value = Request.Form("ContractNotes")
I get this error...
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type
varchar to numeric.

/admin/Home_editContractDisplay.asp, line 227
	Set RS = Server.CreateObject("ADODB.Recordset")
	sqlQuery = "SELECT * FROM CONTRACTS WHERE ID = '" &
Request.QueryString("SeedID") & "'"
LINE 227-->	RS.Open sqlQuery, Conn, 3, 3

I have updated the DB to Reflect the changes i made a column in table
CONTRACT name CONTRACTNOTES type Text length 16 just like other fields on
the script but for some reason this will not work. but when I run a query in
the Query Analyzer for SQL to the CONTRACTS table it show the column
"COONTRACTNOTES" as there with null value. What is going on?

Thanks,
	Lucas Haines
	Junior Developer



  Return to Index