Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: error in from clause


Message #1 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 01:43:44 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_0006_01C17F89.C90BDED0

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 








Message #2 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 07:55:31 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_0000_01C17FBD.B5CCD110

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



do a response.write strSQL and you'll clearly see the problem ;-)



if you can't, repost (incl the result of the response.write) and i'll tell

you



-Kim

  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: 8. december 2001 07:44

  To: ASP Databases

  Subject: [asp_databases] error in from clause





  Can somebody help me with this error?







  Error Type:

  Microsoft JET Database Engine (0x80040E14)

  Syntax error in FROM clause.

  /RoomsStatus/CheckLogin2.asp, line 14







  This is the code:







  Dim strID



  strID = Request("UserID")



  dim rsUsers



  set rsUsers = Server.CreateObject("ADODB.Recordset")



  strSQL = "select  *  from Users" & _



  "where ID =  "  &  strID  &  ";"







  with strID actually being a numerical field










$subst('Email.Unsub').






Message #3 by "Joe Sabado" <joe.sabado@g...> on Fri, 7 Dec 2001 23:11:32 -0800
This is a multi-part message in MIME format.



------=_NextPart_000_0010_01C17F74.823DB2E0

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



put a space either after Users or before where



the way you have it now it's being read like this:



select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where



it's always a good idea to do a response.write strSQL to make sure your sql

statement is proper.



  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: Friday, December 07, 2001 10:44 PM

  To: ASP Databases

  Subject: [asp_databases] error in from clause





  Can somebody help me with this error?







  Error Type:

  Microsoft JET Database Engine (0x80040E14)

  Syntax error in FROM clause.

  /RoomsStatus/CheckLogin2.asp, line 14







  This is the code:







  Dim strID



  strID = Request("UserID")



  dim rsUsers



  set rsUsers = Server.CreateObject("ADODB.Recordset")



  strSQL = "select  *  from Users" & _



  "where ID =  "  &  strID  &  ";"







  with strID actually being a numerical field










$subst('Email.Unsub').






Message #4 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 02:04:28 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_000A_01C17F8C.AE9DF120

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Can't really do that since it never get's pass the string

initialization.

 

-----Original Message-----

From: Kim Iwan Hansen [mailto:kimiwan@k...] 

Sent: Saturday, December 08, 2001 1:56 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

do a response.write strSQL and you'll clearly see the problem ;-)

 

if you can't, repost (incl the result of the response.write) and i'll

tell you

 

-Kim

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: 8. december 2001 07:44

To: ASP Databases

Subject: [asp_databases] error in from clause

Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 








Message #5 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 02:09:59 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_0015_01C17F8D.73B89F00

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



That worked!

 

Thanks!!!

 

-----Original Message-----

From: Joe Sabado [mailto:joe.sabado@g...] 

Sent: Saturday, December 08, 2001 2:12 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

put a space either after Users or before where

 

the way you have it now it's being read like this:

 

select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where

 

it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Friday, December 07, 2001 10:44 PM

To: ASP Databases

Subject: [asp_databases] error in from clause

Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 








Message #6 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 02:14:13 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_001A_01C17F8E.0ACAA1E0

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



When I'm reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)

Should I have parentasys there as in Request("field")

Or does this even metter?

I'm getting a page that should load when ID is incorrect but I'm putting

the right id.

 

-----Original Message-----

From: Joe Sabado [mailto:joe.sabado@g...] 

Sent: Saturday, December 08, 2001 2:12 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

put a space either after Users or before where

 

the way you have it now it's being read like this:

 

select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where

 

it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Friday, December 07, 2001 10:44 PM

To: ASP Databases

Subject: [asp_databases] error in from clause

Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 








Message #7 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 08:21:54 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_0010_01C17FC1.6542B210

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



here's what you do:



strSQL = "bla bla bla"



and now, before you open your recordset etc., you put this:



response.write strSQL

response.end



that'll print your sql string and stop the execution of the script

immediately after



if you need to see what happens next - for instance if you're trying various

theories about what the problem might be - you do a response.flush instead

of response.end.  that'll send the printed sql string to the browser before

the error occurs and prevents it from displaying.



it's generally a good idea to do that as one of the first things when you

have problems like that :-)



although you got the answer already, you might as well try it on your

"healthy" sql string and see that it works :-)



-Kim



  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: 8. december 2001 08:04

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause





  Can't really do that since it never get's pass the string initialization.







  -----Original Message-----

  From: Kim Iwan Hansen [mailto:kimiwan@k...]

  Sent: Saturday, December 08, 2001 1:56 AM

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause







  do a response.write strSQL and you'll clearly see the problem ;-)







  if you can't, repost (incl the result of the response.write) and i'll tell

you







  -Kim



    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: 8. december 2001 07:44

    To: ASP Databases

    Subject: [asp_databases] error in from clause



    Can somebody help me with this error?







    Error Type:

    Microsoft JET Database Engine (0x80040E14)

    Syntax error in FROM clause.

    /RoomsStatus/CheckLogin2.asp, line 14







    This is the code:







    Dim strID



    strID = Request("UserID")



    dim rsUsers



    set rsUsers = Server.CreateObject("ADODB.Recordset")



    strSQL = "select  *  from Users" & _



    "where ID =  "  &  strID  &  ";"







    with strID actually being a numerical field










$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






Message #8 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 08:32:08 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_0018_01C17FC2.D3275DC0

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



response.write request("ID")

response.end



or if it's part of the sql string from before, printing that'll be even

better (as that's the value that's used there)





  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: 8. december 2001 08:14

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause





  When I'm reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)



  Should I have parentasys there as in Request("field")



  Or does this even metter?



  I'm getting a page that should load when ID is incorrect but I'm putting

the right id.







  -----Original Message-----

  From: Joe Sabado [mailto:joe.sabado@g...]

  Sent: Saturday, December 08, 2001 2:12 AM

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause







  put a space either after Users or before where







  the way you have it now it's being read like this:







  select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where







  it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.







    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: Friday, December 07, 2001 10:44 PM

    To: ASP Databases

    Subject: [asp_databases] error in from clause



    Can somebody help me with this error?







    Error Type:

    Microsoft JET Database Engine (0x80040E14)

    Syntax error in FROM clause.

    /RoomsStatus/CheckLogin2.asp, line 14







    This is the code:







    Dim strID



    strID = Request("UserID")



    dim rsUsers



    set rsUsers = Server.CreateObject("ADODB.Recordset")



    strSQL = "select  *  from Users" & _



    "where ID =  "  &  strID  &  ";"







    with strID actually being a numerical field










$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






Message #9 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 04:44:05 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_0001_01C17FA2.FB0FF100

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



I have an input form that verifies user input against the database.

 

If user omits to enter value for userID, I get the following error:

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error (missing operator) in query expression 'Users.ID ='.

/RoomsStatus/CheckLogin2.asp, line 12

 

If they enter the value of wrong type , a letter instead of the number

value, I get this:

 

Error Type:

Microsoft JET Database Engine (0x80040E10)

No value given for one or more required parameters.

/RoomsStatus/CheckLogin2.asp, line 12

 

I'm thinking how can I check for those values to be valid entries before

the form is sent but I'm not sure how. 

Any ideas?

 

Thanks!

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...] 

Sent: Saturday, December 08, 2001 2:14 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

When I'm reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)

Should I have parentasys there as in Request("field")

Or does this even metter?

I'm getting a page that should load when ID is incorrect but I'm putting

the right id.

 

-----Original Message-----

From: Joe Sabado [mailto:joe.sabado@g...] 

Sent: Saturday, December 08, 2001 2:12 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

put a space either after Users or before where

 

the way you have it now it's being read like this:

 

select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where

 

it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Friday, December 07, 2001 10:44 PM

To: ASP Databases

Subject: [asp_databases] error in from clause

Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 








Message #10 by "Eric Van Camp" <eric@a...> on Sat, 8 Dec 2001 13:09:52 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_003F_01C17FE9.9FDFDB00

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: 8bit



just use javascript to verify if filled in,and if the things filled in is a

character or if you want a number...

  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: Saturday, December 08, 2001 10:44

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause





  I have an input form that verifies user input against the database?







  If user omits to enter value for userID, I get the following error:







  Error Type:

  Microsoft JET Database Engine (0x80040E14)

  Syntax error (missing operator) in query expression 'Users.ID ='.

  /RoomsStatus/CheckLogin2.asp, line 12







  If they enter the value of wrong type , a letter instead of the number

value, I get this:







  Error Type:

  Microsoft JET Database Engine (0x80040E10)

  No value given for one or more required parameters.

  /RoomsStatus/CheckLogin2.asp, line 12







  I?m thinking how can I check for those values to be valid entries before

the form is sent but I?m not sure how.



  Any ideas?







  Thanks!







  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: Saturday, December 08, 2001 2:14 AM

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause







  When I?m reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)



  Should I have parentasys there as in Request(?field?)



  Or does this even metter?



  I?m getting a page that should load when ID is incorrect but I?m putting

the right id.







  -----Original Message-----

  From: Joe Sabado [mailto:joe.sabado@g...]

  Sent: Saturday, December 08, 2001 2:12 AM

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause







  put a space either after Users or before where







  the way you have it now it's being read like this:







  select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where







  it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.







    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: Friday, December 07, 2001 10:44 PM

    To: ASP Databases

    Subject: [asp_databases] error in from clause



    Can somebody help me with this error?







    Error Type:

    Microsoft JET Database Engine (0x80040E14)

    Syntax error in FROM clause.

    /RoomsStatus/CheckLogin2.asp, line 14







    This is the code:







    Dim strID



    strID = Request("UserID")



    dim rsUsers



    set rsUsers = Server.CreateObject("ADODB.Recordset")



    strSQL = "select  *  from Users" & _



    "where ID =  "  &  strID  &  ";"







    with strID actually being a numerical field










$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






Message #11 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 18:14:55 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_000A_01C18014.3CF6C0F0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: 8bit



it's best to do some kind of validation on the server side in addition to

the javascript - in case the user's on a browser that doesen't process the

javascript.



use isNumeric(intID) to validate that the id is actually a number.



if isNumeric(intID) then

    'look it up in the database



else

    'inform the user that he/she must enter a number for this to work!



end if



-Kim

  -----Original Message-----

  From: Eric Van Camp [mailto:eric@a...]

  Sent: 8. december 2001 13:10

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause





  just use javascript to verify if filled in,and if the things filled in is

a character or if you want a number...

    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: Saturday, December 08, 2001 10:44

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause





    I have an input form that verifies user input against the database?







    If user omits to enter value for userID, I get the following error:







    Error Type:

    Microsoft JET Database Engine (0x80040E14)

    Syntax error (missing operator) in query expression 'Users.ID ='.

    /RoomsStatus/CheckLogin2.asp, line 12







    If they enter the value of wrong type , a letter instead of the number

value, I get this:







    Error Type:

    Microsoft JET Database Engine (0x80040E10)

    No value given for one or more required parameters.

    /RoomsStatus/CheckLogin2.asp, line 12







    I?m thinking how can I check for those values to be valid entries before

the form is sent but I?m not sure how.



    Any ideas?







    Thanks!







    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: Saturday, December 08, 2001 2:14 AM

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause







    When I?m reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)



    Should I have parentasys there as in Request(?field?)



    Or does this even metter?



    I?m getting a page that should load when ID is incorrect but I?m putting

the right id.







    -----Original Message-----

    From: Joe Sabado [mailto:joe.sabado@g...]

    Sent: Saturday, December 08, 2001 2:12 AM

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause







    put a space either after Users or before where







    the way you have it now it's being read like this:







    select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where







    it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.







      -----Original Message-----

      From: Elizabeta Siljanovski [mailto:elizabetas@m...]

      Sent: Friday, December 07, 2001 10:44 PM

      To: ASP Databases

      Subject: [asp_databases] error in from clause



      Can somebody help me with this error?







      Error Type:

      Microsoft JET Database Engine (0x80040E14)

      Syntax error in FROM clause.

      /RoomsStatus/CheckLogin2.asp, line 14







      This is the code:







      Dim strID



      strID = Request("UserID")



      dim rsUsers



      set rsUsers = Server.CreateObject("ADODB.Recordset")



      strSQL = "select  *  from Users" & _



      "where ID =  "  &  strID  &  ";"







      with strID actually being a numerical field










$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').




$subst('Email.Unsub').






Message #12 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 13:12:15 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_0002_01C17FE9.F5443500

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



I figured I will have to do something like that, but when will the

function be checked?

 

On button submit? On form submit? Do you know of any examples where two

fields are validated both for the existence and data type? I've tried on

form submit but that didn't work. Should I have a function or a SUB and

where should it be in the code (before head?, within head?)

 

Thank you!

 

elizabeta

 

-----Original Message-----

From: Eric Van Camp [mailto:eric@a...] 

Sent: Saturday, December 08, 2001 7:10 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

just use javascript to verify if filled in,and if the things filled in

is a character or if you want a number...

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Saturday, December 08, 2001 10:44

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

I have an input form that verifies user input against the database.

 

If user omits to enter value for userID, I get the following error:

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error (missing operator) in query expression 'Users.ID ='.

/RoomsStatus/CheckLogin2.asp, line 12

 

If they enter the value of wrong type , a letter instead of the number

value, I get this:

 

Error Type:

Microsoft JET Database Engine (0x80040E10)

No value given for one or more required parameters.

/RoomsStatus/CheckLogin2.asp, line 12

 

I'm thinking how can I check for those values to be valid entries before

the form is sent but I'm not sure how. 

Any ideas?

 

Thanks!

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...] 

Sent: Saturday, December 08, 2001 2:14 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

When I'm reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)

Should I have parentasys there as in Request("field")

Or does this even metter?

I'm getting a page that should load when ID is incorrect but I'm putting

the right id.

 

-----Original Message-----

From: Joe Sabado [mailto:joe.sabado@g...] 

Sent: Saturday, December 08, 2001 2:12 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

put a space either after Users or before where

 

the way you have it now it's being read like this:

 

select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where

 

it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Friday, December 07, 2001 10:44 PM

To: ASP Databases

Subject: [asp_databases] error in from clause

Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 








Message #13 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 19:39:04 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_0002_01C1801F.FE380430

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Something like that should do the trick for the javascript part.  Put the

javascript bit before the form.



<script language="javascript">



function validateform(){

    var frm = document.myform

    var errMsg = ''



     if (isNaN(frm.id.value)) errMsg += '\nID must be a number!';

    // here you can do more form validation if you like



     if (errMsg != '') { // if there's anything in the errMsg string..

         alert('Error!' + errMsg);

     } else {

         frm.submit();

     }

}



</script>



<form name="myform" ... onSubmit="validateform(); return false;">

<input type="text" name="id">

</form>

  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: 8. december 2001 19:12

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause





  I figured I will have to do something like that, but when will the

function be checked?







  On button submit? On form submit? Do you know of any examples where two

fields are validated both for the existence and data type? I've tried on

form submit but that didn't work. Should I have a function or a SUB and

where should it be in the code (before head?, within head?)







  Thank you!







  elizabeta







  -----Original Message-----

  From: Eric Van Camp [mailto:eric@a...]

  Sent: Saturday, December 08, 2001 7:10 AM

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause







  just use javascript to verify if filled in,and if the things filled in is

a character or if you want a number...



    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: Saturday, December 08, 2001 10:44

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause



    I have an input form that verifies user input against the database.







    If user omits to enter value for userID, I get the following error:







    Error Type:

    Microsoft JET Database Engine (0x80040E14)

    Syntax error (missing operator) in query expression 'Users.ID ='.

    /RoomsStatus/CheckLogin2.asp, line 12







    If they enter the value of wrong type , a letter instead of the number

value, I get this:







    Error Type:

    Microsoft JET Database Engine (0x80040E10)

    No value given for one or more required parameters.

    /RoomsStatus/CheckLogin2.asp, line 12







    I'm thinking how can I check for those values to be valid entries before

the form is sent but I'm not sure how.



    Any ideas?







    Thanks!







    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: Saturday, December 08, 2001 2:14 AM

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause







    When I'm reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)



    Should I have parentasys there as in Request("field")



    Or does this even metter?



    I'm getting a page that should load when ID is incorrect but I'm putting

the right id.







    -----Original Message-----

    From: Joe Sabado [mailto:joe.sabado@g...]

    Sent: Saturday, December 08, 2001 2:12 AM

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause







    put a space either after Users or before where







    the way you have it now it's being read like this:







    select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where







    it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.







      -----Original Message-----

      From: Elizabeta Siljanovski [mailto:elizabetas@m...]

      Sent: Friday, December 07, 2001 10:44 PM

      To: ASP Databases

      Subject: [asp_databases] error in from clause



      Can somebody help me with this error?







      Error Type:

      Microsoft JET Database Engine (0x80040E14)

      Syntax error in FROM clause.

      /RoomsStatus/CheckLogin2.asp, line 14







      This is the code:







      Dim strID



      strID = Request("UserID")



      dim rsUsers



      set rsUsers = Server.CreateObject("ADODB.Recordset")



      strSQL = "select  *  from Users" & _



      "where ID =  "  &  strID  &  ";"







      with strID actually being a numerical field










