Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Updating a database using ASP


Message #1 by "Chad Anson" <Backwood@b...> on Sat, 22 Apr 2000 3:17:15
Greetings,

I am new to accessing databases with ASP. I am using both Microsoft 

Internet Information Server and Personal Web Server, both with Front Page 

2000 server extenstions installed, I get the same error on both servers: 

"Arguments are of the wrong type, are out of acceptable range, or are in 

conflict with one another".

/resturant_store_engine@h.../validate.asp, line 10



I remove the adLockOptimistic and the code executes until this error: 

"ADODB.Recordset error '800a0cb3'



Object or provider is not capable of performing requested operation. 



/resturant_store_engine@h.../validate.asp, line 32 



On Microsoft Internet Information Server the error states: "provider is not 

capable of performing requested operation."



The result is I cannot execute a .AddNew or .Update or edit the records in 

any way.





I have consulted many books on this subject and they all say pretty much 

the same thing and my code looks similar to theres...



I Would Greately Appricate Help On This!







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



<%dim Connect, NamePasswordRS, Query, Next_Step, New_User_Password, 

New_User_Password_Validate



Set Connect = Server.CreateObject("ADODB.Connection")

Connect.Open "NamePassword"



Set NamePasswordRS = Server.CreateObject("ADODB.Recordset")

Query = "SELECT * FROM Name_Password_Table"

NamePasswordRS.Open Query, Connect, adOpenDynamic, adLockOptimistic



New_User_Name = Request("New_User_Name")

New_User_Password = Request("New_User_Password")

New_User_Password_Validate = Request("New_User_Password_Validate")

First_Name = Request("First_Name")

Last_Name = Request("Last_Name")

Street_Address = Request("Street_Address")

Location = Request("Location")

City = Request("City")

State = Request("State")

Zip_Code = Request("Zip_Code")

Phone_Number = Request("Phone_Number")

Cross_Street = Request("Cross_Street")

Address_Label = Request("Address_Label")

E_Mail = Request("E_Mail")

Hear_About_Us = Request("Hear_About_Us")%>





<%If New_User_Password = New_User_Password_Validate Then%>

<%Next_Step = "confirmation.asp"%>



<%NamePasswordRS.AddNew

NamePasswordRS.Fields("User_Name") = New_User_Name

NamePasswordRS.Fields("UserPassword") = New_User_Password

NamePasswordRS.Fields("First_Name") = First_Name

NamePasswordRS.Fields("Last_Name") = Last_Name

NamePasswordRS.Fields("Street_Address") = Street_Address

NamePasswordRS.Fields("Location") = Location

NamePasswordRS.Fields("City") = City

NamePasswordRS.Fields("State") = State

NamePasswordRS.Fields("Zip_Code") = Zip_Code

NamePasswordRS.Fields("Phone_Number") = Phone_Number

NamePasswordRS.Fields("Cross_Street") = Cross_Street

NamePasswordRS.Fields("Address_Label") = Address_Label

NamePasswordRS.Fields("E_Mail") = E_Mail

NamePasswordRS.Fields("Hear_About_Us") = Hear_About_Us



NamePasswordRS.Update%>





<%ElseIf New_User_Password <> New_User_Password_Validate Then%>

<%Next_Step = "re-enter_password.asp"%>

	<%End If%>



<%Response.Redirect Next_Step%>

Message #2 by "Ruud Voigt" <RuudVoigt@w...> on Mon, 24 Apr 2000 13:21:00 +0200
i'm not sure if this is the problem you are asking about

but ADO will not accept fields containing "" strings



Try putting this around your variable stuff:

Instead of:

New_User_Name = Request("New_User_Name")



use this:

if not Request("New_User_Name") = "" then

  New_User_Name = Request("New_User_Name")

Else

  New_User_Name = " "

End If







-----Original Message-----

From: Chad Anson 

Sent: zaterdag 22 april 2000 03:17

To: ASP Databases

Subject: [asp_databases] Updating a database using ASP





Greetings,

I am new to accessing databases with ASP. I am using both Microsoft

Internet Information Server and Personal Web Server, both with Front Page

2000 server extenstions installed, I get the same error on both servers:

"Arguments are of the wrong type, are out of acceptable range, or are in

conflict with one another".

/resturant_store_engine@h.../validate.asp, line 10



