Sql and VB

city4ever

Well-Known Member
Joined
22 Sep 2005
Messages
140
I have generated some SQL code

SELECT Invoice.InvoiceID, Invoice.CustomerID, Invoice.RouteNumber,
Invoice.TreatmentType, Invoice.Information, Invoice.StreetAddress,
Invoice.Postcode,
Invoice.Invoicecost, Invoice.InvoiceDate
FROM (Invoice INNER JOIN
Customer ON Invoice.CustomerID =
Customer.CustomerID)
WHERE (Customer.CustomerID = '?')


When i test it in the query generator everything works.
However when i add the following code to my vb form in order to populate the table with the correct data. The query will not work:


The system builds with no known errors however it does error when i try to open the page and takes me to a line of code in my form..


Me.InvoiceTableAdapter.FillBy(Me.GreenGrassdatabasemartynDataSet.Invoice, CustomerIDTextBox.Text)


The error is: Conversion from string "" to type 'Integer' is not valid.



I have checked in my database that they are both integers which is
correct.

I have looked through the propperties on the text box to ensure they are
correct and i have found no problems?



Any suggestions?
 
spot on, in the connection statement telling the page to update i had to turn it into an integer as it was currently set for a char.

Nice one
 
city4ever said:
spot on, in the connection statement telling the page to update i had to turn it into an integer as it was currently set for a char.

Nice one

Fuck me, I still know some programming...

[Shakes head and wanders off into the kitchen for a brew.]
 

Don't have an account? Register now and see fewer ads!

SIGN UP
Back
Top
  AdBlock Detected
Bluemoon relies on advertising to pay our hosting fees. Please support the site by disabling your ad blocking software to help keep the forum sustainable. Thanks.