Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: edit database


Message #1 by "khal nayak" <newadeel@l...> on Sat, 06 Jul 2002 01:52:16 +0500
hi,
 i want 2 simply insert value in database from user input
but thr r somethign wrong in my code it is not working properly
see my code
connection file conn.asp
<%
Set Con = Server.createObject("ADODB.Connection") 
Con.Open "DBQ=" & Server.Mappath("../khalnayak/msrct.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" 
%>
now u see my after submit page when i sybmit page then i call this page from action temp1.asp

<!-- #include file="conn.asp" -->
<%
	Set RsMain = Server.CreateObject ("ADODB.Recordset")
	strsql="select * from temp "
	rsmain.Open strsql,con,adOpenKeyset, adLockOptimistic,adCmdText

	rsmain("Link")="www"
	rsmain.Update

	RsMain.Close 
	Set objcomm = nothing
	
%>

wht wrong in thiscode
 my database name is msrct and it have a column name link and i want 2 edit value in link column but it show me this error:

ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

plz help me and correct this code otherwise send me user input eidt code
bye





_____________________________________________________
Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
and NoTaglines --> LYCOS MAIL PLUS.
http://www.mail.lycos.com/brandPage.shtml?pageId=plus 
Message #2 by "Larry Woods" <larry@l...> on Fri, 5 Jul 2002 14:09:06 -0700
You are performing an UPDATE, not an INSERTION.  Are there any
rows in this table?  If you want to ADD a record, you need to use
'rsmain.AddNew'.

Larry Woods


> -----Original Message-----
> From: khal nayak [mailto:newadeel@l...]
> Sent: Friday, July 05, 2002 1:52 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] edit database
>
>
> hi,
>  i want 2 simply insert value in database from user input
> but thr r somethign wrong in my code it is not working properly
> see my code
> connection file conn.asp
> <%
> Set Con = Server.createObject("ADODB.Connection")
> Con.Open "DBQ=" &
> Server.Mappath("../khalnayak/msrct.mdb") &
> ";Driver={Microsoft Access Driver (*.mdb)};"
> %>
> now u see my after submit page when i sybmit page then
> i call this page from action temp1.asp
>
> <!-- #include file="conn.asp" -->
> <%
> 	Set RsMain = Server.CreateObject ("ADODB.Recordset")
> 	strsql="select * from temp "
> 	rsmain.Open strsql,con,adOpenKeyset,
> adLockOptimistic,adCmdText
>
> 	rsmain("Link")="www"
> 	rsmain.Update
>
> 	RsMain.Close
> 	Set objcomm = nothing
>
> %>
>
> wht wrong in thiscode
>  my database name is msrct and it have a column name
> link and i want 2 edit value in link column but it
> show me this error:
>
> ADODB.Recordset (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable
> range, or are in conflict with one another.
>
> plz help me and correct this code otherwise send me
> user input eidt code
> bye
>
>
>
>
>
> _____________________________________________________
> Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
> and NoTaglines --> LYCOS MAIL PLUS.
> http://www.mail.lycos.com/brandPage.shtml?pageId=plus
>
>
> ---
>
> Improve your web design skills with these new books
> from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=n
osim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/thepr
ogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/thepr
ogramme
r-20

Message #3 by "khal nayak" <newadeel@l...> on Sat, 06 Jul 2002 11:15:32 +0500
 i want 2 simply insert value in database from user input
but thr r somethign wrong in my code it is not working properly
see my code
connection file conn.asp
<%
Set Con = Server.createObject("ADODB.Connection") 
Con.Open "DBQ=" & Server.Mappath("../khalnayak/msrct.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" 
%>
now u see my after submit page when i sybmit page then i call this page from action temp1.asp
<!-- #include file="conn.asp" -->
<%
	Set RsMain = Server.CreateObject ("ADODB.Recordset")
	strsql="select * from temp "
	rsmain.Open strsql,con,adOpenKeyset, adLockOptimistic,adCmdText

	rsmain("Link")="www"
	rsmain.Update

	RsMain.Close 
	Set objcomm = nothing
	
%>

wht wrong in thiscode
 my database name is msrct and it have a column name link and i want 2 edit value in link column but it show me this error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

plz help me and correct this code otherwise send me user input eidt code
bye





_____________________________________________________
Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
and NoTaglines --> LYCOS MAIL PLUS.
http://www.mail.lycos.com/brandPage.shtml?pageId=plus 
Message #4 by "Vincent Vandermeeren \(mailinglists Only\)" <vinnie@j...> on Sat, 6 Jul 2002 08:39:13 +0200
maybe a stupid remark ... but if there are more id's with the "link" field
then you have problem there he doesn't know the ID number or some other
reference.
He need a reference to know there to write ...

Greetings,
Vincent


----- Original Message -----
From: "khal nayak" <newadeel@l...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Saturday, July 06, 2002 8:15 AM
Subject: [asp_web_howto] edit database


> i want 2 simply insert value in database from user input
> but thr r somethign wrong in my code it is not working properly
> see my code
> connection file conn.asp
> <%
> Set Con = Server.createObject("ADODB.Connection")
> Con.Open "DBQ=" & Server.Mappath("../khalnayak/msrct.mdb") &
";Driver={Microsoft Access Driver (*.mdb)};"
> %>
> now u see my after submit page when i sybmit page then i call this page
from action temp1.asp
> <!-- #include file="conn.asp" -->
> <%
> Set RsMain = Server.CreateObject ("ADODB.Recordset")
> strsql="select * from temp "
> rsmain.Open strsql,con,adOpenKeyset, adLockOptimistic,adCmdText
>
> rsmain("Link")="www"
> rsmain.Update
>
> RsMain.Close
> Set objcomm = nothing
>
> %>
>
> wht wrong in thiscode
>  my database name is msrct and it have a column name link and i want 2
edit value in link column but it show me this error:
> ADODB.Recordset (0x800A0BB9)
> Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
>
> plz help me and correct this code otherwise send me user input eidt code
> bye
>
>
>
>
>
> _____________________________________________________
> Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
> and NoTaglines --> LYCOS MAIL PLUS.
> http://www.mail.lycos.com/brandPage.shtml?pageId=plus
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
>

Message #5 by "khal nayak" <newadeel@l...> on Sun, 07 Jul 2002 18:36:22 +0500
hi,
 i want 2 simply insert value in database from user input
but thr r somethign wrong in my code it is not working properly
see my code
connection file conn.asp
<%
Set Con = Server.createObject("ADODB.Connection") 
Con.Open "DBQ=" & Server.Mappath("../khalnayak/msrct.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" 
%>
now u see my after submit page when i sybmit page then i call this page from action temp1.asp
<!-- #include file="conn.asp" -->
<%
	Set RsMain = Server.CreateObject ("ADODB.Recordset")
	strsql="select * from temp "
	rsmain.Open strsql,con,adOpenKeyset, adLockOptimistic,adCmdText

	rsmain("Link")="www"
	rsmain.Update

	RsMain.Close 
	Set objcomm = nothing
	
%>

wht wrong in thiscode
 my database name is msrct and it have a column name link and i want 2 edit value in link column but it show me this error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

plz help me and correct this code otherwise send me user input eidt code
bye





_____________________________________________________
Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
and NoTaglines --> LYCOS MAIL PLUS.
http://www.mail.lycos.com/brandPage.shtml?pageId=plus 
Message #6 by kyle.b.willman@u... on Mon, 8 Jul 2002 07:09:21 -0500
Good morning,

Try inserting the following line into your code:

<!-- #include file="adovbs.inc" -->

In order to use the constants adOpenKeyset, adLockOptimistic, and
adCmdText, you must include this file.

This should solve your problem.

Kyle B. Willman
PricewaterhouseCoopers LLP
Office:  xxx.xxx.xxxx
Cell:   xxx.xxx.xxxx


                                                                                                                                    
                      "khal nayak"                                                                                                  
                      <newadeel@l...       To: "ASP Web HowTo" <asp_web_howto@p...>                            
                      m>                       cc:                                                                               
                      07/07/2002 08:36         Subject:  [asp_web_howto] edit database                                              
                      AM                                                                                                            
                                                                                                                                    
                      Please respond to                                                                                             
                      "ASP Web HowTo"                                                                                               
                                                                                                                                    
                                                                                                                                    




hi,
 i want 2 simply insert value in database from user input
but thr r somethign wrong in my code it is not working properly
see my code
connection file conn.asp
<%
Set Con = Server.createObject("ADODB.Connection")
Con.Open "DBQ=" & Server.Mappath("../khalnayak/msrct.mdb") & ";Driver
={Microsoft Access Driver (*.mdb)};"
%>
now u see my after submit page when i sybmit page then i call this page
from action temp1.asp
<!-- #include file="conn.asp" -->
<%
             Set RsMain = Server.CreateObject ("ADODB.Recordset")
             strsql="select * from temp "
             rsmain.Open strsql,con,adOpenKeyset,
adLockOptimistic,adCmdText

             rsmain("Link")="www"
             rsmain.Update

             RsMain.Close
             Set objcomm = nothing

%>

wht wrong in thiscode
 my database name is msrct and it have a column name link and i want 2 edit
value in link column but it show me this error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

plz help me and correct this code otherwise send me user input eidt code
bye





_____________________________________________________
Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
and NoTaglines --> LYCOS MAIL PLUS.
http://www.mail.lycos.com/brandPage.shtml?pageId=plus


---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20




_________________________________________________________________
         The information transmitted is intended only for the person or
         entity to which it is addressed and may contain confidential
         and/or privileged material.  Any review, retransmission,
         dissemination or other use of, or taking of any action in reliance
         upon, this information by persons or entities other than the
         intended recipient is prohibited.   If you received this in error,
         please contact the sender and delete the material from any
         computer.


  Return to Index