CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Cool Parsing Error

Print topic Send  topic

Author Message
Sam M
Posted: 03/14/2002, 8:40 AM

Hello Everyone,
I'm having trouble updating from a form based on a grid.
I've gotten it to the point where the system is reading the records I'm trying to submit, but I'm getting an error

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (comma) in query expression 'autonumber=781, 469, 470, 471, 473, 782, 474, 475, 476, 783, 477, 478, 784, 479, 480, 785, 481, 482, 786, 483, 484, 486, 490, 492, 491, 488, 487, 489, 485, 787, 493, 494, 496, 499, 497, 498, 495, 788, 135, 500, 138, 137, 139, 141, 140, 136, 789, 142, 143, 14'.

/temp/phonebook2/editable_locations.asp, line 191

Even Though this could possibly be the coolest error I've ever seen, I would like it to go away.

I'm trying to pass variables to a recursive sub form which contains this code. The code itself is running on a before show event. I've tried open and custom show events for this, but the before show seems to work the best.

Here's the code I'm trying to use. Keep in mind that It is on a custom connection. The connection SAMCONNECT which seems to work in other places in the application, and the error I'm getting doesn't seem to be consistant with a connection error.



for each item in request.form
fname = request.form("firstname")
pnumber =request.form("phone_number")
sd=request.form("speed_dial")
ze=request.form("zip_extended")
hline=request.form("headline")
ID=request.form("ID")
hm=request.form("hmnty")

set batchupdate = Server.CreateObject("ADODB.Command")
batchupdate.ActiveConnection = SAMCONNECT
batchupdate.CommandText = "UPDATE phone_call SET firstname='"&fname&"', phone_number='"&pnumber&"', speed_dial='"&sd&"', zip_extended='"&ze&"', headline='"&hline&"', hmnty='"&hm&"' WHERE autonumber="&ID&""
batchupdate.Execute()
next

Any help would be awesome
Thanks everyone.
RIN
Posted: 03/15/2002, 12:33 AM

'for each item next is a loop maybe you got that
'autonumber= 1,2,3,4,5, and so on

'how about

ssql= "SELECT PHONE_CALL.* FROM PHONE_CALL "
set phoners_ = cn.execute(ssql)

' your update statement here supdate = "UPDATE ....
'........ blah blah blah
' outside loop

do

' continuation of your update stmt WHERE autonumber="&phoners_("ID")

cn.Execute supdate
phoners_.MoveNext
Loop until phoners_.EOF

'uncomment to clear garbage
'phoners_.Close
'Set phoners_ = Nothing
cvb
Posted: 03/15/2002, 2:14 AM

xcvbcvb
SamM
Posted: 03/24/2002, 1:10 AM

Thanks for the help,
I'll try that soon as I get back to work.
Cheers.
-SamM

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.