|
 |
asp_databases thread: Update message erreur
Message #1 by "Hassayoune Mohamed-Ali" <mhassayoun@y...> on Thu, 19 Jul 2001 08:36:50
|
|
Hi,
the SQL statement :
******** The Clssfd.asp file **************
<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\fichiers
communs\system\ado\msado15.dll" -->
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Dali"
If Session("blnValidUser") = True and
Session("PersonID") = "" Then
Dim rsPersonIDCheck
Set rsPersonIDCheck
Server.CreateObject("ADODB.Recordset")
Dim strSQL
strSQL = "SELECT PersonID FROM Person " & _
"WHERE EMailAddress = '" &
Session("EMailAddress") & "';"
rsPersonIDCheck.Open strSQL, objConn
If rsPersonIDCheck.EOF Then
Session("blnValidUser") = False
Else
Session("PersonID")
rsPersonIDCheck("PersonID")
End If
rsPersonIDCheck.Close
Set rsPersonIDCheck = Nothing
End If
%>
*********
<!--#include file="Clssfd.asp"-->
<%
Dim rsUsers
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "Immobilier", objConn,
adOpenForwardOnly, adLockOptimistic, adCmdTable
If rsUsers.EOF Then
' User not found
rsUsers.AddNew
' ...so add a new record
End if
rsUsers("Catégorie") = CStr(Request.Form("categorie"))
rsUsers("Localisation") = CStr(Request.Form("localisation"))
rsUsers("Opération") =CStr(Request.Form("operation"))
rsUsers("Remarque") = CStr(Request.Form("remarque"))
rsUsers("Téléphone") =CStr(Request.Form("telephone"))
rsUsers("e-mail") = CStr(Request.Form("email"))
rsUsers.Update
Dim strName, strValue
' create session variables
For each strField in rsUsers.Fields
strName = strField.Name
strValue = strField.value
Session(strName) = strValue
Next
Session("blnValidUser") = True ' declare
that current user is validated
Response.Redirect "MenuForRegisteredUsers.asp"
%>
**********
Message error:
> : Microfoft OLEDB Provider for ODBC Drivers
> : erreur'80004005'
> : [Microsoft] Pilote ODBC Microsoft Access] erreur
> de
> : syntax in instruction Update.
Message #2 by Mike McPheat <mmcpheat@s...> on Thu, 19 Jul 2001 17:06:03 +0800
|
|
Maybe,
rsUsers("Cat=E9gorie").value =3D CStr(Request.Form("categorie"))
etc..
Message #3 by Steve Carter <Steve.Carter@t...> on Thu, 19 Jul 2001 10:49:31 +0100
|
|
Are you sure that the error is happening here?
I don't see an 'update' in the code :-/
> -----Original Message-----
> From: Hassayoune Mohamed-Ali [mailto:mhassayoun@y...]
> Sent: 19 July 2001 09:37
> To: ASP Databases
> Subject: [asp_databases] Update message erreur
>
>
> Hi,
>
>
> the SQL statement :
>
> ******** The Clssfd.asp file **************
>
> <!-- METADATA TYPE=3D"typelib"
> FILE=3D"C:\Program Files\fichiers
> communs\system\ado\msado15.dll" -->
>
> <%
> Dim objConn
> Set objConn =3D Server.CreateObject("ADODB.Connection")
> objConn.Open "Dali"
>
> If Session("blnValidUser") =3D True and
> Session("PersonID") =3D "" Then
> Dim rsPersonIDCheck
> Set rsPersonIDCheck =3D
> Server.CreateObject("ADODB.Recordset")
> Dim strSQL
> strSQL =3D "SELECT PersonID FROM Person " & _
> "WHERE EMailAddress =3D '" &
> Session("EMailAddress") & "';"
> rsPersonIDCheck.Open strSQL, objConn
> If rsPersonIDCheck.EOF Then
> Session("blnValidUser") =3D False
> Else
> Session("PersonID") =3D
> rsPersonIDCheck("PersonID")
> End If
> rsPersonIDCheck.Close
> Set rsPersonIDCheck =3D Nothing
> End If
> %>
>
>
> *********
> <!--#include file=3D"Clssfd.asp"-->
> <%
> Dim rsUsers
> =09
> Set rsUsers =3D Server.CreateObject("ADODB.Recordset")
> rsUsers.Open "Immobilier", objConn,
> adOpenForwardOnly, adLockOptimistic, adCmdTable
>
> If rsUsers.EOF Then
> ' User not found
>
> rsUsers.AddNew
> ' ...so add a new record
>
> End if
>
> rsUsers("Cat=E9gorie") =3D CStr(Request.Form("categorie"))
> rsUsers("Localisation") =3D CStr(Request.Form("localisation"))
> rsUsers("Op=E9ration") =3DCStr(Request.Form("operation"))
> rsUsers("Remarque") =3D CStr(Request.Form("remarque"))
> rsUsers("T=E9l=E9phone") =3DCStr(Request.Form("telephone"))
> rsUsers("e-mail") =3D CStr(Request.Form("email"))
> rsUsers.Update
>
>
> Dim strName, strValue
> ' create session variables
> For each strField in rsUsers.Fields
> strName =3D strField.Name
> strValue =3D strField.value
> Session(strName) =3D strValue
> Next
> Session("blnValidUser") =3D True ' declare
> that current user is validated
> Response.Redirect "MenuForRegisteredUsers.asp"
> %>
> **********
> Message error:
>
> > : Microfoft OLEDB Provider for ODBC Drivers
> > : erreur'80004005'
> > : [Microsoft] Pilote ODBC Microsoft Access] erreur
> > de
> > : syntax in instruction Update.
>
>
Message #4 by =?iso-8859-1?q?Med-Ali=20Hassayoun?= <mhassayoun@y...> on Thu, 19 Jul 2001 13:19:43 +0200 (CEST)
|
|
--- Steve Carter <Steve.Carter@t...> a
écrit : > Are you sure that the error is happening
here?
> I don't see an 'update' in the code
the update is in code see
(****************Update************) down
>
> > -----Original Message-----
> > From: Hassayoune Mohamed-Ali
> [mailto:mhassayoun@y...]
> > Sent: 19 July 2001 09:37
> > To: ASP Databases
> > Subject: [asp_databases] Update message erreur
> >
> >
> > Hi,
> >
> >
> > the SQL statement :
> >
> > ******** The Clssfd.asp file **************
> >
> > <!-- METADATA TYPE="typelib"
> > FILE="C:\Program Files\fichiers
> > communs\system\ado\msado15.dll" -->
> >
> > <%
> > Dim objConn
> > Set objConn =
> Server.CreateObject("ADODB.Connection")
> > objConn.Open "Dali"
> >
> > If Session("blnValidUser") = True and
> > Session("PersonID") = "" Then
> > Dim rsPersonIDCheck
> > Set rsPersonIDCheck
> > Server.CreateObject("ADODB.Recordset")
> > Dim strSQL
> > strSQL = "SELECT PersonID FROM Person " & _
> > "WHERE EMailAddress = '" &
> > Session("EMailAddress") & "';"
> > rsPersonIDCheck.Open strSQL, objConn
> > If rsPersonIDCheck.EOF Then
> > Session("blnValidUser") = False
> > Else
> > Session("PersonID")
> > rsPersonIDCheck("PersonID")
> > End If
> > rsPersonIDCheck.Close
> > Set rsPersonIDCheck = Nothing
> > End If
> > %>
> >
> >
> > *********
> > <!--#include file="Clssfd.asp"-->
> > <%
> > Dim rsUsers
> >
> > Set rsUsers
> Server.CreateObject("ADODB.Recordset")
> > rsUsers.Open "Immobilier", objConn,
> > adOpenForwardOnly, adLockOptimistic, adCmdTable
> >
> > If rsUsers.EOF Then
>
> > ' User not found
> >
> > rsUsers.AddNew
>
> > ' ...so add a new record
>
> >
> > End if
> >
> > rsUsers("Catégorie")
> CStr(Request.Form("categorie"))
> > rsUsers("Localisation")
> CStr(Request.Form("localisation"))
> > rsUsers("Opération")
> =CStr(Request.Form("operation"))
> > rsUsers("Remarque")
> CStr(Request.Form("remarque"))
> > rsUsers("Téléphone")
> =CStr(Request.Form("telephone"))
> > rsUsers("e-mail") = CStr(Request.Form("email"))
************************update*****************
> > rsUsers.Update
> >
> >
> > Dim strName, strValue
>
> > ' create session variables
> > For each strField in rsUsers.Fields
> > strName = strField.Name
> > strValue = strField.value
> > Session(strName) = strValue
> > Next
> > Session("blnValidUser") = True '
> declare
> > that current user is validated
> > Response.Redirect "MenuForRegisteredUsers.asp"
> > %>
> > **********
> > Message error:
> >
> > > : Microfoft OLEDB Provider for ODBC Drivers
> > > : erreur'80004005'
> > > : [Microsoft] Pilote ODBC Microsoft Access]
> erreur
> > > de
> > > : syntax in instruction Update.
> >
> >
>
Message #5 by Steve Carter <Steve.Carter@t...> on Thu, 19 Jul 2001 12:56:11 +0100
|
|
Yes, I saw that, but cannot imagine getting un "erreur
de syntax" from this. Usually 'syntax' implies SQL, and
that is an ADO call so now I'm wondering whether the error
text has been badly translated. 80004005 means unspecified
error so it ay be that the internationalisation of your
driver resulted in misleading text. Try
http://msdn.microsoft.com/library/default.asp?URL=3D/library/en-us/dn_vo
ices_w
ebmen/html/webmen110498.asp
or go to
http://msdn.microsoft.com/library/default.asp?URL=3D/library/en-us/dn_vo
ices_w
ebmen/html/webmen110498.asp and search for 80004005
Cheers,
Steve.
> -----Original Message-----
> From: Med-Ali Hassayoun [mailto:mhassayoun@y...]
> Sent: 19 July 2001 12:20
> To: ASP Databases
> Subject: [asp_databases] RE: Update message erreur
>
>
> --- Steve Carter <Steve.Carter@t...> a
> =E9crit=A0: > Are you sure that the error is happening
> here?
> > I don't see an 'update' in the code
>
> the update is in code see
> (****************Update************) down
Message #6 by =?iso-8859-1?q?Med-Ali=20Hassayoun?= <mhassayoun@y...> on Thu, 19 Jul 2001 15:43:20 +0200 (CEST)
|
|
I am used the book examples "initiatiation to ASP 3.0"
, is not something special. the thing that i haven't
understand is when i use the normal connection like
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " &
_
"Data Source= C:\Mesdocuments\Dali.mdb"
is working well and when i change to DSN a error
message is produced. Have you an explication to this?
thanks
--- Steve Carter <Steve.Carter@t...> a
écrit : > Yes, I saw that, but cannot imagine getting
un
> "erreur
> de syntax" from this. Usually 'syntax' implies SQL,
> and
> that is an ADO call so now I'm wondering whether the
> error
> text has been badly translated. 80004005 means
> unspecified
> error so it ay be that the internationalisation of
> your
> driver resulted in misleading text. Try
>
>
http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dn_voices_w
> ebmen/html/webmen110498.asp
>
> or go to
>
http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dn_voices_w
> ebmen/html/webmen110498.asp and search for 80004005
>
> Cheers,
>
> Steve.
>
> > -----Original Message-----
> > From: Med-Ali Hassayoun
> [mailto:mhassayoun@y...]
> > Sent: 19 July 2001 12:20
> > To: ASP Databases
> > Subject: [asp_databases] RE: Update message erreur
> >
> >
> > --- Steve Carter <Steve.Carter@t...>
> a
> > écrit : > Are you sure that the error is happening
> > here?
> > > I don't see an 'update' in the code
> >
> > the update is in code see
> > (****************Update************) down
>
Message #7 by "Tomm Matthis" <matthis@b...> on Thu, 19 Jul 2001 10:55:07 -0400
|
|
Does the DSN connection work in other applications?
In my opinion, the DSN-less connection is the preferred method.
-- Tomm
> -----Original Message-----
> From: Med-Ali Hassayoun [mailto:mhassayoun@y...]
> Sent: Thursday, July 19, 2001 9:43 AM
> To: ASP Databases
> Subject: [asp_databases] RE: Update message erreur
>
>
> I am used the book examples "initiatiation to ASP 3.0"
> , is not something special. the thing that i haven't
> understand is when i use the normal connection like
> objConn.Open "Provider=3DMicrosoft.Jet.OLEDB.4.0; " &
> _
> "Data Source=3D C:\Mesdocuments\Dali.mdb"
>
> is working well and when i change to DSN a error
> message is produced. Have you an explication to this?
>
> thanks
>
>
> --- Steve Carter <Steve.Carter@t...> a
> =E9crit=A0: > Yes, I saw that, but cannot imagine getting
> un
> > "erreur
> > de syntax" from this. Usually 'syntax' implies SQL,
> > and
> > that is an ADO call so now I'm wondering whether the
> > error
> > text has been badly translated. 80004005 means
> > unspecified
> > error so it ay be that the internationalisation of
> > your
> > driver resulted in misleading text. Try
> >
> >
> http://msdn.microsoft.com/library/default.asp?URL=3D/library/en-us/d
n_voices_w
> ebmen/html/webmen110498.asp
>
> or go to
>
http://msdn.microsoft.com/library/default.asp?URL=3D/library/en-us/dn_voi
ces_w
> ebmen/html/webmen110498.asp and search for 80004005
>
> Cheers,
>
> Steve.
>
> > -----Original Message-----
> > From: Med-Ali Hassayoun
> [mailto:mhassayoun@y...]
> > Sent: 19 July 2001 12:20
> > To: ASP Databases
> > Subject: [asp_databases] RE: Update message erreur
> >
> >
> > --- Steve Carter <Steve.Carter@t...>
> a
> > =E9crit=A0: > Are you sure that the error is happening
> > here?
> > > I don't see an 'update' in the code
> >
> > the update is in code see
> > (****************Update************) down
>
Message #8 by =?iso-8859-1?q?Med-Ali=20Hassayoun?= <mhassayoun@y...> on Fri, 20 Jul 2001 09:34:12 +0200 (CEST)
|
|
Hello,
>Does the DSN connection work in other applications?
yes DSN connection work well with Select instruction.
> In my opinion, the DSN-less connection is the
> preferred method.
What you mean with DSN-less connection?
have a nice day
>
> -- Tomm
>
> > -----Original Message-----
> > From: Med-Ali Hassayoun
> [mailto:mhassayoun@y...]
> > Sent: Thursday, July 19, 2001 9:43 AM
> > To: ASP Databases
> > Subject: [asp_databases] RE: Update message erreur
> >
> >
> > I am used the book examples "initiatiation to ASP
> 3.0"
> > , is not something special. the thing that i
> haven't
> > understand is when i use the normal connection
> like
> > objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; "
> &
> > _
> > "Data Source= C:\Mesdocuments\Dali.mdb"
> >
> > is working well and when i change to DSN a error
> > message is produced. Have you an explication to
> this?
> >
> > thanks
> >
> >
> > --- Steve Carter <Steve.Carter@t...>
> a
> > écrit : > Yes, I saw that, but cannot imagine
> getting
> > un
> > > "erreur
> > > de syntax" from this. Usually 'syntax' implies
> SQL,
> > > and
> > > that is an ADO call so now I'm wondering whether
> the
> > > error
> > > text has been badly translated. 80004005 means
> > > unspecified
> > > error so it ay be that the internationalisation
> of
> > > your
> > > driver resulted in misleading text. Try
> > >
> > >
> >
>
http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/d
> n_voices_w
> > ebmen/html/webmen110498.asp
> >
> > or go to
> >
>
http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dn_voices_w
> > ebmen/html/webmen110498.asp and search for
> 80004005
> >
> > Cheers,
> >
> > Steve.
> >
> > > -----Original Message-----
> > > From: Med-Ali Hassayoun
> > [mailto:mhassayoun@y...]
> > > Sent: 19 July 2001 12:20
> > > To: ASP Databases
> > > Subject: [asp_databases] RE: Update message
> erreur
> > >
> > >
> > > --- Steve Carter
> <Steve.Carter@t...>
> > a
> > > écrit : > Are you sure that the error is
> happening
> > > here?
> > > > I don't see an 'update' in the code
> > >
> > > the update is in code see
> > > (****************Update************) down
Message #9 by "Tomm Matthis" <matthis@b...> on Fri, 20 Jul 2001 09:35:29 -0400
|
|
It what you refer to as a "normal connection" in your earlier post...
--> objConn.Open "Provider=3DMicrosoft.Jet.OLEDB.4.0; " & "Data
Source=3D C:\Mesdocuments\Dali.mdb"
-- Tomm
> -----Original Message-----
> From: Med-Ali Hassayoun [mailto:mhassayoun@y...]
> Sent: Friday, July 20, 2001 3:34 AM
> To: ASP Databases
> Subject: [asp_databases] RE: Update message erreur
>
>
> Hello,
>
> >Does the DSN connection work in other applications?
> yes DSN connection work well with Select instruction.
>
> > In my opinion, the DSN-less connection is the
> > preferred method.
> What you mean with DSN-less connection?
>
> have a nice day
> >
> > -- Tomm
> >
> > > -----Original Message-----
> > > From: Med-Ali Hassayoun
> > [mailto:mhassayoun@y...]
> > > Sent: Thursday, July 19, 2001 9:43 AM
> > > To: ASP Databases
> > > Subject: [asp_databases] RE: Update message erreur
> > >
> > >
> > > I am used the book examples "initiatiation to ASP
> > 3.0"
> > > , is not something special. the thing that i
> > haven't
> > > understand is when i use the normal connection
> > like
> > > objConn.Open "Provider=3DMicrosoft.Jet.OLEDB.4.0; "
> > &
> > > _
> > > "Data Source=3D C:\Mesdocuments\Dali.mdb"
> > >
> > > is working well and when i change to DSN a error
> > > message is produced. Have you an explication to
> > this?
> > >
> > > thanks
> > >
> > >
> > > --- Steve Carter <Steve.Carter@t...>
> > a
> > > =E9crit=A0: > Yes, I saw that, but cannot imagine
> > getting
> > > un
> > > > "erreur
> > > > de syntax" from this. Usually 'syntax' implies
> > SQL,
> > > > and
> > > > that is an ADO call so now I'm wondering whether
> > the
> > > > error
> > > > text has been badly translated. 80004005 means
> > > > unspecified
> > > > error so it ay be that the internationalisation
> > of
> > > > your
> > > > driver resulted in misleading text. Try
> > > >
> > > >
> > >
> >
> http://msdn.microsoft.com/library/default.asp?URL=3D/library/en-us/d
> > n_voices_w
> > > ebmen/html/webmen110498.asp
> > >
> > > or go to
> > >
> >
> http://msdn.microsoft.com/library/default.asp?URL=3D/library/en-us/d
n_voices_w
> > ebmen/html/webmen110498.asp and search for
> 80004005
> >
> > Cheers,
> >
> > Steve.
> >
> > > -----Original Message-----
> > > From: Med-Ali Hassayoun
> > [mailto:mhassayoun@y...]
> > > Sent: 19 July 2001 12:20
> > > To: ASP Databases
> > > Subject: [asp_databases] RE: Update message
> erreur
> > >
> > >
> > > --- Steve Carter
> <Steve.Carter@t...>
> > a
> > > =E9crit=A0: > Are you sure that the error is
> happening
> > > here?
> > > > I don't see an 'update' in the code
> > >
> > > the update is in code see
> > > (****************Update************) down
|
|
 |