I remove the adLockOptimistic and the code executes until this error:

"ADODB.Recordset error '800a0cb3'



Object or provider is not capable of performing requested operation.



/resturant_store_engine@h.../validate.asp, line 32



On Microsoft Internet Information Server the error states: "provider is not

capable of performing requested operation."



The result is I cannot execute a .AddNew or .Update or edit the records in

any way.





I have consulted many books on this subject and they all say pretty much

the same thing and my code looks similar to theres...



I Would Greately Appricate Help On This!







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



<%dim Connect, NamePasswordRS, Query, Next_Step, New_User_Password,

New_User_Password_Validate



Set Connect = Server.CreateObject("ADODB.Connection")

Connect.Open "NamePassword"



Set NamePasswordRS = Server.CreateObject("ADODB.Recordset")

Query = "SELECT * FROM Name_Password_Table"

NamePasswordRS.Open Query, Connect, adOpenDynamic, adLockOptimistic



New_User_Name = Request("New_User_Name")

New_User_Password = Request("New_User_Password")

New_User_Password_Validate = Request("New_User_Password_Validate")

First_Name = Request("First_Name")

Last_Name = Request("Last_Name")

Street_Address = Request("Street_Address")

Location = Request("Location")

City = Request("City")

State = Request("State")

Zip_Code = Request("Zip_Code")

Phone_Number = Request("Phone_Number")

Cross_Street = Request("Cross_Street")

Address_Label = Request("Address_Label")

E_Mail = Request("E_Mail")

Hear_About_Us = Request("Hear_About_Us")%>





<%If New_User_Password = New_User_Password_Validate Then%>

<%Next_Step = "confirmation.asp"%>



<%NamePasswordRS.AddNew

NamePasswordRS.Fields("User_Name") = New_User_Name

NamePasswordRS.Fields("UserPassword") = New_User_Password

NamePasswordRS.Fields("First_Name") = First_Name

NamePasswordRS.Fields("Last_Name") = Last_Name

NamePasswordRS.Fields("Street_Address") = Street_Address

NamePasswordRS.Fields("Location") = Location

NamePasswordRS.Fields("City") = City

NamePasswordRS.Fields("State") = State

NamePasswordRS.Fields("Zip_Code") = Zip_Code

NamePasswordRS.Fields("Phone_Number") = Phone_Number

NamePasswordRS.Fields("Cross_Street") = Cross_Street

NamePasswordRS.Fields("Address_Label") = Address_Label

NamePasswordRS.Fields("E_Mail") = E_Mail

NamePasswordRS.Fields("Hear_About_Us") = Hear_About_Us



NamePasswordRS.Update%>





<%ElseIf New_User_Password <> New_User_Password_Validate Then%>

<%Next_Step = "re-enter_password.asp"%>

	<%End If%>



<%Response.Redirect Next_Step%>



---

You are currently subscribed to asp_databases






Message #3 by udaykh@h... on Mon, 24 Apr 2000 20:21:48
I think Dynamic cursors don't work with access databases. we could use 

command or connection objects instead of recordset to add a new record.

Message #4 by "Ken Schaefer" <ken.s@a...> on Wed, 26 Apr 2000 00:44:28 +1000



> I think Dynamic cursors don't work with access databases. we could use

> command or connection objects instead of recordset to add a new record.



If the provider does not support a particular cursor, then it will supply a

substitute cursor.



There is no problem using recordset object to add a new record to a table,

though it's slower than just executing an SQL statement against a connection

object.



Cheers

Ken



Message #5 by "Chad Anson" <Backwood@b...> on Wed, 26 Apr 2000 02:25:53 -0700
Thank You For The Reply!

I'm back on track thanks to these replies

Good Day...

Chad





-------------------------------------------------------------------------



----- Original Message -----

From: "Ken Schaefer" 

To: "ASP Databases" <asp_databases@p...>

Sent: Tuesday, April 25, 2000 7:44 AM

Subject: [asp_databases] Re: Updating a database using ASP





>

>

> > I think Dynamic cursors don't work with access databases. we could 

use

> > command or connection objects instead of recordset to add a new 

record.

>

> If the provider does not support a particular cursor, then it will 

supply a

> substitute cursor.

>

> There is no problem using recordset object to add a new record to a 

table,

