not able to fill dataset with OleDbDataAdapter

J

John Smith

the syntax I have used is

oledbdataadapter#.fill(Dataset, "table")

it throws this exception

System.Data.OleDb.OleDbException: No value given for one or more
required parameters.
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&
executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior
behavior)
at
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable)
at Tracker.StartPage.StartPage_Load(Object sender, EventArgs e) in
C:\Tracker\StartPage.vb:line 2935



the problem is that I use the same syntax the line befor it with
different dataadapter and dataset, it works fine to populate that dataset
but not this one?????


By the way, has anybody used this code generator?

http://www.eggheadcafe.com/forums/ForumPost.asp?ID=16183&INTID=14
 
C

Cor Ligthert

John,

Your commandparameters are probably wrong, did you make that by hand or
using the designer.

Keep in mind that you need for OledB the exact parameters in the sequence
from the selectstring.

I hope this helps.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top