$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






Message #14 by "Elizabeta Siljanovski" <elizabetas@m...> on Sat, 8 Dec 2001 14:18:22 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_0001_01C17FF3.3571B770

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



This never gets validated. The same problem I had before, I've tried

something similar but it didn't work. 

 

-----Original Message-----

From: Kim Iwan Hansen [mailto:kimiwan@k...] 

Sent: Saturday, December 08, 2001 1:39 PM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

Something like that should do the trick for the javascript part.  Put

the javascript bit before the form.

 

<script language="javascript">

 

function validateform(){

    var frm = document.myform

    var errMsg = ''

 

     if (isNaN(frm.id.value)) errMsg += '\nID must be a number!';

    // here you can do more form validation if you like

 

     if (errMsg != '') { // if there's anything in the errMsg string..

         alert('Error!' + errMsg);

     } else {

         frm.submit();

     }

}

 

</script>

 

<form name="myform" ... onSubmit="validateform(); return false;">

<input type="text" name="id">

</form>

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: 8. december 2001 19:12

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

I figured I will have to do something like that, but when will the

function be checked?

 

On button submit? On form submit? Do you know of any examples where two

fields are validated both for the existence and data type? I've tried on

form submit but that didn't work. Should I have a function or a SUB and

where should it be in the code (before head?, within head?)

 

Thank you!

 

elizabeta

 

-----Original Message-----

From: Eric Van Camp [mailto:eric@a...] 

Sent: Saturday, December 08, 2001 7:10 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

just use javascript to verify if filled in,and if the things filled in

is a character or if you want a number...

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Saturday, December 08, 2001 10:44

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

I have an input form that verifies user input against the database.

 

If user omits to enter value for userID, I get the following error:

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error (missing operator) in query expression 'Users.ID ='.

/RoomsStatus/CheckLogin2.asp, line 12

 

If they enter the value of wrong type , a letter instead of the number

value, I get this:

 

Error Type:

Microsoft JET Database Engine (0x80040E10)

No value given for one or more required parameters.

/RoomsStatus/CheckLogin2.asp, line 12

 

I'm thinking how can I check for those values to be valid entries before

the form is sent but I'm not sure how. 

Any ideas?

 

Thanks!

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...] 

Sent: Saturday, December 08, 2001 2:14 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

When I'm reading from numerical field and passing that value to session

variable or local variable, in form of Request(field)

Should I have parentasys there as in Request("field")

Or does this even metter?

I'm getting a page that should load when ID is incorrect but I'm putting

the right id.

 

-----Original Message-----

From: Joe Sabado [mailto:joe.sabado@g...] 

Sent: Saturday, December 08, 2001 2:12 AM

To: ASP Databases

Subject: [asp_databases] RE: error in from clause

 

put a space either after Users or before where

 

the way you have it now it's being read like this:

 

select * from Userswhere ID = " & strID & "; "  -- notice how there's no

space between Users and where

 

it's always a good idea to do a response.write strSQL to make sure your

sql statement is proper.

 

-----Original Message-----

From: Elizabeta Siljanovski [mailto:elizabetas@m...]

Sent: Friday, December 07, 2001 10:44 PM

To: ASP Databases

Subject: [asp_databases] error in from clause

Can somebody help me with this error?

 

Error Type:

Microsoft JET Database Engine (0x80040E14)

Syntax error in FROM clause.

/RoomsStatus/CheckLogin2.asp, line 14

 

This is the code:

 

Dim strID

strID = Request("UserID") 

dim rsUsers 

set rsUsers = Server.CreateObject("ADODB.Recordset") 

strSQL = "select  *  from Users" & _ 

"where ID =  "  &  strID  &  ";"

 

with strID actually being a numerical field

 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 




$subst('Email.Unsub'). 








Message #15 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 22:10:06 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_001E_01C18035.17ECA010

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



are you remembering to include return false??  (onSubmit="validateform();

return false;")



otherwise, see if there's an error in the javascript when you load the

page - that would cause validateform() to disfunction.



be aware that javascript is case sensitive - i.e. id, Id, iD and ID are all

different.



-Kim

  -----Original Message-----

  From: Elizabeta Siljanovski [mailto:elizabetas@m...]

  Sent: 8. december 2001 20:18

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause





  This never gets validated. The same problem I had before, I've tried

something similar but it didn't work.







  -----Original Message-----

  From: Kim Iwan Hansen [mailto:kimiwan@k...]

  Sent: Saturday, December 08, 2001 1:39 PM

  To: ASP Databases

  Subject: [asp_databases] RE: error in from clause







  Something like that should do the trick for the javascript part.  Put the

javascript bit before the form.







  <script language="javascript">







  function validateform(){



      var frm = document.myform



      var errMsg = ''







       if (isNaN(frm.id.value)) errMsg += '\nID must be a number!';



      // here you can do more form validation if you like







       if (errMsg != '') { // if there's anything in the errMsg string..



           alert('Error!' + errMsg);



       } else {



           frm.submit();



       }



  }







  </script>







  <form name="myform" ... onSubmit="validateform(); return false;">



  <input type="text" name="id">



  </form>



    -----Original Message-----

    From: Elizabeta Siljanovski [mailto:elizabetas@m...]

    Sent: 8. december 2001 19:12

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause



    I figured I will have to do something like that, but when will the

function be checked?







    On button submit? On form submit? Do you know of any examples where two

fields are validated both for the existence and data type? I've tried on

form submit but that didn't work. Should I have a function or a SUB and

where should it be in the code (before head?, within head?)







    Thank you!







    elizabeta







    -----Original Message-----

    From: Eric Van Camp [mailto:eric@a...]

    Sent: Saturday, December 08, 2001 7:10 AM

    To: ASP Databases

    Subject: [asp_databases] RE: error in from clause







    just use javascript to verify if filled in,and if the things filled in

is a character or if you want a number...



      -----Original Message-----

      From: Elizabeta Siljanovski [mailto:elizabetas@m...]

      Sent: Saturday, December 08, 2001 10:44

      To: ASP Databases

      Subject: [asp_databases] RE: error in from clause



      I have an input form that verifies user input against the database.







      If user omits to enter value for userID, I get the following error:







      Error Type:

      Microsoft JET Database Engine (0x80040E14)

      Syntax error (missing operator) in query expression 'Users.ID ='.

      /RoomsStatus/CheckLogin2.asp, line 12







      If they enter the value of wrong type , a letter instead of the number

value, I get this:







      Error Type:

      Microsoft JET Database Engine (0x80040E10)

      No value given for one or more required parameters.

      /RoomsStatus/CheckLogin2.asp, line 12







      I'm thinking how can I check for those values to be valid entries

before the form is sent but I'm not sure how.



      Any ideas?







      Thanks!







      -----Original Message-----

      From: Elizabeta Siljanovski [mailto:elizabetas@m...]

      Sent: Saturday, December 08, 2001 2:14 AM

      To: ASP Databases

      Subject: [asp_databases] RE: error in from clause







      When I'm reading from numerical field and passing that value to

session variable or local variable, in form of Request(field)



      Should I have parentasys there as in Request("field")



      Or does this even metter?



      I'm getting a page that should load when ID is incorrect but I'm

putting the right id.







      -----Original Message-----

      From: Joe Sabado [mailto:joe.sabado@g...]

      Sent: Saturday, December 08, 2001 2:12 AM

      To: ASP Databases

      Subject: [asp_databases] RE: error in from clause







      put a space either after Users or before where







      the way you have it now it's being read like this:







      select * from Userswhere ID = " & strID & "; "  -- notice how there's

no space between Users and where







      it's always a good idea to do a response.write strSQL to make sure

your sql statement is proper.







        -----Original Message-----

        From: Elizabeta Siljanovski [mailto:elizabetas@m...]

        Sent: Friday, December 07, 2001 10:44 PM

        To: ASP Databases

        Subject: [asp_databases] error in from clause



        Can somebody help me with this error?







        Error Type:

        Microsoft JET Database Engine (0x80040E14)

        Syntax error in FROM clause.

        /RoomsStatus/CheckLogin2.asp, line 14







        This is the code:







        Dim strID



        strID = Request("UserID")



        dim rsUsers



        set rsUsers = Server.CreateObject("ADODB.Recordset")



        strSQL = "select  *  from Users" & _



        "where ID =  "  &  strID  &  ";"







        with strID actually being a numerical field










$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').






$subst('Email.Unsub').







  Return to Index