Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

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,410
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!

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom