|
 |
access_asp thread: ODBC Drivers error '80040e14'
Message #1 by "sharon buggle" <s.buggle@w...> on Mon, 17 Sep 2001 14:52:59
|
|
Hello, got this error when user enters the container number and hits list
to retrieve columns from database dsn connection in access.
code is below error if anyone can help, Thanks!
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator)
in query expression 'Invoice_Items.invoice_number='.
*********************************************************
Code
if Len(Trim(Request("Cnttxt"))) > 0 and Len(Request("bnList.x")) > 0
then
Sqlst="SELECT dbo_Vessels.vessel_name, dbo_Voyages.voyage_id,
dbo_Ports.port_name, dbo_Bills_of_Lading.bill_of_lading_id,
dbo_Invoice_Items.invoice_number " & _
"FROM dbo_Ports INNER JOIN (dbo_Client_Ports INNER JOIN
((dbo_Invoice_Table INNER JOIN dbo_Invoice_Items ON
dbo_Invoice_Table.invoice_number = dbo_Invoice_Items.invoice_number)" & _
"INNER JOIN (dbo_Vessels INNER JOIN (((dbo_Bol_Containers
INNER JOIN dbo_Bills_of_Lading ON dbo_Bol_Containers.bill_of_lading_id =
dbo_Bills_of_Lading.bill_of_lading_id) INNER " & _
"JOIN dbo_Voyage_Ports ON dbo_Bills_of_Lading.voyage_id =
dbo_Voyage_Ports.voyage_id) INNER JOIN dbo_Voyages ON
dbo_Voyage_Ports.voyage_id = dbo_Voyages.voyage_id) " & _
" ON dbo_Vessels.vessel_id = dbo_Voyages.vessel_id) ON
dbo_Invoice_Items.ctn_id = dbo_Bol_Containers.ctn_id) ON
dbo_Client_Ports.company_id = dbo_Vessels.company_id) " & _
" ON dbo_Ports.port_id = dbo_Client_Ports.port_id"
if Len(Trim(Request("InvTxt"))) > 0 then
Sqlst = Sqlst & " where Invoice_Items.invoice_number=" &
Request.Querystring("[InvTxt]")
end if
Message #2 by "Zee Computer Consulting" <zee@t...> on Tue, 18 Sep 2001 11:17:31 -0700
|
|
Instead of this:
if Len(Trim(Request("InvTxt"))) > 0 then
Sqlst = Sqlst & " where Invoice_Items.invoice_number=" &
Request.Querystring("[InvTxt]")
end if
shouldn't the line have a "dbo_" in it and read:
WHERE dbo_Invoice_Items.invoice_number=" &
?
-- Zee
----- Original Message -----
From: "sharon buggle" <s.buggle@w...>
To: "Access ASP" <access_asp@p...>
Sent: Monday, September 17, 2001 2:52 PM
Subject: [access_asp] ODBC Drivers error '80040e14'
> Hello, got this error when user enters the container number and hits list
> to retrieve columns from database dsn connection in access.
>
> code is below error if anyone can help, Thanks!
>
>
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator)
> in query expression 'Invoice_Items.invoice_number='.
> *********************************************************
>
>
>
> Code
> if Len(Trim(Request("Cnttxt"))) > 0 and Len(Request("bnList.x")) > 0
> then
> Sqlst="SELECT dbo_Vessels.vessel_name, dbo_Voyages.voyage_id,
> dbo_Ports.port_name, dbo_Bills_of_Lading.bill_of_lading_id,
> dbo_Invoice_Items.invoice_number " & _
> "FROM dbo_Ports INNER JOIN (dbo_Client_Ports INNER JOIN
> ((dbo_Invoice_Table INNER JOIN dbo_Invoice_Items ON
> dbo_Invoice_Table.invoice_number = dbo_Invoice_Items.invoice_number)" & _
> "INNER JOIN (dbo_Vessels INNER JOIN (((dbo_Bol_Containers
> INNER JOIN dbo_Bills_of_Lading ON dbo_Bol_Containers.bill_of_lading_id
> dbo_Bills_of_Lading.bill_of_lading_id) INNER " & _
> "JOIN dbo_Voyage_Ports ON dbo_Bills_of_Lading.voyage_id
> dbo_Voyage_Ports.voyage_id) INNER JOIN dbo_Voyages ON
> dbo_Voyage_Ports.voyage_id = dbo_Voyages.voyage_id) " & _
> " ON dbo_Vessels.vessel_id = dbo_Voyages.vessel_id) ON
> dbo_Invoice_Items.ctn_id = dbo_Bol_Containers.ctn_id) ON
> dbo_Client_Ports.company_id = dbo_Vessels.company_id) " & _
> " ON dbo_Ports.port_id = dbo_Client_Ports.port_id"
>
>
>
>
>
>
> if Len(Trim(Request("InvTxt"))) > 0 then
> Sqlst = Sqlst & " where Invoice_Items.invoice_number=" &
> Request.Querystring("[InvTxt]")
> end if
>
>
>
>
>
>
>
>
|
|
 |