473,320 Members | 2,094 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,320 software developers and data experts.

.Net 2.0 SqlDataSource and DataSet question

Hi,
I would like to know what the DataSet name is and where the DataSet is for
a SqlDataSource like this:

<asp:SqlDataSource ID="SqlDataSourceA" runat="server" ConnectionString="<%$
ConnectionStrings:ServiceConnectionStringA %>"
SelectCommand="SELECT TestNo, AcceptDate, status FROM TestForm ORDER BY
TestNo">
</asp:SqlDataSource>

where the connectionStrings in te Web.Config is as:
<connectionStrings>
<add name="ETCServiceTestConnectionStringA" connectionString="Data
Source=192.168.100.100;Initial Catalog=Service;User
ID=service;Password=mypwd"
providerName="System.Data.SqlClient" />
</connectionStrings>

Thanks for help.
Jason
May 22 '07 #1
1 4655
Set the SqlDataSource.DataSourceMode to SqlDataSourceMode.DataSet and invoke
SqlDataSource.Select() to get a DataSet.

"Jason Huang" wrote:
Hi,
I would like to know what the DataSet name is and where the DataSet is for
a SqlDataSource like this:

<asp:SqlDataSource ID="SqlDataSourceA" runat="server" ConnectionString="<%$
ConnectionStrings:ServiceConnectionStringA %>"
SelectCommand="SELECT TestNo, AcceptDate, status FROM TestForm ORDER BY
TestNo">
</asp:SqlDataSource>

where the connectionStrings in te Web.Config is as:
<connectionStrings>
<add name="ETCServiceTestConnectionStringA" connectionString="Data
Source=192.168.100.100;Initial Catalog=Service;User
ID=service;Password=mypwd"
providerName="System.Data.SqlClient" />
</connectionStrings>

Thanks for help.
Jason
May 23 '07 #2

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

Similar topics

0
by: Jason Shohet | last post by:
I'm using the new SqlDataSource with the beta. Below I have my code: asp:SqlDataSource ID="ds" Runat="server" SelectCommand="SELECT employee_ssno, firstname, lastname FROM employee_temp order by...
1
by: Neil | last post by:
Is it possible to reference the dataset of a sqldatasource from code? I've looked at the properties for the sqldatasource but don't see anything obvious. In particular, I have a bit field in the...
1
by: bcornett | last post by:
I am needing a way to extract a dataset from a sqldatsource. I am doing this to create a Generic Printing page. I will pass the dataset and an arraylist of grid_view propeties to this Generic...
0
by: cyberbless | last post by:
I would like to dynamically assign a Select Statment to a a SqlDataSource. Problem is the SqlDataSource.Select() Command requires a "dataSourceSelectArgument" as one of its arguments. 1. What...
7
by: | last post by:
I'm using ASP.NET 2.0, C#, SQL Server 2005, and databound controls like the DataList and the GridView. Right now I'm using SqlDataSource as part of very quick and dirty site; I'm not looking to...
6
by: djc | last post by:
I had previously (in asp.net 1.1 and asp.net web matrix) just done this to populate a listbox with data from a database: ------------ this was from the page load event ---------------- 'fill...
6
by: Ken Fine | last post by:
I'm using SQLDataSource, which generates some kind of dataset, and then I attach that datasource to various data display controls such as DataList and repeater which loop through to the end of the...
2
by: John Kotuby | last post by:
Hi all, I am relatively new to ASP.NET 2.0 programming. I have some experience with classic ASP and VB6. In Visual Web Developer (VS 2005) there a numerous ways to work with data. In my...
2
by: Jason Huang | last post by:
Hi, I would like to know what the DataSet name is and where the DataSet is for a SqlDataSource like this: <asp:SqlDataSource ID="SqlDataSourceA" runat="server" ConnectionString="<%$...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.