Solved

From ComboBox - Passing value to Database

Posted on 2010-08-27
4
338 Views
Last Modified: 2013-11-27


I need to Pass - ComboBox Text to the Database.

Not the Id .. i need to pass actual value to the database.

Whats the syntax for fetching the value from ComboBox
0
Comment
Question by:chokka
4 Comments
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 33548018
0
 
LVL 17

Expert Comment

by:Zhaolai
ID: 33548114
If you mean the value actually displayed in the combobox, use ComboBox1.Text.
0
 

Expert Comment

by:kimapacible
ID: 33548134
Dim strActualValue as string
strActualValue = ComboBox1.text
0
 
LVL 18

Accepted Solution

by:
John (Yiannis) Toutountzoglou earned 500 total points
ID: 33549417
"If"  Your ComboBox is databound to a datatable you can also define a datarowview....
Dim drv as DataroWview =Ctype(Me.Combobox.SelectedItem,DataRowView)
'And for The Selected Text'

Dim SelText as String=drv.Item("YouColumnTableName")   'And Pass SelText to the Database...

Open in new window

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need a starter for ETL protocol? 4 55
VB.NET Repostiory Pattern 7 35
Datagridview column when exported to Excel changes vb.net 1 13
Sql server insert 13 26
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now