0

Hey everyone,

New to the forums, as this will be my first post.

Im having a problem with a tableadapter/tableadapter query.
My query is:

SELECT * FROM subject_assessments
WHERE (sa_id = @sa_id)

sa_id is a varchar, if that is relevant in any way.

My table adapters then look like this:

datasetTableAdapters.Subject_AssessmentsTableAdapter table = new datasetTableAdapters.Subject_AssessmentsTableAdapter();
        dataset.Subject_AssessmentsDataTable assessTable = table.GetDataBy4(cbAssess.SelectedItem.Text);
        dataset.Subject_AssessmentsRow row = (dataset.Subject_AssessmentsRow)assessTable.Rows[0];

The problem is I keep receiving an error saying "Input string was not in a correct format."

Is there something obvious im missing? Or does anyone have any light to shed on my situation?

Thanks,
dAve

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by jamshed ahmed
0

try this

dim dt as new datatable("tableName")
dim da as new sqldataadaper("select ur criteria here","urConnection")
da.fill(dt)
for dim i as int=0 to dt.rows.count-1
{
string Tmp =dt(i).value.tostring()
}

i guess this is what i understood from ur code and u will retrieve data on particular index

Edited by __avd: Added [code] tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.