Link to home
Start Free TrialLog in
Avatar of MGaff
MGaffFlag for United States of America

asked on

VB Database odbc connection and SQL question

My current sql looks like:
Dim invoiceheaderadapter As New Odbc.OdbcDataAdapter("select * from Copinvheaderfile where invhdrinvoicedate  = " & CurrentOrderDate.Text, testconnection)

I want to change it to the following where the wsdonotsend field is = N.
        'Dim invoiceheaderadapter As New Odbc.OdbcDataAdapter("select * from Copinvheaderfile where invhdrinvoicedate  = " & CurrentOrderDate.Text & " and InvHdrDoNotSendInvoice = " & wsdonotsendinv, testconnection)

This keeps telling me that the field 'n' does not exist.  I even placed it on my screen and made it a .text and placed an N in it.  I got the same results.  I tried with an 'n' directly in the sql also.  When it comes time to load the datatable is when it fails with the field N message.  What am I doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of gamarrojgq
gamarrojgq

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MGaff

ASKER

Oh nuts....forgot about the single quote thing.  Thanks,
Avatar of gamarrojgq
gamarrojgq

ok, great, don't forget to accept the solution
Avatar of Dirk Haest
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.