CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 last record

Print topic Send  topic

Author Message
P.Barres
Posted: 01/21/2002, 1:11 AM

hi,

I saw in http://www.gotocode.com/art.asp?art_id=80&
how to retrieve the autoincrement field ...

I'm in trouble after 1 week this code don't work ..hav this code and the field idami are not wrote in the table liaison .

idami is my pk in table basami.

pkSQL = "select idami from basami where email = “ & ToSQL(fldemail, “Text”)"
openrs rs1, sSQL
last = GetValue(rs1, "idami")

cn.execute("insert into liaison (" & _
"[idetab]," & _
"[idami])" & _
" values (" & _
ToSQL(fldpidetab, "Number") & "," & _
ToSQL(last, "Number") & _
")")

when i replace
openrs rs1, sSQL with openrs rs1, pkSQL i receive this error :

Microsoft JET Database Engine erreur '80040e14'

Undefined function 'ToSQL' in expression.

/copain/Common.asp, ligne 33
p.barres
Posted: 01/21/2002, 1:43 AM

and if i try :
pkSQL = "select idami from basami where email = “ & ToSQL(fldemail, “Text”)
openrs rs1, pkSQL
last = GetValue(rs1, "idami")

i receive :
Erreur de compilation Microsoft VBScript erreur '800a0409'

Constante chaine non terminee

/copain/AjoutAmi.asp, ligne 449

pkSQL = "select idami from basami where email = “ & ToSQL(fldemail, “Text”)
---------------------------------------------------------------------------^
where Constante chaine non terminee string not terminated ??? ( apologize for my poor English)
Alex Alexapolsky
Posted: 01/21/2002, 1:47 AM

This line contains a syntax error
pkSQL = "select idami from basami where email = “ & ToSQL(fldemail, “Text”)"
this line doesn't
pkSQL = "select idami from basami where email = “ & ToSQL(fldemail, “Text”)
p.barres
Posted: 01/21/2002, 1:56 AM


thx alex ..but see above ..i also try this syntax ..with string error ;( ...

I m really tired ..this code seems so simple ...
Silvercat
Posted: 01/21/2002, 3:38 AM

make sure you use " and not “ & ”

pkSQL = "select idami from basami where email = “ & ToSQL(fldemail, “Text”)

try

pkSQL = "select idami from basami where email = " & ToSQL(fldemail, "Text")
p.barres
Posted: 01/21/2002, 3:48 AM

thx alex ...
now this code work well ;))

damned code " and “
we dont see difference in article

   


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.