Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: trying to update a record.


Message #1 by "Carolien Latupeirissa" <clatupeirissa@h...> on Thu, 29 Mar 2001 15:11:29 +0200
Help!

I can't see what I'm doing wrong anymore.

I've rewritten my code about ten times already and it keeps coming back to

me with a unspecified error (Provider (0x80004005)).

I'm getting the error on the "objConn.Open "DSN=Bestelling"-line

Does somebody see what I'm nog seeing?



Regards,

Carolien



I've written 3 pages

****************************************************************************

**

Page1:



<form action="ChangeBestelling.asp" method=post>

Fill in an OrderID of the order you like to edit<br>

OrderID<input type="text" name="OrderID" size="20">

<input type="submit" name="Submit">

<input type="reset" name="Reset">

</form>



****************************************************************************

******



Page2 (changebestelling.asp):



Dim intOrderID

intOrderID = Request.Form("OrderID")



Dim objConn

Dim objOrderstatusRS

Dim strGetOrderstatus



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



objConn.Open "DSN=Bestelling"

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



strGetOrderstatus = "SELECT * FROM qryAll where [OrderID] = " & intOrderID

Set objOrderstatusRS = objConn.Execute(strGetOrderstatus)



Response.Write "<form action='ChangeBestelling2.asp' method=post>"

Response.Write "<table border='1'>"

Response.Write "<tr><td align=right>OrderID</td><td><input type='tekst'

readonly name='OrderID' value=" & objOrderstatusRS.Fields("OrderID") &

"></td></tr>"

Response.Write "<tr><td align=right>Klant</td><td><input type='tekst'

name='Klant' value=" & objOrderstatusRS.Fields("Klant") & "></td></tr>"

Response.Write "<tr><td align=right>Orderdatum</td><td><input type='tekst'

name='Orderdatum' value=" & objOrderstatusRS.Fields("Orderdatum") &

"></td></tr>"

Response.Write "<tr><td align=right>Bestemming</td><td><input type='tekst'

name='Bestemming' value=" & objOrderstatusRS.Fields("Bestemming") &

"></td></tr>"

Response.Write "</table><br><input type='submit' name='submit'><input

type='reset' name='reset'></form>"





objOrderstatusRS.Close

Set objOrderstatusRS = Nothing

objConn.Close

Set objConn = Nothing



****************************************************************************

**



page 3(changebestelling2.asp):





Dim objConn

Dim strKlant, strOrderdatum, strBestemming, intOrderID



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

objConn.Open "DSN=Bestelling"



intOrderID = Request.Form("OrderID")

strKlant = Request.Form("Klant")

strOrderdatum = Request.Form("Orderdatum")

strBestemming = Request.Form("Bestemming")



strSQL = "UPDATE tblBestelling SET Klant = " & strKlant & ", Orderdatum = "

& strOrderdatum & ", Bestemming = " & strBestemming & " WHERE [OrderID] = "

& intOrderID

objConn.Execute(strSQL)



objConn.Close

Set objConn = Nothing



Message #2 by "Tomm Matthis" <matthis@b...> on Thu, 29 Mar 2001 08:44:45 -0500
Is it possible that the DSN file is called "Bestselling" instead of 

"Bestelling" ??



Tomm



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

> From: Carolien Latupeirissa [mailto:clatupeirissa@h...]

> Sent: Thursday, March 29, 2001 8:11 AM

> To: ASP Databases

> Subject: [asp_databases] trying to update a record.

>

>

> Help!

> I can't see what I'm doing wrong anymore.

> I've rewritten my code about ten times already and it keeps coming 

back to

> me with a unspecified error (Provider (0x80004005)).

> I'm getting the error on the "objConn.Open "DSN=3DBestelling"-line

> Does somebody see what I'm nog seeing?

>

> Regards,

> Carolien

>

> I've written 3 pages

> ******************************************************************

> **********

> **

> Page1:

>

> <form action=3D"ChangeBestelling.asp" method=3Dpost>

> Fill in an OrderID of the order you like to edit<br>

> OrderID<input type=3D"text" name=3D"OrderID" size=3D"20">

> <input type=3D"submit" name=3D"Submit">

> <input type=3D"reset" name=3D"Reset">

> </form>

>

> ******************************************************************

> **********

> ******

>

> Page2 (changebestelling.asp):

>

> Dim intOrderID

> intOrderID =3D Request.Form("OrderID")

>

> Dim objConn

> Dim objOrderstatusRS

> Dim strGetOrderstatus

>

> Set objConn =3D Server.CreateObject ("ADODB.Connection")

>

> objConn.Open "DSN=3DBestelling"

> Set objOrderstatusRS =3D Server.CreateObject ("ADODB.Recordset")

>

> strGetOrderstatus =3D "SELECT * FROM qryAll where [OrderID] =3D " & 

intOrderID

> Set objOrderstatusRS =3D objConn.Execute(strGetOrderstatus)

>

> Response.Write "<form action=3D'ChangeBestelling2.asp' method=3Dpost>"

> Response.Write "<table border=3D'1'>"

> Response.Write "<tr><td align=3Dright>OrderID</td><td><input 

type=3D'tekst'

> readonly name=3D'OrderID' value=3D" & 

objOrderstatusRS.Fields("OrderID") &

> "></td></tr>"

> Response.Write "<tr><td align=3Dright>Klant</td><td><input 

type=3D'tekst'

> name=3D'Klant' value=3D" & objOrderstatusRS.Fields("Klant") & 

"></td></tr>"

> Response.Write "<tr><td align=3Dright>Orderdatum</td><td><input 

type=3D'tekst'

> name=3D'Orderdatum' value=3D" & objOrderstatusRS.Fields("Orderdatum") 

&

> "></td></tr>"

> Response.Write "<tr><td align=3Dright>Bestemming</td><td><input 

type=3D'tekst'

> name=3D'Bestemming' value=3D" & objOrderstatusRS.Fields("Bestemming") 

&

> "></td></tr>"

> Response.Write "</table><br><input type=3D'submit' 

name=3D'submit'><input

> type=3D'reset' name=3D'reset'></form>"

>

>

> objOrderstatusRS.Close

> Set objOrderstatusRS =3D Nothing

> objConn.Close

> Set objConn =3D Nothing

>

> ******************************************************************

> **********

> **

>

> page 3(changebestelling2.asp):

>

>

> Dim objConn

> Dim strKlant, strOrderdatum, strBestemming, intOrderID

>

> Set objConn =3D Server.CreateObject ("ADODB.Connection")

> objConn.Open "DSN=3DBestelling"

>

> intOrderID =3D Request.Form("OrderID")

> strKlant =3D Request.Form("Klant")

> strOrderdatum =3D Request.Form("Orderdatum")

> strBestemming =3D Request.Form("Bestemming")

>

> strSQL =3D "UPDATE tblBestelling SET Klant =3D " & strKlant & ",

> Orderdatum =3D "

> & strOrderdatum & ", Bestemming =3D " & strBestemming & " WHERE

> [OrderID] =3D "

> & intOrderID

> objConn.Execute(strSQL)

>

> objConn.Close

> Set objConn =3D Nothing

>

>

> ---

> SoftArtisans helps developers build robust, scalable Web applications!

> Excel Web reports, charts: 

http://www.softartisans.com/excelwriter.html

> File uploads: http://www.softartisans.com/saf.html

> Transactional file management: http://www.softartisans.com/saf1.html

> Scalability: http://www.softartisans.com/saxsession.html

> ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html




> $subst('Email.Unsub')

>

>



Message #3 by "Markus Hain" <kill@g...> on Thu, 29 Mar 2001 15:23:54
> Help!

> I can't see what I'm doing wrong anymore.

> I've rewritten my code about ten times already and it keeps coming back 

to

> me with a unspecified error (Provider (0x80004005)).

> I'm getting the error on the "objConn.Open "DSN=Bestelling"-line

> Does somebody see what I'm nog seeing?

> 

> Regards,

> Carolien

> 

> I've written 3 pages

> 

***************************************************************************

*

> **

> Page1:

> 

> <form action="ChangeBestelling.asp" method=post>

> Fill in an OrderID of the order you like to edit<br>

> OrderID<input type="text" name="OrderID" size="20">

> <input type="submit" name="Submit">

> <input type="reset" name="Reset">

> </form>

> 

> 

***************************************************************************

*

> ******

> 

