Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

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,414
Reaction score
151
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.

Rule #1: Be Respectful

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

Members online

No members online now.

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.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom