473,414 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to get specific record from other table during runtime?

I have taken a suppliercode from the user in runtime, now I want to define a SQLdatasource and select a record from supplierInfo with the same code. After that I want to display that record in textbox of the same formview.
I was trying below code, but does not work. Pls help!



Expand|Select|Wrap|Line Numbers
  1. Dim rstSupplier As New SqlDataSource
  2. rstSupplier.SelectCommand = "Select * from SupplierInfo where SupplierCode '" & lblSupplierCode.Text & "'"
  3. rstSupplier.DataBind()
  4.  
  5. txtAddressLine1.Text = rstSupplier.SelectParameters("AddressLine1").DefaultValue
  6. txtAddressLine2.Text = rstSupplier.SelectParameters("AddressLine2").DefaultValue
and so on ...........


Pls help, or give some idea to do it runtime.
Thanks in advance

Sanjay
Mar 31 '11 #1
1 1295
the following will answer these queries
http://forums.asp.net/t/899575.aspx/1
I spent a long time looking to populate labels from SQLDatasource only to be led all over the place to resolve it.
Finally a Microsoft team member posted the answer, If you are using Datasource, you have to use the built in tools for it i.e Details view and trim it down
Jan 17 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: RC | last post by:
I would like to go to a specific record based on what the user types in a text box on a form. I have a table named: Boxes in the table there is a field named: BoxNumber a form named: BxForm ...
1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
1
by: David | last post by:
Hello, I use the VS .NET 2003. Say I have a Windows form (with C# code, of course) which is connected to a database to one table. I can browse through the records, but I don't know how to...
2
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket”...
4
by: BerkshireGuy | last post by:
Is there a way to create a shortcut to open a MS Acccess DB and have it go to a specific record? In my DB, when a user delegates a record to another users, I currently send out an email to the...
1
by: Barfy the Wonder Camel | last post by:
I've loaded a dataset from an access database, and now I want to find a specific record in a datatable that's part of that dataset. First, I was surprised to find that the Find() method complains...
7
ADezii
by: ADezii | last post by:
Use the FindRecord Method of the DoCmd Object (least efficient) - The simplest approach for finding a specific Record is to create an Event Procedure for the Combo Box that mirrors each step of the...
6
by: jmartmem | last post by:
Greetings, I have an Access 2002 continuous form called "Project Update Form" in which users can update project values presented in a series of combo boxes and text boxes. Three of the combo...
1
by: Martin Bentler | last post by:
Right now, I have a form, locked records, on which I have a CommandButton that opens a second form (much like the first) but open for editing, plus allowing the user to manipulate other areas of the...
1
by: cvillav | last post by:
Hello, I am new to Access and this forums, I have two tables and two forms to display the data. Tables Tbuilding Tcriteria Forms fmbuilding
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.