I am trying to add some code to below to include a datatable and fill the
datatable. The reason for doing this is so as I can check to see whether
there are any rows returned by the stored procedure. If there are no records
returned then this would give me an indicator and I can re-direct the page
somewhere more appropriate. Well this is the theory. I have never used
datatables before and am not sure how to implemenet what I want so I was
wondering if someone could help me please. I basically just need a datatable
and then fill the datatable with my record set. Thanks for any help anyone
can give me.
private static SqlDataReader dr;
private void PPS4_ReportStar t(object sender, System.EventArg s eArgs)
{
//Create a Connection
SqlConnection conSQL = new
SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]);
//Create Parameter
SqlParameter @IPCURN = new SqlParameter
("@IPCURN", System.Data.Sql DbType.BigInt);
@IPCURN.Directi on = ParameterDirect ion.Input;
@IPCURN.Value = IPC;
//Create Parameter
SqlParameter @SUSPECTURN = new SqlParameter
("@SUSPECTUR N", System.Data.Sql DbType.BigInt);
@SUSPECTURN.Dir ection = ParameterDirect ion.Input;
@SUSPECTURN.Val ue = SUSPECT;
//Create a Command
SqlDataAdapter da = new SqlDataAdapter( );
//DataTable dt = new DataTable();
da.SelectComman d = new SqlCommand();
da.SelectComman d.Connection = conSQL;
da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 ";
da.SelectComman d.CommandType = CommandType.Sto redProcedure;
da.SelectComman d.Parameters.Ad d(@IPCURN);
da.SelectComman d.Parameters.Ad d(@SUSPECTURN);
conSQL.Open();
//Create a datareader
dr = da.SelectComman d.ExecuteReader ();
} 8 1600
hi Stephen
dont use a datareader,
just use:-
da.Fill(dt)
providing the parameters, connection, CommandText etc are ok thats all you
need
hth
guy
"Stephen" wrote: I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored procedure. If there are no records returned then this would give me an indicator and I can re-direct the page somewhere more appropriate. Well this is the theory. I have never used datatables before and am not sure how to implemenet what I want so I was wondering if someone could help me please. I basically just need a datatable and then fill the datatable with my record set. Thanks for any help anyone can give me.
private static SqlDataReader dr;
private void PPS4_ReportStar t(object sender, System.EventArg s eArgs) { //Create a Connection SqlConnection conSQL = new SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]);
//Create Parameter SqlParameter @IPCURN = new SqlParameter ("@IPCURN", System.Data.Sql DbType.BigInt); @IPCURN.Directi on = ParameterDirect ion.Input; @IPCURN.Value = IPC;
//Create Parameter SqlParameter @SUSPECTURN = new SqlParameter ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); @SUSPECTURN.Dir ection = ParameterDirect ion.Input; @SUSPECTURN.Val ue = SUSPECT;
//Create a Command SqlDataAdapter da = new SqlDataAdapter( ); //DataTable dt = new DataTable(); da.SelectComman d = new SqlCommand(); da.SelectComman d.Connection = conSQL; da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 "; da.SelectComman d.CommandType = CommandType.Sto redProcedure; da.SelectComman d.Parameters.Ad d(@IPCURN); da.SelectComman d.Parameters.Ad d(@SUSPECTURN);
conSQL.Open();
//Create a datareader dr = da.SelectComman d.ExecuteReader (); }
I need to use a datareader in order to read the populate the fields in my
report. Using active reports you see and I need to be able to have some way
for telling when no records are returned. At the moment if there are no
records a blank report comes back but I need to be able to count the rows in
a data table and then re-direct the page if no rows are present.
"guy" wrote: hi Stephen dont use a datareader,
just use:- da.Fill(dt)
providing the parameters, connection, CommandText etc are ok thats all you need
hth guy
"Stephen" wrote:
I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored procedure. If there are no records returned then this would give me an indicator and I can re-direct the page somewhere more appropriate. Well this is the theory. I have never used datatables before and am not sure how to implemenet what I want so I was wondering if someone could help me please. I basically just need a datatable and then fill the datatable with my record set. Thanks for any help anyone can give me.
private static SqlDataReader dr;
private void PPS4_ReportStar t(object sender, System.EventArg s eArgs) { //Create a Connection SqlConnection conSQL = new SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]);
//Create Parameter SqlParameter @IPCURN = new SqlParameter ("@IPCURN", System.Data.Sql DbType.BigInt); @IPCURN.Directi on = ParameterDirect ion.Input; @IPCURN.Value = IPC;
//Create Parameter SqlParameter @SUSPECTURN = new SqlParameter ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); @SUSPECTURN.Dir ection = ParameterDirect ion.Input; @SUSPECTURN.Val ue = SUSPECT;
//Create a Command SqlDataAdapter da = new SqlDataAdapter( ); //DataTable dt = new DataTable(); da.SelectComman d = new SqlCommand(); da.SelectComman d.Connection = conSQL; da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 "; da.SelectComman d.CommandType = CommandType.Sto redProcedure; da.SelectComman d.Parameters.Ad d(@IPCURN); da.SelectComman d.Parameters.Ad d(@SUSPECTURN);
conSQL.Open();
//Create a datareader dr = da.SelectComman d.ExecuteReader (); }
Stephen,
A datatable has a count
dt.rows.count
What do you want easier?
Cor
"Stephen" <St*****@discus sions.microsoft .com> I need to use a datareader in order to read the populate the fields in my report. Using active reports you see and I need to be able to have some way for telling when no records are returned. At the moment if there are no records a blank report comes back but I need to be able to count the rows in a data table and then re-direct the page if no rows are present.
"guy" wrote:
hi Stephen dont use a datareader,
just use:- da.Fill(dt)
providing the parameters, connection, CommandText etc are ok thats all you need
hth guy
"Stephen" wrote:
> I am trying to add some code to below to include a datatable and fill > the > datatable. The reason for doing this is so as I can check to see > whether > there are any rows returned by the stored procedure. If there are no > records > returned then this would give me an indicator and I can re-direct the > page > somewhere more appropriate. Well this is the theory. I have never used > datatables before and am not sure how to implemenet what I want so I > was > wondering if someone could help me please. I basically just need a > datatable > and then fill the datatable with my record set. Thanks for any help > anyone > can give me. > > private static SqlDataReader dr; > > private void PPS4_ReportStar t(object sender, System.EventArg s eArgs) > { > //Create a Connection > SqlConnection conSQL = new > SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]); > > //Create Parameter > SqlParameter @IPCURN = new SqlParameter > ("@IPCURN", System.Data.Sql DbType.BigInt); > @IPCURN.Directi on = ParameterDirect ion.Input; > @IPCURN.Value = IPC; > > //Create Parameter > SqlParameter @SUSPECTURN = new SqlParameter > ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); > @SUSPECTURN.Dir ection = ParameterDirect ion.Input; > @SUSPECTURN.Val ue = SUSPECT; > > //Create a Command > SqlDataAdapter da = new SqlDataAdapter( ); > //DataTable dt = new DataTable(); > da.SelectComman d = new SqlCommand(); > da.SelectComman d.Connection = conSQL; > da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 "; > da.SelectComman d.CommandType = CommandType.Sto redProcedure; > da.SelectComman d.Parameters.Ad d(@IPCURN); > da.SelectComman d.Parameters.Ad d(@SUSPECTURN); > > conSQL.Open(); > > //Create a datareader > dr = da.SelectComman d.ExecuteReader (); > }
I don;t want anything easier just need to be able to write some code which
counts the rows and if they are no rows then I need the code to re-direct the
page. Do you know the exact code which would help me do this. Sorry im very
knew to coding and am still learning so some things which may seem easy I
find quite hard, but im getting better.
"Cor Ligthert" wrote: Stephen,
A datatable has a count dt.rows.count
What do you want easier?
Cor
"Stephen" <St*****@discus sions.microsoft .com>
I need to use a datareader in order to read the populate the fields in my report. Using active reports you see and I need to be able to have some way for telling when no records are returned. At the moment if there are no records a blank report comes back but I need to be able to count the rows in a data table and then re-direct the page if no rows are present.
"guy" wrote:
hi Stephen dont use a datareader,
just use:- da.Fill(dt)
providing the parameters, connection, CommandText etc are ok thats all you need
hth guy
"Stephen" wrote:
> I am trying to add some code to below to include a datatable and fill > the > datatable. The reason for doing this is so as I can check to see > whether > there are any rows returned by the stored procedure. If there are no > records > returned then this would give me an indicator and I can re-direct the > page > somewhere more appropriate. Well this is the theory. I have never used > datatables before and am not sure how to implemenet what I want so I > was > wondering if someone could help me please. I basically just need a > datatable > and then fill the datatable with my record set. Thanks for any help > anyone > can give me. > > private static SqlDataReader dr; > > private void PPS4_ReportStar t(object sender, System.EventArg s eArgs) > { > //Create a Connection > SqlConnection conSQL = new > SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]); > > //Create Parameter > SqlParameter @IPCURN = new SqlParameter > ("@IPCURN", System.Data.Sql DbType.BigInt); > @IPCURN.Directi on = ParameterDirect ion.Input; > @IPCURN.Value = IPC; > > //Create Parameter > SqlParameter @SUSPECTURN = new SqlParameter > ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); > @SUSPECTURN.Dir ection = ParameterDirect ion.Input; > @SUSPECTURN.Val ue = SUSPECT; > > //Create a Command > SqlDataAdapter da = new SqlDataAdapter( ); > //DataTable dt = new DataTable(); > da.SelectComman d = new SqlCommand(); > da.SelectComman d.Connection = conSQL; > da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 "; > da.SelectComman d.CommandType = CommandType.Sto redProcedure; > da.SelectComman d.Parameters.Ad d(@IPCURN); > da.SelectComman d.Parameters.Ad d(@SUSPECTURN); > > conSQL.Open(); > > //Create a datareader > dr = da.SelectComman d.ExecuteReader (); > }
Stephen,
If dt.Rows.Count > 0 then
'DoStuff
Else
'DontDoStuff
End If
hth guy
"Stephen" wrote: I don;t want anything easier just need to be able to write some code which counts the rows and if they are no rows then I need the code to re-direct the page. Do you know the exact code which would help me do this. Sorry im very knew to coding and am still learning so some things which may seem easy I find quite hard, but im getting better.
"Cor Ligthert" wrote:
Stephen,
A datatable has a count dt.rows.count
What do you want easier?
Cor
"Stephen" <St*****@discus sions.microsoft .com>
I need to use a datareader in order to read the populate the fields in my report. Using active reports you see and I need to be able to have some way for telling when no records are returned. At the moment if there are no records a blank report comes back but I need to be able to count the rows in a data table and then re-direct the page if no rows are present.
"guy" wrote:
> hi Stephen > dont use a datareader, > > just use:- > da.Fill(dt) > > providing the parameters, connection, CommandText etc are ok thats all > you > need > > hth > guy > > "Stephen" wrote: > > > I am trying to add some code to below to include a datatable and fill > > the > > datatable. The reason for doing this is so as I can check to see > > whether > > there are any rows returned by the stored procedure. If there are no > > records > > returned then this would give me an indicator and I can re-direct the > > page > > somewhere more appropriate. Well this is the theory. I have never used > > datatables before and am not sure how to implemenet what I want so I > > was > > wondering if someone could help me please. I basically just need a > > datatable > > and then fill the datatable with my record set. Thanks for any help > > anyone > > can give me. > > > > private static SqlDataReader dr; > > > > private void PPS4_ReportStar t(object sender, System.EventArg s eArgs) > > { > > //Create a Connection > > SqlConnection conSQL = new > > SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]); > > > > //Create Parameter > > SqlParameter @IPCURN = new SqlParameter > > ("@IPCURN", System.Data.Sql DbType.BigInt); > > @IPCURN.Directi on = ParameterDirect ion.Input; > > @IPCURN.Value = IPC; > > > > //Create Parameter > > SqlParameter @SUSPECTURN = new SqlParameter > > ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); > > @SUSPECTURN.Dir ection = ParameterDirect ion.Input; > > @SUSPECTURN.Val ue = SUSPECT; > > > > //Create a Command > > SqlDataAdapter da = new SqlDataAdapter( ); > > //DataTable dt = new DataTable(); > > da.SelectComman d = new SqlCommand(); > > da.SelectComman d.Connection = conSQL; > > da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 "; > > da.SelectComman d.CommandType = CommandType.Sto redProcedure; > > da.SelectComman d.Parameters.Ad d(@IPCURN); > > da.SelectComman d.Parameters.Ad d(@SUSPECTURN); > > > > conSQL.Open(); > > > > //Create a datareader > > dr = da.SelectComman d.ExecuteReader (); > > }
Stephen,
I see now it is almost the complete because you had already everything in it
for the datatable. therefore I only needed to changed the first and the
last lines.
\\\\
///private static SqlDataReader dr;
private void PPS4_ReportStar t(object sender, System.EventArg s eArgs)
{
//Create a Connection
SqlConnection conSQL = new
SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]);
//Create Parameter
SqlParameter @IPCURN = new SqlParameter
("@IPCURN", System.Data.Sql DbType.BigInt);
@IPCURN.Directi on = ParameterDirect ion.Input;
@IPCURN.Value = IPC;
//Create Parameter
SqlParameter @SUSPECTURN = new SqlParameter
("@SUSPECTUR N", System.Data.Sql DbType.BigInt);
@SUSPECTURN.Dir ection = ParameterDirect ion.Input;
@SUSPECTURN.Val ue = SUSPECT;
//Create a Command
SqlDataAdapter da = new SqlDataAdapter( );
//DataTable dt = new DataTable();
da.SelectComman d = new SqlCommand();
da.SelectComman d.Connection = conSQL;
da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 ";
da.SelectComman d.CommandType = CommandType.Sto redProcedure;
da.SelectComman d.Parameters.Ad d(@IPCURN);
da.SelectComman d.Parameters.Ad d(@SUSPECTURN);
//conSQL.Open(); is not needed
//Create a datareader
///da.SelectComman d.ExecuteReader (); not needed
da.Fill(dt)
If (dt.Rows.Count! =0) {Response.Redir ect("Whatever") ;}
}
I hope this goes, do not watch typos or whatever..
Cor
oops didnt spot it was C#
sorry lads!
"guy" wrote: Stephen, If dt.Rows.Count > 0 then 'DoStuff Else 'DontDoStuff End If
hth guy
"Stephen" wrote:
I don;t want anything easier just need to be able to write some code which counts the rows and if they are no rows then I need the code to re-direct the page. Do you know the exact code which would help me do this. Sorry im very knew to coding and am still learning so some things which may seem easy I find quite hard, but im getting better.
"Cor Ligthert" wrote:
Stephen,
A datatable has a count dt.rows.count
What do you want easier?
Cor
"Stephen" <St*****@discus sions.microsoft .com>
>I need to use a datareader in order to read the populate the fields in my > report. Using active reports you see and I need to be able to have some > way > for telling when no records are returned. At the moment if there are no > records a blank report comes back but I need to be able to count the rows > in > a data table and then re-direct the page if no rows are present. > > "guy" wrote: > >> hi Stephen >> dont use a datareader, >> >> just use:- >> da.Fill(dt) >> >> providing the parameters, connection, CommandText etc are ok thats all >> you >> need >> >> hth >> guy >> >> "Stephen" wrote: >> >> > I am trying to add some code to below to include a datatable and fill >> > the >> > datatable. The reason for doing this is so as I can check to see >> > whether >> > there are any rows returned by the stored procedure. If there are no >> > records >> > returned then this would give me an indicator and I can re-direct the >> > page >> > somewhere more appropriate. Well this is the theory. I have never used >> > datatables before and am not sure how to implemenet what I want so I >> > was >> > wondering if someone could help me please. I basically just need a >> > datatable >> > and then fill the datatable with my record set. Thanks for any help >> > anyone >> > can give me. >> > >> > private static SqlDataReader dr; >> > >> > private void PPS4_ReportStar t(object sender, System.EventArg s eArgs) >> > { >> > //Create a Connection >> > SqlConnection conSQL = new >> > SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]); >> > >> > //Create Parameter >> > SqlParameter @IPCURN = new SqlParameter >> > ("@IPCURN", System.Data.Sql DbType.BigInt); >> > @IPCURN.Directi on = ParameterDirect ion.Input; >> > @IPCURN.Value = IPC; >> > >> > //Create Parameter >> > SqlParameter @SUSPECTURN = new SqlParameter >> > ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); >> > @SUSPECTURN.Dir ection = ParameterDirect ion.Input; >> > @SUSPECTURN.Val ue = SUSPECT; >> > >> > //Create a Command >> > SqlDataAdapter da = new SqlDataAdapter( ); >> > //DataTable dt = new DataTable(); >> > da.SelectComman d = new SqlCommand(); >> > da.SelectComman d.Connection = conSQL; >> > da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 "; >> > da.SelectComman d.CommandType = CommandType.Sto redProcedure; >> > da.SelectComman d.Parameters.Ad d(@IPCURN); >> > da.SelectComman d.Parameters.Ad d(@SUSPECTURN); >> > >> > conSQL.Open(); >> > >> > //Create a datareader >> > dr = da.SelectComman d.ExecuteReader (); >> > }
Guy,
Why sorry, this is a general group, not the Csharp newsgroup, that one is
microsoft.publi c.dotnet.langua ges.csharp
Here you can give samples in every Net program code.
Cor oops didnt spot it was C# sorry lads!
"guy" wrote:
Stephen, If dt.Rows.Count > 0 then 'DoStuff Else 'DontDoStuff End If
hth guy
"Stephen" wrote:
> I don;t want anything easier just need to be able to write some code > which > counts the rows and if they are no rows then I need the code to > re-direct the > page. Do you know the exact code which would help me do this. Sorry im > very > knew to coding and am still learning so some things which may seem easy > I > find quite hard, but im getting better. > > "Cor Ligthert" wrote: > > > Stephen, > > > > A datatable has a count > > dt.rows.count > > > > What do you want easier? > > > > Cor > > > > "Stephen" <St*****@discus sions.microsoft .com> > > > > >I need to use a datareader in order to read the populate the fields > > >in my > > > report. Using active reports you see and I need to be able to have > > > some > > > way > > > for telling when no records are returned. At the moment if there > > > are no > > > records a blank report comes back but I need to be able to count > > > the rows > > > in > > > a data table and then re-direct the page if no rows are present. > > > > > > "guy" wrote: > > > > > >> hi Stephen > > >> dont use a datareader, > > >> > > >> just use:- > > >> da.Fill(dt) > > >> > > >> providing the parameters, connection, CommandText etc are ok thats > > >> all > > >> you > > >> need > > >> > > >> hth > > >> guy > > >> > > >> "Stephen" wrote: > > >> > > >> > I am trying to add some code to below to include a datatable and > > >> > fill > > >> > the > > >> > datatable. The reason for doing this is so as I can check to see > > >> > whether > > >> > there are any rows returned by the stored procedure. If there > > >> > are no > > >> > records > > >> > returned then this would give me an indicator and I can > > >> > re-direct the > > >> > page > > >> > somewhere more appropriate. Well this is the theory. I have > > >> > never used > > >> > datatables before and am not sure how to implemenet what I want > > >> > so I > > >> > was > > >> > wondering if someone could help me please. I basically just need > > >> > a > > >> > datatable > > >> > and then fill the datatable with my record set. Thanks for any > > >> > help > > >> > anyone > > >> > can give me. > > >> > > > >> > private static SqlDataReader dr; > > >> > > > >> > private void PPS4_ReportStar t(object sender, System.EventArg s > > >> > eArgs) > > >> > { > > >> > //Create a Connection > > >> > SqlConnection conSQL = new > > >> > SqlConnection(C onfigurationSet tings.AppSettin gs["DBConnectionSt ring"]); > > >> > > > >> > //Create Parameter > > >> > SqlParameter @IPCURN = new SqlParameter > > >> > ("@IPCURN", System.Data.Sql DbType.BigInt); > > >> > @IPCURN.Directi on = ParameterDirect ion.Input; > > >> > @IPCURN.Value = IPC; > > >> > > > >> > //Create Parameter > > >> > SqlParameter @SUSPECTURN = new SqlParameter > > >> > ("@SUSPECTUR N", System.Data.Sql DbType.BigInt); > > >> > @SUSPECTURN.Dir ection = ParameterDirect ion.Input; > > >> > @SUSPECTURN.Val ue = SUSPECT; > > >> > > > >> > //Create a Command > > >> > SqlDataAdapter da = new SqlDataAdapter( ); > > >> > //DataTable dt = new DataTable(); > > >> > da.SelectComman d = new SqlCommand(); > > >> > da.SelectComman d.Connection = conSQL; > > >> > da.SelectComman d.CommandText = "rep_PersonChar gedInCustody_PP S4 > > >> > "; > > >> > da.SelectComman d.CommandType = CommandType.Sto redProcedure; > > >> > da.SelectComman d.Parameters.Ad d(@IPCURN); > > >> > da.SelectComman d.Parameters.Ad d(@SUSPECTURN); > > >> > > > >> > conSQL.Open(); > > >> > > > >> > //Create a datareader > > >> > dr = da.SelectComman d.ExecuteReader (); > > >> > } > > > > > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MikeY |
last post by:
Hi everyone,
I have posted earlier this week, but I'm still scratching my head trying to
figure out how to change/modify my data back to my db.
Using C# Windows forms. I am trying to learn how to modify existing data
with in my DB/MSDE. In general, I have textbox's filled with existing data
from my "Employee" table. I have amongst other buttons, an "Update" button.
Where, when viewing, if I want to change ie the persons name, anyother...
|
by: Bharat |
last post by:
Hi Folks,
Suppose I have two link button on a page (say lnkBtn1 and
lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically
created control. And On the click event of the lnkBtn2 I have to add a
datalist control.
Using this datalist control I should be able to add edit, modify
and cancel the items listed in this control.
Here is how I designed. I used placeholder to add the controls dynamically
to the page on the click...
|
by: Jean Christophe Avard |
last post by:
Hi! I'm designing an application that produces invoices. I have a combobox
that is populated with the Name of every client in the database. What I
would like to do is to have the combobox to display the name, and to have
the value set to the ID of the record...
Like in HTML where you have something like: <option value="ID_NUMBER(primary
key)">CLIENT_NAME</option>
so, let's say the user selects "Client #2" in the combo box, then I would...
|
by: Stephen |
last post by:
I am trying to add some code to below to include a datatable and fill the
datatable. The reason for doing this is so as I can check to see whether
there are any rows returned by the stored procedure. If there are no records
returned then this would give me an indicator and I can re-direct the page
somewhere more appropriate. Well this is the theory. I have never used
datatables before and am not sure how to implemenet what I want so I was...
|
by: Jeff |
last post by:
I am stuck on trying to generate two columns headers for a datagrid on
form load. I can use a datatable as the datasource and get the results
I want, but I want to set different column widths and don't see a way
to do this through the datagrid properties. I am not using a database
connection, I just want to set column headers on the datagrid. I am
somewhat new to vb.net. Here is the code I am using. This code works
when the...
| |
by: kewl |
last post by:
Hi All,
We have an ASP.NET 2.0 (C#) intranet application that needs to spawn multiple browsers using RegisterClientScriptBlock. Here's what we got so far:
// Go thru each datarow in the datatable
foreach (System.Data.DataRow drReportGroupsDetails in tableReportGroupsDetails.Rows)
{
// Get the needed values from the datatable
string reportName = (string)drReportGroupsDetails;
string reportPath = (string)drReportGroupsDetails;
|
by: sapkal.manish |
last post by:
Question : How can I find actual row position of DataTable in
DataGridView when DataTable is sorted
/ My source code like this
Private WithEvent dgvInwDet as new DataGridView
Private WithEvent DataTable as New DataTable
|
by: Shum |
last post by:
Hi all!!! I found this piece of code from one of the threads here, I too want to get the list of tables and data types of columns, but when i tried to use this code in my program it gives me error:
"WindowsApplication2\Form1.cs(202): The type or namespace name 'TableInfo' could not be found (are you missing a using directive or an assembly reference?)"
and similar errors for m_oleDbSrcConn and table info obj... which namespaces do u think...
|
by: Frank Rizzo |
last post by:
I am trying to create a parametrized generic object, but the compiler won't
let me. Is this just the way it is? The class has a constraint that says
all classes must inherit from BusinessBase, which specifies a parametrized
constructor. But c# won't let me do it.
public class DataHelper<Twhere T : BusinessBase, new()
{
public static List<TDataTableToList(DataTable dataTable)
{
List<TlistOfItems = new List<T>();
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |