how to run two different query at the same time and save result to two different dataset
im using asp.net 2.0 application , and my application interfaces with SQL database.
is it possible to run two SQL query and save result of query to two different datset
if so , please let me know how to do that,
show me the solution
you cant run 2 at the same time (i dont think) but you can run one after the other and save the results to two different data sets.
just create a connection
issue statement1 and save to dataset
issue statement2 and save to dataset 2
You can have 2 or more SQL queries in the same stored procedure....Time difference between two time in vb .net
I need to calculate the time difference between two time:
eg: 11:56:00PM and 12:12:00 Am
ouput is 16 minutes.
Can any one give me the code for it.
venkatramcse:I need to calculate the time difference between two time:
eg: 11:56:00PM and 12:12:00 Am
ouput is 16 minutes.
Can any one give me the code for it. Here's an example:C# DateTime dFrom;
...How to get data from two different tables for two different columns of a gridview based on datakey
I have a Gridview with two different columns- "Faculty" coming from tblFaculty and "Teachers" coming from tblFacultyTeacherLink. I want to get data for "Teachers" by comparing FcaultyId in tblFacultyTeacherLink and then getting Teachers name. How to achieve this without using nested gridviews?
My .aspx Page is as-
<asp:GridView ID="gviewFaculty" DataKeyNames="FacultyId" AutoGenerateColumns="false" runat="server" Width="100%&q...Two dropdownlist control two gridview problem
Hi, I have two dropdownlist and two gridview:gridview1 control by dropdownlist1, dropdownlist1 bind to sqldatasource1 (e.g. category table)gridview2 control by dropdownlist2, dropdownlist2 bind to sqldatasource2 (e.g. author table)i add the dummy record on database table so that dropdownlist will show "--choose one" and the two gridview will display nothing. (that is what i expect, it is normal)I would like user to choose either by category(Dropdownlist1) or by author(Dropdownlist2) when they search the book table.The problem is not a critical, but when it load the page,...how do i link two different sitemap with the use of menu control in one .aspx file to two different hyperlink in the master page?
I have two menu control with similar file(eg.defect.aspx) in the master page, whenever i click the similar file(eg.defect.aspx) in either menu control, it will show both the menu control(eg.student menu and staff menu), but i only want to show only either one of the menu (eg,student menu only). Is there any solution to my problem? Am i able to use similar file(eg.defect.aspx) for two different sitemap and two menu control and only show one menu control.
What should or should not be visible; the whole menu, or the selected field? Are you h...printing two datawindows at the same time in two different printers
how could i print two datawindows at the same time in two different
Yes you can but you print first dw and then change printer and print other.
There are post on this newsgroup how to dynamically
change printer (during program execution).
<judith> wrote in message
> how could i print two datawindows at the same time in two different
Are you in PB8?
If so, all you have to do is
dw_1.Modify('datawindow.printer=xxxx'...binding two tables in dataset to two gridview controls
HiThanks for your time.here is my question.I have a storedprocedure which gives 2 tables output.now i have those two tables in dataset. my question ishow to assign firsttable in dataset to gridview1 and the second table to gridview2.i.e is there a way i can name the two tables in the dataset.by using the names of tables in dataset can i assign them to gridview's if so please give me the sample code for that.your help is appreciated.
HiYes, you can do that. Here is an example.//dataset containing tables. DataSet ds = new DataSet();//Binding Table...Master Details in two seperate GridView Controls
I am simply trying to have a list of people in the top grid control (works fine), then when selected have the second Grid Control show details for that person(not working).
Here is what I am trying from the load event:
Dim myConnection As New MySql.Data.MySqlClient.MySqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionSql"))
Dim strPersonSQL, strActSQL As String
strPersonSQL = "select row_id, first_name, last_name, middle_initial, dsi_id, created, created_by, program_of_study, email from tbl_person"
Dim myPerCommand As New MySqlClient.MySqlComm...Two Queries from Two different Databases = ONE Display/Table
What is the best approach to handle this situation? I have three different databases, which has it's own stored procedure. I need to call them all at page load and piece together the data. The common demoninator is the date.
Row 1 and Row 2 come from two different databases and stored procedures.
How can I query the data and present it as it's shown above?
&qu...time difference between two times.
I wanted to find the time difference between the current time in getdatetime() and the time stored in variable.
declare @time varchar(100)
declare @currenttime datetime
set @time=10:10:10 am (hh:mm:ss am/pm) format -- ( since this value is stored as varchar in table, here also i m using the same type)
set @currenttime--- (get server time)
@time-@currenttime --- ?
how to find this result????
We have a function which will returns the date & time in required format.
CREATE FUNCTION [dbo].[ufsFormat]
@Date ...testing two three two three two two
...Any difference between two control classes in net 2005
I have a problem with net 2005, i have two controls having the same namespace (namespace is: Controls), the first control class's name is 'Controls_ToolBar', and the second control class's name is 'Controls_ToolBarSeparator'. In the first class, i declare a variable which points to the second class, but it give error. Following is my code:First control class:Namespace Controls Public Class Controls_ToolBar Inherits Controls.ControlBase Private lastLabel As Controls.Controls_ToolBarSeparator = Noth...Combining two different datasoruces from two different servers?
I'm triying to combine two different sql datasoruces which are from two different sql servers. But I can't seem to get it work I would appreciate any help you guys can provide.
Here is my code so far.
Dim PCconnectionString As String = ConfigurationManager.ConnectionStrings("CenterConnectionString").ConnectionStringDim TCconnectionString As String = ConfigurationManager.ConnectionStrings("CoreConnectionString").ConnectionString
Dim PCcon As SqlConnection = New SqlConnection(PCconnectionString)Dim TCcon As SqlConnection = New SqlConnection(TCconnectionString)
Dim sqlPC As String = "S...two menu controls required in one aspx page with two different sitemap file
dears,in vs2005 website how it is possible to add two menus with two different sitemaps ??...here i did one menu control like as follows...now this menu is working fine with SiteMapDataSource1 and web.sitemap.now my requirement is i want to add one more menu control with another sitemap file...is it possible to do that way?can anybody help me for this?
<asp:Menu ID="Menu1" runat="server" BackColor="Green" BorderColor="Green" BorderStyle="Ridge" &...