Works With SQL Not With Access

  • Thread starter Thread starter scorpion53061
  • Start date Start date
S

scorpion53061

This sql statement against an access database is not working in vb.net but
works in query analyzer when I sample it against a SQL table.
Maybe you guys know what I am doing wrong........

sql3 = "SELECT from CUSTOMERS WHERE CustShipTo = (select max(CustShipTo)
from customers where CustNumber = " & TextBox1.Text & " ) Order BY custid"
 
SELECT * from dbo_CUSTOMERS WHERE PostalCode = (select max(PostalCode)
from dbo_customers where CustomerID = "ALFKI" ) Order BY CustomerID

I added the * and changed some field names to work with the NWind Customers
table.
Now it seems fine.
 
Back
Top