473,395 Members | 1,689 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,395 software developers and data experts.

Web App with Dataset problems.

Hi all,

First, Let me say I feel like a complete idiot here, and shamefully come to
you for help. I've read and read and can't get this to work in a web
application, however in a windows application I have no problems. Here it
is:

I have an sqlDataAdapter, sqlDataConnection, and a DataSet. If I right
click on sqlDataAdapter1 and select "Preview Data" and then Fill the
DataSet, it looks fine, my entries in the table (named headerInfo) show up
along with the Column structure.

Now, I have a few editboxes and buttons on the webapp page. When I click on
a button I would like to have the data in the dataset populate the edit
boxes. I've set the databindings in each editbox's properties to the
appropriate field from the dataset. I set the button click event up as
follows:

private void btnRead_Click(object sender, System.EventArgs e)
{
sqlConnection1.Open();
sqlDataAdapter1.Fill(dsHeader1,0,0, "headerInfo");
sqlConnection1.Close();
}

Can someone please tell me how to get the first record of information from
the table "headerInfo", in the Column "Title" to appear as thed text for the
editbox?

I know this is probably something simple, and I am completely missing
something. Any help would be appreciated.

Please don't laugh at me (too much).

Thanks in advance.
Nov 15 '05 #1
4 1321
you need to call the DataBind method of each control

jayson
Nov 15 '05 #2
you need to call the DataBind method of each control

jayson
Nov 15 '05 #3

"Jayson" <an*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
you need to call the DataBind method of each control

jayson


Jayson:

Thank you very much for your help, it's working!

One other question, when populating a drop down box the string is being
broken up into seperate chars, so the word "Windows" would be 7 selections,
W, I, N,D,O,W, and S. the field in the DB is set to "text". do you know
how to work around this?

Thanks again.
Nov 15 '05 #4

"Jayson" <an*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
you need to call the DataBind method of each control

jayson


Jayson:

Thank you very much for your help, it's working!

One other question, when populating a drop down box the string is being
broken up into seperate chars, so the word "Windows" would be 7 selections,
W, I, N,D,O,W, and S. the field in the DB is set to "text". do you know
how to work around this?

Thanks again.
Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Joerg M. Colberg | last post by:
Hi all, I have a problem when using a DataSet. I am using it to query a SQLServer database as follows. In my code it looks like SqlDataAdapter eDA = new SqlDataAdapter(sqlcmd); // where...
2
by: Dennis | last post by:
Hi, I am hoping I can get some help with a small problem I have run into using C#. U have an XML file that I load into a Dataset and then display this in a Datagrid. No problems doing this at all....
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
3
by: Anthony | last post by:
Hi There When trying to add a dataset to a web form I get the following error msg. "There were problems generating . To resolve this problem build the project, fix the errors and generate...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
4
by: Opa Vito | last post by:
Hello, I can't find out if a DataSet (and/or datatable) can be declared public so the xml data can be read to the DataSet in the form load, and then can be acessed from whatever sub or function...
0
by: ~J~ | last post by:
Hi, I really hope someone can help me out here. In relation to this thread ( http://www.thescripts.com/forum/thread349557.html ) I'm having a similar issue and getting nowhere fast! In a...
2
by: Magnus Bergh | last post by:
I got a weird problem with designer. I have created a spearate assembly (DLL) containing my dataset classes and other classes which are shared bewteen the projects in the solution. When I try to...
12
by: Rainer Queck | last post by:
Hi NG, I have no idea why, but since a while a dataset refuses to write to a specific xml file. I get the error message "Der Zugriff auf den Pfad...
4
by: John Sheppard | last post by:
Hello there I was wondering if anyone could help me, I am trying to pass a typed dataset to a dialoged child form by reference. I have binding sources sitting on the child form. So to refresh...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.