Home | Advertising Info19 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Sunday, April 28, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Database Issues
 PowerASP Code Help Area : Classic ASP - Database Issues
Subject Info: Please help!! myconn.execute problem A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
Djadja Zloj
Newbie
Newbie
Avatar

Joined: June/03/2005
Location: Sweden
Online Status: Offline
Info: 5
Added: June/03/2005 at 10:54am | IP Logged Quote Djadja Zloj

I get an error in "MyConn.Execute SQL_sjreg,,128" line.

Says " Character in the end of SQL...."

What to do?

It works when I use "MyConn.open  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";"
MyConn.open "

 

 

 

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

MyConn.open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbPath

If request.querystring("spara") = "ok" Then  '///SPARA FORMULÄRET

SQL_sjreg="UPDATE SJREGIS SET SJREGIS.AVR_OMR = '" & request.form("AVR_OMR") & "', SJREGIS.SJÖNAMN = '" & request.form("SJÖNAMN") & "', SJREGIS.EKOBL = " & nulla(request.form("EKOBL")) & ", SJREGIS.FLODOMRÅDE = '" & request.form("FLODOMRÅDE") & "', "
SQL_sjreg=SQL_sjreg & "SJREGIS.MAXDJUP = " & nulla(request.form("MAXDJUP")) & ", SJREGIS.MEDELDJUP = " & nulla(request.form("MEDELDJUP")) & ", SJREGIS.AVROMR = " & nulla(request.form("AVROMR")) & ", SJREGIS.AVRTAL = " & nulla(request.form("AVRTAL")) & ", "
SQL_sjreg=SQL_sjreg & "SJREGIS.MEDELQ = " & nulla(request.form("MEDELQ")) & ", SJREGIS.ANM = '" & request.form("ANM") & "', SJREGIS.STATUS = '" & request.form("STATUS") & "', SJREGIS.OMSTID = " & nulla(request.form("OMSTID")) & ", "
SQL_sjreg=SQL_sjreg & "SJREGIS.VOLYM = " & nulla(request.form("VOLYM")) & ", SJREGIS.SJÖYTA = " & nulla(request.form("SJÖYTA")) & ", SJREGIS.STRANDLÄNGD = " & nulla(request.form("STRANDLÄNGD")) & ", SJREGIS.SMHI_BET = '" & request.form("SMHI_BET") & "', "
SQL_sjreg=SQL_sjreg & "SJREGIS.KLASS = '" & request.form("KLASS") & "', SJREGIS.FLIKIGHETSTAL = " & nulla(request.form("FLIKIGHETSTAL")) & " "
SQL_sjreg=SQL_sjreg & "WHERE (((SJREGIS.sjoID)='" & sjoID & "'));"

 


MyConn.Execute SQL_sjreg,,128

MyConn.Close
Set MyConn = Nothing


End if



__________________
BR D.Z.
Back to Top View Djadja Zloj's Profile Search for other info by Djadja Zloj
 
cwilliams
Admin Group
Admin Group
Avatar

Joined: April/26/2004
Location: United States
Online Status: Offline
Info: 137
Added: June/03/2005 at 11:42am | IP Logged Quote cwilliams

put this right before MyConn.Execute SQL_sjreg,,128

response. write SQL_sjreg
response.end

then you can at least see what the generated SQL string looks like and then can fix it from there

this is how you debug things like thia

 



__________________


Chris Williams
http://www.PowerASP.com
Back to Top View cwilliams's Profile Search for other info by cwilliams
 
Djadja Zloj
Newbie
Newbie
Avatar

Joined: June/03/2005
Location: Sweden
Online Status: Offline
Info: 5
Added: June/07/2005 at 7:51am | IP Logged Quote Djadja Zloj

Thanks!



__________________
BR D.Z.
Back to Top View Djadja Zloj's Profile Search for other info by Djadja Zloj
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com