Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Help simple problem(i think)with database


Message #1 by "Lucas Haines" <LucasHaines@a...> on Wed, 12 Mar 2003 15:10:02 -0800
Hey People,
	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

Message #2 by Mark Eckeard <meckeard2000@y...> on Wed, 12 Mar 2003 16:32:24 -0800 (PST)
Let's start with the first problem.

It's obvious that the field you are referencing is not
present in the recordset.

I noticed that in your code, you are referring to a
field called "ContractNotes".  But at the end of your
email, you said in Query Analyzer you see the out
field as "COONTRACTNOTES". Maybe you have a typo in
your code???

Mark.

--- Lucas Haines <LucasHaines@a...> wrote:
> Hey People,
> 	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
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
Message #3 by "Lucas Haines" <LucasHaines@a...> on Wed, 12 Mar 2003 19:46:09 -0800
I checked for the typos that was just in the e-mail, thanks anyway.

-----Original Message-----
From: Mark Eckeard [mailto:meckeard2000@y...]
Sent: Wednesday, March 12, 2003 4:32 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: Help simple problem(i think)with database


Let's start with the first problem.

It's obvious that the field you are referencing is not
present in the recordset.

I noticed that in your code, you are referring to a
field called "ContractNotes".  But at the end of your
email, you said in Query Analyzer you see the out
field as "COONTRACTNOTES". Maybe you have a typo in
your code???

Mark.

--- Lucas Haines <LucasHaines@a...> wrote:
> Hey People,
> 	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
>
>


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


Message #4 by Mark Eckeard <meckeard2000@y...> on Wed, 12 Mar 2003 20:07:08 -0800 (PST)
Lucas,

Are you at the end of the recordset?  Or maybe you
moved to the next recordset???

Mark
--- Lucas Haines <LucasHaines@a...> wrote:
> I checked for the typos that was just in the e-mail,
> thanks anyway.
> 
> -----Original Message-----
> From: Mark Eckeard [mailto:meckeard2000@y...]
> Sent: Wednesday, March 12, 2003 4:32 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] Re: Help simple problem(i
> think)with database
> 
> 
> Let's start with the first problem.
> 
> It's obvious that the field you are referencing is
> not
> present in the recordset.
> 
> I noticed that in your code, you are referring to a
> field called "ContractNotes".  But at the end of
> your
> email, you said in Query Analyzer you see the out
> field as "COONTRACTNOTES". Maybe you have a typo in
> your code???
> 
> Mark.
> 
> --- Lucas Haines <LucasHaines@a...> wrote:
> > Hey People,
> > 	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
> >
> >
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
> 
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
Message #5 by "Lucas Haines" <LucasHaines@a...> on Thu, 13 Mar 2003 15:01:08 -0800
I'm at the beginning of the recodset. Some one else from my company created
the same thing on an other part of the site and are getting similar
problems. does any have any ideas as to what might be causing it.

-----Original Message-----
From: Mark Eckeard [mailto:meckeard2000@y...]
Sent: Wednesday, March 12, 2003 8:07 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: Help simple problem(i think)with database


Lucas,

Are you at the end of the recordset?  Or maybe you
moved to the next recordset???

Mark
--- Lucas Haines <LucasHaines@a...> wrote:
> I checked for the typos that was just in the e-mail,
> thanks anyway.
>
> -----Original Message-----
> From: Mark Eckeard [mailto:meckeard2000@y...]
> Sent: Wednesday, March 12, 2003 4:32 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] Re: Help simple problem(i
> think)with database
>
>
> Let's start with the first problem.
>
> It's obvious that the field you are referencing is
> not
> present in the recordset.
>
> I noticed that in your code, you are referring to a
> field called "ContractNotes".  But at the end of
> your
> email, you said in Query Analyzer you see the out
> field as "COONTRACTNOTES". Maybe you have a typo in
> your code???
>
> Mark.
>
> --- Lucas Haines <LucasHaines@a...> wrote:
> > Hey People,
> > 	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
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
>
>


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com



  Return to Index