no value given for one or more required parameters in vb.net -


i got error

no value given 1 or more required parameters

on part of code

private sub refreshdata()     con.open()      cmd.commandtext = ("select pcode [id], lampname [name],  costumer, proddate, line/shift, watts, volts, filam, base, basepos,lumen, life, atm, fuse, exp, type,testcode, textvolt, samplesize, datestart, timestart, lnwatts1, lnwatts2, lnwatts3, lnwatts4, lnwatts5, lnlumen1, lnlumen2, lnlumen3, lnlumen4, lnlumen5, lpw1, lpw2, lpw3, lpw4, lpw5, rlwatts1, rlwatts2, rlwatts3, rlwatts4, rlwatts5, rllumen1, rllumen2, rllumen3, rllumen4, rllumen5, lpwf1, lpwf2, lpwf3, lpwf4, lpwf5, inspectiontime1, inspectiontime2, inspectiontime3, inspectiontime4, inspectiontime5, inspectiondate1, inspectiondate2, inspectiondate3, inspectiondate4, inspectiondate5, th1, th2, th3, th4, th5, el1, el2, el3, el4, el5, dispo1, dispo2, dispo3, dispo4, dispo5, cf1, cf2, cf3, cf4, cf5, reason1, reason2, reason3, reason4, reason5, lnave1, lnave2, lnave3, lnave4, lnave5, lnave6, lnave7, lnave8, lnave9, lnave10, lnave11, lnave12, lnave13, lnsd1, lnsd2, lnsd3, lnsd4, lnsd5, lnsd6, lnsd7, lnsd8, lnsd9, lnsd10, lnsd11, lnsd12, lnsd13, torquetest, zerohour, endoflife, pfcptime1, pfcptime2, pfcptime3, pfcptime4, pfcptime5, pfcpdate1, pfcpdate2, pfcpdate3, pfcpdate4, pfcpdate5, batchnumber records order id")      dim da new oledbdataadapter     dim dt new datatable      da.selectcommand = cmd     da.fill(dt)   -- error right here      con.close() end sub 

what problem that? hoping help, i'm newbie vb.net..

thank you.

try putting brackets around fields / character

proddate, [line/shift], watts, etc... 

otherwise, have painfully make sure every field typed in sql string exists in [records] table.

given number of fields in query, think doing select * [records] order pcode enough.

also, make sure use real field name in order clause:

order pcode 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -