Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Access --> MySQL (ASP/VBScript) - Invalid string or buffer length


Message #1 by "David Lundin" <lists@s...> on Fri, 30 Nov 2001 00:25:20 -0000
Dear all,



I am turning my back on the Access database and converting my scripts to

using a MySQL one instead. This is causing me loads of trouble and I

hope someone can help!





"Invalid string or buffer length"



This error message pops up all the time when different scripts try to

update records in the Record Set.



Const adOpenStatic = 3

Const adLockOptimistic = 3



strConnect 

"driver={MySQL};server=a.b.c;uid=abcdefgh;pwd=********;database=abcdefgh

i"

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

Connect.Open strConnect 



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

Update = "SELECT vote, votedate, votemotivation FROM users WHERE ID = 3"

RecSet.Open Update, Connect, adOpenStatic, adLockOptimistic

RecSet("votemotivation") = Request.Form("votemotivation")

RecSet("vote") = Request.Form("vote")

RecSet("votedate") = Now

RecSet.Update '(line 79)

RecSet.Close

Set RecSet = Nothing



Connect.Close

Set Connect = Nothing





This throws the following error:



Microsoft OLE DB Provider for ODBC Drivers error '80004005' 



[Microsoft][ODBC Driver Manager] Invalid string or buffer length 



/editvote.asp, line 79 





I really can't get my head around this! What is wrong?



Cheers a lot guys,

David



Message #2 by "Breidenbach, Beth" <Beth.Breidenbach@g...> on Thu, 29 Nov 2001 19:30:42 -0500
Have you compared the max length of your input fields to the field length of

the database fields?



Beth



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

From: David Lundin [mailto:lists@s...]

Sent: Thursday, November 29, 2001 4:25 PM

To: ASP Databases

Subject: [asp_databases] Access --> MySQL (ASP/VBScript) - Invalid

string or buffer length





Dear all,



I am turning my back on the Access database and converting my scripts to

using a MySQL one instead. This is causing me loads of trouble and I

hope someone can help!





"Invalid string or buffer length"



This error message pops up all the time when different scripts try to

update records in the Record Set.



Const adOpenStatic = 3

Const adLockOptimistic = 3



strConnect 

"driver={MySQL};server=a.b.c;uid=abcdefgh;pwd=********;database=abcdefgh

i"

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

Connect.Open strConnect 



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

Update = "SELECT vote, votedate, votemotivation FROM users WHERE ID = 3"

RecSet.Open Update, Connect, adOpenStatic, adLockOptimistic

RecSet("votemotivation") = Request.Form("votemotivation")

RecSet("vote") = Request.Form("vote")

RecSet("votedate") = Now

RecSet.Update '(line 79)

RecSet.Close

Set RecSet = Nothing



Connect.Close

Set Connect = Nothing





This throws the following error:



Microsoft OLE DB Provider for ODBC Drivers error '80004005' 



[Microsoft][ODBC Driver Manager] Invalid string or buffer length 



/editvote.asp, line 79 





I really can't get my head around this! What is wrong?



Cheers a lot guys,

David





 



beth.breidenbach@g...


$subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks

Message #3 by David Cameron <dcameron@i...> on Fri, 30 Nov 2001 11:59:35 +1100
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C1793A.482A8136

Content-Type: text/plain



Have you tried to use a SQL UPDATE statement? Always a better option.



regards

David Cameron

nOw.b2b

dcameron@i...



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

From: David Lundin [mailto:lists@s...]

Sent: Friday, 30 November 2001 10:25 AM

To: ASP Databases

Subject: [asp_databases] Access --> MySQL (ASP/VBScript) - Invalid

string or buffer length





Dear all,



I am turning my back on the Access database and converting my scripts to

using a MySQL one instead. This is causing me loads of trouble and I

hope someone can help!





"Invalid string or buffer length"



This error message pops up all the time when different scripts try to

update records in the Record Set.



Const adOpenStatic = 3

Const adLockOptimistic = 3



strConnect 

"driver={MySQL};server=a.b.c;uid=abcdefgh;pwd=********;database=abcdefgh

i"

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

Connect.Open strConnect 



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

Update = "SELECT vote, votedate, votemotivation FROM users WHERE ID = 3"

RecSet.Open Update, Connect, adOpenStatic, adLockOptimistic

RecSet("votemotivation") = Request.Form("votemotivation")

RecSet("vote") = Request.Form("vote")

RecSet("votedate") = Now

RecSet.Update '(line 79)

RecSet.Close

Set RecSet = Nothing



Connect.Close

Set Connect = Nothing





This throws the following error:



Microsoft OLE DB Provider for ODBC Drivers error '80004005' 



[Microsoft][ODBC Driver Manager] Invalid string or buffer length 



/editvote.asp, line 79 





I really can't get my head around this! What is wrong?



Cheers a lot guys,

David





 




$subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks




Message #4 by "Reynolds, Josh" <Josh.Reynolds@e...> on Fri, 30 Nov 2001 13:04:50 -0500
there are lots of little weirdies about myodbc, I think mostly 

involving blob fields...here's the release notes:  

http://mysql.valueclick.com/Downloads/MyODBC/ReleaseNotes



Hope that helps.



josh



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

From: "David Lundin" <lists@s...>

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

Sent: Thursday, November 29, 2001 7:25 PM

Subject: [asp_databases] Access --> MySQL (ASP/VBScript) - Invalid 

string or buffer length





> Dear all,

>

> I am turning my back on the Access database and converting my scripts 

to

> using a MySQL one instead. This is causing me loads of trouble and I

> hope someone can help!

>

>

> "Invalid string or buffer length"

>

> This error message pops up all the time when different scripts try to

> update records in the Record Set.

>

> Const adOpenStatic =3D 3

> Const adLockOptimistic =3D 3

>

> strConnect =3D

> 

"driver=3D{MySQL};server=3Da.b.c;uid=3Dabcdefgh;pwd=3D********;database=3D

abcdefgh

> i"

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

> Connect.Open strConnect

>

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

> Update =3D "SELECT vote, votedate, votemotivation FROM users WHERE ID 

=3D 3"

> RecSet.Open Update, Connect, adOpenStatic, adLockOptimistic

> RecSet("votemotivation") =3D Request.Form("votemotivation")

> RecSet("vote") =3D Request.Form("vote")

> RecSet("votedate") =3D Now

> RecSet.Update '(line 79)

> RecSet.Close

> Set RecSet =3D Nothing

>

> Connect.Close

> Set Connect =3D Nothing

>

>

> This throws the following error:

>

> Microsoft OLE DB Provider for ODBC Drivers error '80004005'

>

> [Microsoft][ODBC Driver Manager] Invalid string or buffer length

>

> /editvote.asp, line 79

>

>

> I really can't get my head around this! What is wrong?

>

> Cheers a lot guys,

> David

>

>

> 



josh.reynolds@e...


$subst('Email.Unsub')

>

> Read the future with ebooks at B&N

> 

http://service.bfast.com/bfast/click?bfmid=3D2181&sourceid=3D38934667&ca

tegoryid=3Drn_ebooks


  Return to Index