Tomba Posted August 25, 2003 Posted August 25, 2003 hmm.. apparently I can only set a field ID when I want to retreive a value from a recordset. I mean this: while (dr.Read()) { this.cmbCity.Items.Add(dr.GetString(0)); } that dr.GetString() cannot accept a field name instead of an integer. Is there any other function or way to reference a field by its name, instead of by its number? Quote
rustyd Posted August 25, 2003 Posted August 25, 2003 dr("FieldName") Or Dim strField as string = "FieldName" dr(strField) Quote rustyd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.