> though it's slower than just executing an SQL statement against a 

connection

> object.

>

> Cheers

> Ken

>

>

Message #6 by =?iso-8859-1?Q?Gabriel_Hern=E1ndez?= <gabriel@c...> on Thu, 27 Apr 2000 00:21:59 -0400
But like the file access could open up 2000 with an ODBC connection if

but above the file mdb is in another servant, where one publishes those

pages.?????????????



----- Original Message -----

From: Ken Schaefer 

To: ASP Databases <asp_databases@p...>

Sent: Tuesday, April 25, 2000 10:44 AM

Subject: [asp_databases] Re: Updating a database using ASP





>

>

> > I think Dynamic cursors don't work with access databases. we could use

> > command or connection objects instead of recordset to add a new record.

>

> If the provider does not support a particular cursor, then it will supply

a

> substitute cursor.

>

> There is no problem using recordset object to add a new record to a table,

> though it's slower than just executing an SQL statement against a

connection

> object.

>

> Cheers

> Ken

>

>

> ---

> You are currently subscribed to asp_databases


$subst('Email.Unsub')

>



Message #7 by "Ken Schaefer" <ken.s@a...> on Fri, 28 Apr 2000 10:45:58 +1000
> But like the file access could open up 2000 with an ODBC connection if

> but above the file mdb is in another servant, where one publishes those

> pages.?????????????



Huh? (I'm a bit confused)



Also, do people find that questions get answered quicker if you type more

"?" at the end? I doubt you'd write that many question marks on paper, or in

a report - is there something special about email whereby the

quality/responsivesness of the answer is dependant on the number of "?" or

"!" that one puts at the end of each sentence?



Cheers

Ken



> ----- Original Message -----

> From: Ken Schaefer

> To: ASP Databases <asp_databases@p...>

> Sent: Tuesday, April 25, 2000 10:44 AM

> Subject: [asp_databases] Re: Updating a database using ASP

>

>

> >

> >

> > > I think Dynamic cursors don't work with access databases. we could use

> > > command or connection objects instead of recordset to add a new

record.

> >

> > If the provider does not support a particular cursor, then it will

supply

> a

> > substitute cursor.

> >

> > There is no problem using recordset object to add a new record to a

table,

> > though it's slower than just executing an SQL statement against a

> connection

> > object.

> >

> > Cheers

> > Ken





Message #8 by =?iso-8859-1?Q?Gabriel_Hern=E1ndez?= <gabriel@c...> on Thu, 27 Apr 2000 22:09:38 -0400
OK,



    But like the file access could open up 2000 with an ODBC connection if

but above the file mdb is in another servant, where one publishes those

pages.



Me puedes responder ahora o te lo adorno mas "?"



----- Original Message -----

From: Ken Schaefer <ken.s@a...>

To: ASP Databases <asp_databases@p...>

Sent: Thursday, April 27, 2000 8:45 PM

Subject: [asp_databases] Re: Updating a database using ASP





> > But like the file access could open up 2000 with an ODBC connection if

> > but above the file mdb is in another servant, where one publishes those

> > pages.?????????????

>

> Huh? (I'm a bit confused)

>

> Also, do people find that questions get answered quicker if you type more

> "?" at the end? I doubt you'd write that many question marks on paper, or

in

> a report - is there something special about email whereby the

> quality/responsivesness of the answer is dependant on the number of "?" or

> "!" that one puts at the end of each sentence?

>

> Cheers

> Ken

>

> > ----- Original Message -----

> > From: Ken Schaefer

> > To: ASP Databases <asp_databases@p...>

> > Sent: Tuesday, April 25, 2000 10:44 AM

> > Subject: [asp_databases] Re: Updating a database using ASP

> >

> >

> > >

> > >

> > > > I think Dynamic cursors don't work with access databases. we could

use

> > > > command or connection objects instead of recordset to add a new

> record.

> > >

> > > If the provider does not support a particular cursor, then it will

> supply

> > a

> > > substitute cursor.

> > >

> > > There is no problem using recordset object to add a new record to a

> table,

> > > though it's slower than just executing an SQL statement against a

> > connection

> > > object.

> > >

> > > Cheers

> > > Ken

>

>

>

> ---

> You are currently subscribed to asp_databases


$subst('Email.Unsub')

>






  Return to Index