> Page2 (changebestelling.asp):

> 

> Dim intOrderID

> intOrderID = Request.Form("OrderID")

> 

> Dim objConn

> Dim objOrderstatusRS

> Dim strGetOrderstatus

> 

> Set objConn = Server.CreateObject ("ADODB.Connection")

> 

> objConn.Open "DSN=Bestelling"

> Set objOrderstatusRS = Server.CreateObject ("ADODB.Recordset")

> 

> strGetOrderstatus = "SELECT * FROM qryAll where [OrderID] = " & 

intOrderID

> Set objOrderstatusRS = objConn.Execute(strGetOrderstatus)

> 

> Response.Write "<form action='ChangeBestelling2.asp' method=post>"

> Response.Write "<table border='1'>"

> Response.Write "<tr><td align=right>OrderID</td><td><input type='tekst'

> readonly name='OrderID' value=" & objOrderstatusRS.Fields("OrderID") &

> "></td></tr>"

> Response.Write "<tr><td align=right>Klant</td><td><input type='tekst'

> name='Klant' value=" & objOrderstatusRS.Fields("Klant") & "></td></tr>"

> Response.Write "<tr><td align=right>Orderdatum</td><td><input 

type='tekst'

> name='Orderdatum' value=" & objOrderstatusRS.Fields("Orderdatum") &

> "></td></tr>"

> Response.Write "<tr><td align=right>Bestemming</td><td><input 

type='tekst'

> name='Bestemming' value=" & objOrderstatusRS.Fields("Bestemming") &

> "></td></tr>"

> Response.Write "</table><br><input type='submit' name='submit'><input

> type='reset' name='reset'></form>"

> 

> 

> objOrderstatusRS.Close

> Set objOrderstatusRS = Nothing

> objConn.Close

> Set objConn = Nothing

> 

> 

***************************************************************************

*

> **

> 

> page 3(changebestelling2.asp):

> 

> 

> Dim objConn

> Dim strKlant, strOrderdatum, strBestemming, intOrderID

> 

> Set objConn = Server.CreateObject ("ADODB.Connection")

> objConn.Open "DSN=Bestelling"

> 

> intOrderID = Request.Form("OrderID")

> strKlant = Request.Form("Klant")

> strOrderdatum = Request.Form("Orderdatum")

> strBestemming = Request.Form("Bestemming")

> 

> strSQL = "UPDATE tblBestelling SET Klant = " & strKlant & ", Orderdatum 

= "

> & strOrderdatum & ", Bestemming = " & strBestemming & " WHERE [OrderID] 

= "

> & intOrderID

> objConn.Execute(strSQL)

> 

> objConn.Close

> Set objConn = Nothing

> 





Hi



Try and use the full DSN string e.g. "DSN=bestelling;uid=(userid);pwd

(password)"



Hope this helps



Markus

Message #4 by =?iso-8859-1?Q?H=E5kan_Frennesson?= <hakan@c...> on Thu, 29 Mar 2001 18:05:55 +0200
Hi!



Your error code tells me that it is file permission related (I am almost

sure it is). Make sure that the IUSR<machinename> account has read and write

permissions on the database file and read, write and change permissions on

the folder where the database resides. I assume you use Access.



HTH,



Hakan



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

From: Carolien Latupeirissa [mailto:clatupeirissa@h...]

Sent: den 29 mars 2001 15:11

To: ASP Databases

Subject: [asp_databases] trying to update a record.





Help!

I can't see what I'm doing wrong anymore.

I've rewritten my code about ten times already and it keeps coming back to

me with a unspecified error (Provider (0x80004005)).

I'm getting the error on the "objConn.Open "DSN=Bestelling"-line

Does somebody see what I'm nog seeing?



Regards,

Carolien



I've written 3 pages

****************************************************************************

**

Page1:



<form action="ChangeBestelling.asp" method=post>

Fill in an OrderID of the order you like to edit<br>

OrderID<input type="text" name="OrderID" size="20">

<input type="submit" name="Submit">

<input type="reset" name="Reset">

</form>



****************************************************************************

******



Page2 (changebestelling.asp):



Dim intOrderID

intOrderID = Request.Form("OrderID")



Dim objConn

Dim objOrderstatusRS

Dim strGetOrderstatus



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



objConn.Open "DSN=Bestelling"

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



strGetOrderstatus = "SELECT * FROM qryAll where [OrderID] = " & intOrderID

Set objOrderstatusRS = objConn.Execute(strGetOrderstatus)



Response.Write "<form action='ChangeBestelling2.asp' method=post>"

Response.Write "<table border='1'>"

Response.Write "<tr><td align=right>OrderID</td><td><input type='tekst'

readonly name='OrderID' value=" & objOrderstatusRS.Fields("OrderID") &

"></td></tr>"

Response.Write "<tr><td align=right>Klant</td><td><input type='tekst'

name='Klant' value=" & objOrderstatusRS.Fields("Klant") & "></td></tr>"

Response.Write "<tr><td align=right>Orderdatum</td><td><input type='tekst'

name='Orderdatum' value=" & objOrderstatusRS.Fields("Orderdatum") &

"></td></tr>"

Response.Write "<tr><td align=right>Bestemming</td><td><input type='tekst'

name='Bestemming' value=" & objOrderstatusRS.Fields("Bestemming") &

"></td></tr>"

Response.Write "</table><br><input type='submit' name='submit'><input

type='reset' name='reset'></form>"





objOrderstatusRS.Close

Set objOrderstatusRS = Nothing

objConn.Close

Set objConn = Nothing



****************************************************************************

**



page 3(changebestelling2.asp):





Dim objConn

Dim strKlant, strOrderdatum, strBestemming, intOrderID



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

objConn.Open "DSN=Bestelling"



intOrderID = Request.Form("OrderID")

strKlant = Request.Form("Klant")

strOrderdatum = Request.Form("Orderdatum")

strBestemming = Request.Form("Bestemming")



strSQL = "UPDATE tblBestelling SET Klant = " & strKlant & ", Orderdatum = "

& strOrderdatum & ", Bestemming = " & strBestemming & " WHERE [OrderID] = "

& intOrderID

objConn.Execute(strSQL)



objConn.Close

Set objConn = Nothing





---

SoftArtisans helps developers build robust, scalable Web applications!

Excel Web reports, charts: http://www.softartisans.com/excelwriter.html

File uploads: http://www.softartisans.com/saf.html

Transactional file management: http://www.softartisans.com/saf1.html

Scalability: http://www.softartisans.com/saxsession.html

ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html








Message #5 by Imar Spaanjaars <Imar@S...> on Thu, 29 Mar 2001 18:02:03 +0200
I don't think so. "Bestelling" means "Order" in Dutch.



Creative thinking nevertheless ;-)



Imar





At 08:44 AM 3/29/2001 -0500, you wrote:

>Is it possible that the DSN file is called "Bestselling" instead of 

>"Bestelling" ??

>

>Tomm

>

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

> > From: Carolien Latupeirissa [mailto:clatupeirissa@h...]

> > Sent: Thursday, March 29, 2001 8:11 AM

> > To: ASP Databases

> > Subject: [asp_databases] trying to update a record.

> >

> >

> > Help!

> > I can't see what I'm doing wrong anymore.

> > I've rewritten my code about ten times already and it keeps coming back to

> > me with a unspecified error (Provider (0x80004005)).

> > I'm getting the error on the "objConn.Open "DSN=Bestelling"-line

> > Does somebody see what I'm nog seeing?

> >

> > Regards,

> > Carolien

> >

> > I've written 3 pages

> > ******************************************************************

> > **********

> > **

> > Page1:

> >

> > <form action="ChangeBestelling.asp" method=post>

> > Fill in an OrderID of the order you like to edit<br>

> > OrderID<input type="text" name="OrderID" size="20">

> > <input type="submit" name="Submit">

> > <input type="reset" name="Reset">

> > </form>

> >

> > ******************************************************************

> > **********

> > ******

> >

> > Page2 (changebestelling.asp):

> >

> > Dim intOrderID

> > intOrderID = Request.Form("OrderID")

> >

> > Dim objConn

> > Dim objOrderstatusRS

> > Dim strGetOrderstatus

> >

> > Set objConn = Server.CreateObject ("ADODB.Connection")

> >

> > objConn.Open "DSN=Bestelling"

> > Set objOrderstatusRS = Server.CreateObject ("ADODB.Recordset")

> >

> > strGetOrderstatus = "SELECT * FROM qryAll where [OrderID] = " & intOrderID

> > Set objOrderstatusRS = objConn.Execute(strGetOrderstatus)

> >

> > Response.Write "<form action='ChangeBestelling2.asp' method=post>"

> > Response.Write "<table border='1'>"

> > Response.Write "<tr><td align=right>OrderID</td><td><input type='tekst'

> > readonly name='OrderID' value=" & objOrderstatusRS.Fields("OrderID") &

> > "></td></tr>"

> > Response.Write "<tr><td align=right>Klant</td><td><input type='tekst'

> > name='Klant' value=" & objOrderstatusRS.Fields("Klant") & "></td></tr>"

> > Response.Write "<tr><td align=right>Orderdatum</td><td><input type='tekst'

> > name='Orderdatum' value=" & objOrderstatusRS.Fields("Orderdatum") &

> > "></td></tr>"

> > Response.Write "<tr><td align=right>Bestemming</td><td><input type='tekst'

> > name='Bestemming' value=" & objOrderstatusRS.Fields("Bestemming") &

> > "></td></tr>"

> > Response.Write "</table><br><input type='submit' name='submit'><input

> > type='reset' name='reset'></form>"

> >

> >

> > objOrderstatusRS.Close

> > Set objOrderstatusRS = Nothing

> > objConn.Close

> > Set objConn = Nothing

> >

> > ******************************************************************

> > **********

> > **

> >

> > page 3(changebestelling2.asp):

> >

> >

> > Dim objConn

> > Dim strKlant, strOrderdatum, strBestemming, intOrderID

> >

> > Set objConn = Server.CreateObject ("ADODB.Connection")

> > objConn.Open "DSN=Bestelling"

> >

> > intOrderID = Request.Form("OrderID")

> > strKlant = Request.Form("Klant")

> > strOrderdatum = Request.Form("Orderdatum")

> > strBestemming = Request.Form("Bestemming")

> >

> > strSQL = "UPDATE tblBestelling SET Klant = " & strKlant & ",

> > Orderdatum = "

> > & strOrderdatum & ", Bestemming = " & strBestemming & " WHERE

> > [OrderID] = "

> > & intOrderID

> > objConn.Execute(strSQL)

> >

> > objConn.Close

> > Set objConn = Nothing

> >

> >

> > ---

> > SoftArtisans helps developers build robust, scalable Web applications!

> > Excel Web reports, charts: http://www.softartisans.com/excelwriter.html

> > File uploads: http://www.softartisans.com/saf.html

> > Transactional file management: http://www.softartisans.com/saf1.html

> > Scalability: http://www.softartisans.com/saxsession.html

> > ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html




> > $subst('Email.Unsub')

> >

> >



Message #6 by "Tomm Matthis" <matthis@b...> on Fri, 30 Mar 2001 08:48:01 -0500
Opps.... pardon my ignorance....

I am but a worm ...



<grin>



Tomm



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

> From: Imar Spaanjaars [mailto:Imar@S...]

> Sent: Thursday, March 29, 2001 11:02 AM

> To: ASP Databases

> Subject: [asp_databases] RE: trying to update a record.

>

>

> I don't think so. "Bestelling" means "Order" in Dutch.

>

> Creative thinking nevertheless ;-)

>

> Imar

>

>

> At 08:44 AM 3/29/2001 -0500, you wrote:

> >Is it possible that the DSN file is called "Bestselling" instead of

> >"Bestelling" ??

> >

> >Tomm

> >

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

> > > From: Carolien Latupeirissa [mailto:clatupeirissa@h...]

> > > Sent: Thursday, March 29, 2001 8:11 AM

> > > To: ASP Databases

> > > Subject: [asp_databases] trying to update a record.

> > >

> > >

> > > Help!

> > > I can't see what I'm doing wrong anymore.

> > > I've rewritten my code about ten times already and it keeps

> coming back to

> > > me with a unspecified error (Provider (0x80004005)).

> > > I'm getting the error on the "objConn.Open "DSN=3DBestelling"-line

> > > Does somebody see what I'm nog seeing?

> > >

> > > Regards,

> > > Carolien

> > >

