Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

How To Get Data From A Row of a Database Into A Web Form

Status
Not open for further replies.
Joined
Apr 26, 2005
Posts
7,435
Reaction score
148
Guys, can anyone help with this?

I'm repairing an old script written in VB.net 2.0. I'm a little rusty :oops:, so can someone give me a few pointers on what I need to do.

I need to query a database where I hold Merchant details (I'm using MySQL with a custom provider). I just need to use MerchantId to lift a single Merchant's details (Name, Affiliate Link, Merchant Description etc), out of the database and populate these details into a Form where I can make edits to the Merchant's details.

I just need a few reminders about the best way to code this. :p

- So, I lift the merchant details out of the database with a MySQL query using the Merchant Id.

- Then, what entity would I use to hold the data in order to put it into the form. A DataAdapter?? Or something else??

- Then how do I get the data out of the DataAdapter (or similar??) and into the form fields for editing?

I'm working out how to do this all now, but I could really use some pointers too.

Many thanks :cool:
 
I have a solution now, in case anyone's interested, it's roughly:

Declare an SQL string

Declare a DataAdapter

Declare a DataSet

Use the DataAdapter.Fill() method to fill the DataSet

Use DataSet.Tables functionality to pick out row values from the DataSet

Set the Text values of form fields to the row values picked out

Thanks
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom