Help needed : error in "INSERT INTO"

L

Luc Dal

Hello,

I've serious problem using ASP under WindowsXP sp2.
I get the following reply (sorry it's in french)
Erreur de compilation Microsoft VBScript error '800a0401'

Fin d'instruction attendue

/iisHelp/common/500-100.asp, line 11

Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP
Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^Microsoft
JET Database Engine error '80040e14'

Erreur de syntaxe dans l'instruction INSERT INTO.

/cytiserw/Include/commun.asp, line 49

Here are the instructions in vbscript :

'=====================================================
Public sub OuvreConnexion(nomcomplet,strMotdePasse)
Dim Connstr
Set Conn = Server.CreateObject("ADODB.Connection")
Set Comm = Server.CreateObject("ADODB.Command")
Connstr = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & nomcomplet &";" & _
"Jet OLEDB:Database Password=" & strMotdePasse
Response.Write(Connstr)
Conn.Open Connstr
Set Comm.ActiveConnection = Conn
end sub
'=====================================================
Public Sub FermeConnexion()
Set Rec_Set = Nothing
Set Comm = Nothing
Conn.Close
Set Conn = Nothing
End Sub
'=====================================================
Public Sub MAJ_BaseIP()
dim ip,str,sql
str=""
call OuvreConnexion(session("chemin")&Utilisateurs,MotdePasseBdd)
ip=Request.ServerVariables("REMOTE_ADDR")
Response.Write(ip)
sql="insert numIP into visites Values('"&ip&"')"
conn.execute sql
call FermeConnexion
end sub
********************************************************************************

It worked perfectly well before sp2.

Where's the bug (if any) in my lines ?
Thanks for your help.

Lu
 
L

Luc Dal

Sorry

Hre's ethe good line :

sql="insert into visites (numIP) Values('"&ip&"')"
 
L

Luc Dal

Thanks,
But now i've the following error: (sorry, it' in french)


Erreur de compilation Microsoft VBScript error '800a0401'

Fin d'instruction attendue

/iisHelp/common/500-100.asp, line 16

If Response.Buffer Then Response.Clear Response.Status = "500 Erreur interne
du serveur" Response.ContentType = "text/html" Response.Expires = 0 End If
-----------------------------------------------------------------------------------------^Microsoft
JET Database Engine error '80004005'

L'opération doit utiliser une requête qui peut être mise à jour.

/cytiserw/Include/commun.asp, line 49



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

"Steven Burn" <[email protected]> a écrit dans le message de (e-mail address removed)...
Article #2400 Why do I get 80040E14 errors?
http://aspfaq.com/show.asp?id=2400

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
M

Mark Schupp

sql="insert into visites (numIP) Values('"&ip&"')"
response.write sql
response.end

do you get what you expected?
 
S

Steven Burn

For the first one;

http://aspfaq.com/show.asp?id=2363
http://aspfaq.com/show.asp?id=2414

........ and for the second (a very common but mis-interpreted error)

http://aspfaq.com/search.asp?q=80004005&type=ALL&category=0&numDays=0&order=1

Apologies for not being more helpful (my French is somewhat lacking... hopefully if the above does not help, one of the experts will come along and help (Bob, Aaron... where the heck are ya!))

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
L

Luc Dal

Yes but what I want it to execute the lines :

sql="insert into visites([numIP]) Values('"&cstr(ip)&"')"
conn.execute(sql)

And i get always the same reply (in french, sorry)
L'opération doit utiliser une requête qui peut être mise à jour.

I don't understand why (it worked well before the sp2)

Luc
 
L

Luc Dal

Thanks for your assistance, but unfortunaltely, it does'nt help me ...:)

Luc


"Steven Burn" <[email protected]> a écrit dans le message de (e-mail address removed)...
For the first one;

http://aspfaq.com/show.asp?id=2363
http://aspfaq.com/show.asp?id=2414

........ and for the second (a very common but mis-interpreted error)

http://aspfaq.com/search.asp?q=80004005&type=ALL&category=0&numDays=0&order=1

Apologies for not being more helpful (my French is somewhat lacking...
hopefully if the above does not help, one of the experts will come along and
help (Bob, Aaron... where the heck are ya!))

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
B

Bob Barrows [MVP]

http://www.aspfaq.com/show.asp?id=2062

You definitely have a permissions problem. You IUSR account must have Change
(Modify) permissions on the folder containing your database.

Luc said:
Yes but what I want it to execute the lines :

sql="insert into visites([numIP]) Values('"&cstr(ip)&"')"
conn.execute(sql)

And i get always the same reply (in french, sorry)
L'opération doit utiliser une requête qui peut être mise à jour.

I don't understand why (it worked well before the sp2)

Luc


Mark Schupp said:
sql="insert into visites (numIP) Values('"&ip&"')"
response.write sql
response.end

do you get what you expected?

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
****************************************************************************
****
 
L

Luc Dal

Thanks a lot !
I could solve my problem using the link you gave me !!!!

Luc


Bob Barrows said:
http://www.aspfaq.com/show.asp?id=2062

You definitely have a permissions problem. You IUSR account must have
Change
(Modify) permissions on the folder containing your database.

Luc said:
Yes but what I want it to execute the lines :

sql="insert into visites([numIP]) Values('"&cstr(ip)&"')"
conn.execute(sql)

And i get always the same reply (in french, sorry)
L'opération doit utiliser une requête qui peut être mise à jour.

I don't understand why (it worked well before the sp2)

Luc


Mark Schupp said:
sql="insert into visites (numIP) Values('"&ip&"')"
response.write sql
response.end

do you get what you expected?

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

Sorry

Hre's ethe good line :

sql="insert into visites (numIP) Values('"&ip&"')"



"Luc Dal" <[email protected]> a écrit dans le message de [email protected]...
Hello,

I've serious problem using ASP under WindowsXP sp2.
I get the following reply (sorry it's in french)
Erreur de compilation Microsoft VBScript error '800a0401'

Fin d'instruction attendue

/iisHelp/common/500-100.asp, line 11

Dim objASPError, blnErrorWritten, strServername, strServerIP,
strRemoteIP
Dim strMethod, lngPos, datNow, strQueryString, strURL
----------------------------------------------------------------------- ---^Microsoft
JET Database Engine error '80040e14'

Erreur de syntaxe dans l'instruction INSERT INTO.

/cytiserw/Include/commun.asp, line 49

Here are the instructions in vbscript :

'=====================================================
Public sub OuvreConnexion(nomcomplet,strMotdePasse)
Dim Connstr
Set Conn = Server.CreateObject("ADODB.Connection")
Set Comm = Server.CreateObject("ADODB.Command")
Connstr = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & nomcomplet &";" & _
"Jet OLEDB:Database Password=" & strMotdePasse
Response.Write(Connstr)
Conn.Open Connstr
Set Comm.ActiveConnection = Conn
end sub
'=====================================================
Public Sub FermeConnexion()
Set Rec_Set = Nothing
Set Comm = Nothing
Conn.Close
Set Conn = Nothing
End Sub
'=====================================================
Public Sub MAJ_BaseIP()
dim ip,str,sql
str=""
call OuvreConnexion(session("chemin")&Utilisateurs,MotdePasseBdd)
ip=Request.ServerVariables("REMOTE_ADDR")
Response.Write(ip)
sql="insert numIP into visites Values('"&ip&"')"
conn.execute sql
call FermeConnexion
end sub
****************************************************************************
****
It worked perfectly well before sp2.

Where's the bug (if any) in my lines ?
Thanks for your help.

Lu

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top