> > > I've written 3 pages

> > > ******************************************************************

> > > **********

> > > **

> > > Page1:

> > >

> > > <form action=3D"ChangeBestelling.asp" method=3Dpost>

> > > Fill in an OrderID of the order you like to edit<br>

> > > OrderID<input type=3D"text" name=3D"OrderID" size=3D"20">

> > > <input type=3D"submit" name=3D"Submit">

> > > <input type=3D"reset" name=3D"Reset">

> > > </form>

> > >

> > > ******************************************************************

> > > **********

> > > ******

> > >

> > > Page2 (changebestelling.asp):

> > >

> > > Dim intOrderID

> > > intOrderID =3D Request.Form("OrderID")

> > >

> > > Dim objConn

> > > Dim objOrderstatusRS

> > > Dim strGetOrderstatus

> > >

> > > Set objConn =3D Server.CreateObject ("ADODB.Connection")

> > >

> > > objConn.Open "DSN=3DBestelling"

> > > Set objOrderstatusRS =3D Server.CreateObject ("ADODB.Recordset")

> > >

> > > strGetOrderstatus =3D "SELECT * FROM qryAll where [OrderID] =3D "

> & intOrderID

> > > Set objOrderstatusRS =3D objConn.Execute(strGetOrderstatus)

> > >

> > > Response.Write "<form action=3D'ChangeBestelling2.asp' 

method=3Dpost>"

> > > Response.Write "<table border=3D'1'>"

> > > Response.Write "<tr><td align=3Dright>OrderID</td><td><input

> type=3D'tekst'

> > > readonly name=3D'OrderID' value=3D" & 

objOrderstatusRS.Fields("OrderID") &

> > > "></td></tr>"

> > > Response.Write "<tr><td align=3Dright>Klant</td><td><input 

type=3D'tekst'

> > > name=3D'Klant' value=3D" & objOrderstatusRS.Fields("Klant") &

> "></td></tr>"

> > > Response.Write "<tr><td align=3Dright>Orderdatum</td><td><input

> type=3D'tekst'

> > > name=3D'Orderdatum' value=3D" & 

objOrderstatusRS.Fields("Orderdatum") &

> > > "></td></tr>"

> > > Response.Write "<tr><td align=3Dright>Bestemming</td><td><input

> type=3D'tekst'

> > > name=3D'Bestemming' value=3D" & 

objOrderstatusRS.Fields("Bestemming") &

> > > "></td></tr>"

> > > Response.Write "</table><br><input type=3D'submit' 

name=3D'submit'><input

> > > type=3D'reset' name=3D'reset'></form>"

> > >

> > >

> > > objOrderstatusRS.Close

> > > Set objOrderstatusRS =3D Nothing

> > > objConn.Close

> > > Set objConn =3D Nothing

> > >

> > > ******************************************************************

> > > **********

> > > **

> > >

> > > page 3(changebestelling2.asp):

> > >

> > >

> > > Dim objConn

> > > Dim strKlant, strOrderdatum, strBestemming, intOrderID

> > >

> > > Set objConn =3D Server.CreateObject ("ADODB.Connection")

> > > objConn.Open "DSN=3DBestelling"

> > >

> > > intOrderID =3D Request.Form("OrderID")

> > > strKlant =3D Request.Form("Klant")

> > > strOrderdatum =3D Request.Form("Orderdatum")

> > > strBestemming =3D Request.Form("Bestemming")

> > >

> > > strSQL =3D "UPDATE tblBestelling SET Klant =3D " & strKlant & ",

> > > Orderdatum =3D "

> > > & strOrderdatum & ", Bestemming =3D " & strBestemming & " WHERE

> > > [OrderID] =3D "

> > > & intOrderID

> > > objConn.Execute(strSQL)

> > >

> > > objConn.Close

> > > Set objConn =3D Nothing

> > >

> > >

> > > ---

> > > SoftArtisans helps developers build robust, scalable Web 

applications!

> > > Excel Web reports, charts:

http://www.softartisans.com/excelwriter.html

> > File uploads: http://www.softartisans.com/saf.html

> > Transactional file management: http://www.softartisans.com/saf1.html

> > Scalability: http://www.softartisans.com/saxsession.html

> > ASPstudio value pack: 

http://www.softartisans.com/aspstudiosuite.html




> > $subst('Email.Unsub')

> >

> >



Message #7 by samimer@h... on Fri, 30 Mar 2001 22:57:49
God,It must have been a long day for you, but there is one other thing 

that you would like to check right now. Instead of



Response.Write "<tr><td align=3Dright>Klant</td><td><input

type='tekst'

name='Klant' value=" & objOrderstatusRS.Fields("Klant") & 

"></td></tr>"



You will like to surround your value in single quotes too like this



Response.Write "<tr><td align=right>Klant</td><td><input 

type='tekst'

name='Klant' value='" & objOrderstatusRS.Fields("Klant") & 

"'></td></tr>"



else if any of your field values have more than one word, it will be 

truncated as soon as it hits the first space....



Good luck







> Help!

> I can't see what I'm doing wrong anymore.

> I've rewritten my code about ten times already and it keeps coming back 

to

> me with a unspecified error (Provider (0x80004005)).

> I'm getting the error on the "objConn.Open "DSN=Bestelling"-line

> Does somebody see what I'm nog seeing?

> 

> Regards,

> Carolien

> 

> I've written 3 pages

> 

***************************************************************************

*

> **

> Page1:

> 

> <form action="ChangeBestelling.asp" method=post>

> Fill in an OrderID of the order you like to edit<br>

> OrderID<input type="text" name="OrderID" size="20">

> <input type="submit" name="Submit">

> <input type="reset" name="Reset">

> </form>

> 

> 

***************************************************************************

*

> ******

> 

> Page2 (changebestelling.asp):

> 

> Dim intOrderID

> intOrderID = Request.Form("OrderID")

> 

> Dim objConn

> Dim objOrderstatusRS

> Dim strGetOrderstatus

> 

> Set objConn = Server.CreateObject ("ADODB.Connection")

> 

> objConn.Open "DSN=Bestelling"

> Set objOrderstatusRS = Server.CreateObject ("ADODB.Recordset")

> 

> strGetOrderstatus = "SELECT * FROM qryAll where [OrderID] = " & 

intOrderID

> Set objOrderstatusRS = objConn.Execute(strGetOrderstatus)

> 

> Response.Write "<form action='ChangeBestelling2.asp' method=post>"

> Response.Write "<table border='1'>"

> Response.Write "<tr><td align=right>OrderID</td><td><input type='tekst'

> readonly name='OrderID' value=" & objOrderstatusRS.Fields("OrderID") &

> "></td></tr>"

> Response.Write "<tr><td align=right>Klant</td><td><input type='tekst'

> name='Klant' value=" & objOrderstatusRS.Fields("Klant") & "></td></tr>"

> Response.Write "<tr><td align=right>Orderdatum</td><td><input 

type='tekst'

> name='Orderdatum' value=" & objOrderstatusRS.Fields("Orderdatum") &

> "></td></tr>"

> Response.Write "<tr><td align=right>Bestemming</td><td><input 

type='tekst'

> name='Bestemming' value=" & objOrderstatusRS.Fields("Bestemming") &

> "></td></tr>"

> Response.Write "</table><br><input type='submit' name='submit'><input

> type='reset' name='reset'></form>"

> 

> 

> objOrderstatusRS.Close

> Set objOrderstatusRS = Nothing

> objConn.Close

> Set objConn = Nothing

> 

> 

***************************************************************************

*

> **

> 

> page 3(changebestelling2.asp):

> 

> 

> Dim objConn

> Dim strKlant, strOrderdatum, strBestemming, intOrderID

> 

> Set objConn = Server.CreateObject ("ADODB.Connection")

> objConn.Open "DSN=Bestelling"

> 

> intOrderID = Request.Form("OrderID")

> strKlant = Request.Form("Klant")

> strOrderdatum = Request.Form("Orderdatum")

> strBestemming = Request.Form("Bestemming")

> 

> strSQL = "UPDATE tblBestelling SET Klant = " & strKlant & ", Orderdatum 

= "

> & strOrderdatum & ", Bestemming = " & strBestemming & " WHERE [OrderID] 

= "

> & intOrderID

> objConn.Execute(strSQL)

> 

> objConn.Close

> Set objConn = Nothing

> 


  Return to Index