1
Reply

Database Problem

saphiroth42

saphiroth42

Jan 10 2005 3:15 PM
1.5k
Hi, Im using an access database to store a bunch of measurements. I have a dropdown menu so the user can pick measurements of an object then I assign these measurements to variables and then compare these measurements to the measurements stored in the database. From the database I am trying to retrieve a part number from the measurements the user has picked. The code does not work but I dont know why. The variables are picture,Number,and pictureCenter. Picture and pictureCenter do not keep pictures but the measurements. The columns in the database are HoseSize, FittingType, FittingSize conn.Open() AdaptID = New OleDbDataAdapter("Select PartNumber from TableID where " + CStr(picture) + " = FittingType and " + CStr(Number) + " = FittingSize and " + CStr(pictureCenter) + " = HoseSize", conn) AdaptID.Fill(TablePartNum) PartNumber = (TablePartNum.Rows(0)("PartNumber")).ToString() Label3.Text = "Left Part #: " + Partleft TablePartNum = Nothing AdaptID = Nothing conn.Dispose() thank you

Answers (1)