conelbeano
Newcomer
- Joined
- Oct 8, 2004
- Messages
- 2
my code keeps generating an error that goes like this:
Cast from string "select inventory_category from i" to type 'Double' is not valid
my code loks like this :
the connections were made in other lines, so i know they're not there error happens at the arrow. if you have help, or suggestions, please help me as i am stuck
Cast from string "select inventory_category from i" to type 'Double' is not valid
my code loks like this :
Visual Basic:
RS.Open("Select * from tblinventorycategories where device <> '" + "" + "'", CN, 1, 2)
RSS.Open("Select * from inventorycategory", CNN, 1, 2)
Dim a, b As Integer
Do While RS.EOF() = False
RSS.AddNew()
rr.Open("select function_id from function where function = '" + RS.Fields("functionid").Value + "'", CNN, 1, 2)
a = rr.Fields("function_id").Value
rr.Close()
rr.Open("select device_category_id from devicecategory where device_category = '" + RS.Fields("devicecategory").Value + "'", CNN, 1, 2)
b = rr.Fields("device_category_id").Value
rr.Close()
-----> RRSS.Open("select inventory_category from inventorycategory
where function_id = '" + a + "' and devicecategory = '" + b + "'",
CNN, 1, 2)
RSS.Fields("category_id").Value = RRSS.Fields("inventory_category").Value
RRSS.Close()
RSS.Fields("devicename").Value = RS.Fields("device").Value
RSS.Update()
RS.MoveNext()
Loop
RS.Close()
RSS.Close()
the connections were made in other lines, so i know they're not there error happens at the arrow. if you have help, or suggestions, please help me as i am stuck
Last edited by a moderator: