4 Replies - 253 Views - Last Post: 08 May 2013 - 05:32 AM Rate Topic: -----

#1 Ahmad Yar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-May 13

geting the value from the database and display on the combo box

Posted 08 May 2013 - 04:11 AM

Dim dt As DataTamle=getDataTable(query)
Is This A Good Question/Topic? 0
  • +

Replies To: geting the value from the database and display on the combo box

#2 Ahmad Yar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-May 13

Re: geting the value from the database and display on the combo box

Posted 08 May 2013 - 04:17 AM

query="SELECT Doctor_Id,Doctor_Name FROM doctor"
Dim dt As DataTamle=getDataTable(query)
comboBox.DataSource=dt
ComboBox.DisplayMember="Doctor_Name"
ComboBox.ValueMember="Doctor_Id"
Was This Post Helpful? 0
  • +
  • -

#3 Ahmad Yar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-May 13

Re: geting the value from the database and display on the combo box

Posted 08 May 2013 - 04:28 AM

We geting the value for the database to display all the doctor name in combo box error in second line but i cant understand the error


query="SELECT Doctor_Id,Doctor_Name FROM doctor"
Dim dt As DataTamle=getDataTable(query)
comboBox.DataSource=dt
ComboBox.DisplayMember="Doctor_Name"
ComboBox.ValueMember="Doctor_Id"
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3359
  • View blog
  • Posts: 11,373
  • Joined: 12-December 12

Re: geting the value from the database and display on the combo box

Posted 08 May 2013 - 04:31 AM

How could we understand the error if you don't tell us what it is?

I assume DataTamle should be DataTable, and I trust that your combobox is not named ComboBox :dontgetit:

Please wrap your code in code-tags, it tells you how to do this directly in the area where you are typing your post. Press the Preview Post button until it is correct.

This post has been edited by andrewsw: 08 May 2013 - 04:32 AM

Was This Post Helpful? 0
  • +
  • -

#5 vks.gautam1  Icon User is offline

  • D.I.C Regular

Reputation: 17
  • View blog
  • Posts: 317
  • Joined: 21-March 08

Re: geting the value from the database and display on the combo box

Posted 08 May 2013 - 05:32 AM

Opening of your database connection too
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1