How to update dataset with multiple tables in C#?
I create 2 tables, ParentTable and ChildTable. The row in ChildTable
is referenced to ParentTable. But after updated and saved to
database, the row in ChildTable doesn't refer to the correct row in
ParentTable. You can see the following example to get the problems.
Is there any good way to update multiple tables by using
SqlDataAdapter.Update()? Thank you
/* New Rows in ParentTable and ChildTable
*
* ------ParentTable------
* ID Animal
* 1 Cat
*
*
* ------ChildTable------
* ID NAME ParentID
* "1 small cat 1"
*/
/*
* But after the new rows saved back to the database, the new rows
saved wrongly as:
*
* ------ChildTable------
* ID NAME ParentID
* 1 small bird 1
* 2 small dog 2
* 3 small cat 1 =====> The ParentID doesn't dynamically change to 3
but keep the same as 1.
* This makes it doen't reference to the correct row in ParentTable
*/
------------------------------------------------------------------------------------
I try to use 2 different ways to update tables. But they both result
in the same problem. The first way I use is to follow the update
sequence recommended by book:
adapter1= new SqlDataAdapter("Select * from ChildTable", con);
SqlDataAdapter adapter2= new SqlDataAdapter("Select * from
ParentTable", con);
SqlCommandBuilder sb = new SqlCommandBuilder(adapter1);
SqlCommandBuilder sb1 = new SqlCommandBuilder(adapter2);
adapter1.Update(NewDataSet.Tables["ChildTable"].Select(null, null,
DataViewRowState.Deleted));
adapter2.Update(NewDataSet.Tables["ParentTable"].Select(null, null,
DataViewRowState.Deleted));
adapter2.Update(NewDataSet.Tables["ParentTable"].Select(null, null,
DataViewRowState.ModifiedCurrent));
adapter2.Update(NewDataSet.Tables["ParentTable"].Select(null, null,
DataViewRowState.Added));
adapter1.Update(NewDataSet.Tables["ChildTable"].Select(null, null,
DataViewRowState.ModifiedCurrent));
adapter1.Update(NewDataSet.Tables["ChildTable"].Select(null, null,
DataViewRowState.Added));
-------------------------------------------------------------------------------------
The 2nd way is to use 2 SqlDataAdapter seperately to update tables,
but still get the same problem : The Child table row "3 small cat 1"
is wrong
adapter1= new SqlDataAdapter("Select * from ChildTable", con);
SqlDataAdapter adapter2= new SqlDataAdapter("Select * from
ParentTable", con);
SqlCommandBuilder sb = new SqlCommandBuilder(adapter1);
SqlCommandBuilder sb1 = new SqlCommandBuilder(adapter2);
adapter1.Update(NewDataSet.Tables["ChildTable"]);
adapter2.Update(NewDataSet.Tables["ParentTable"]);
Please refer to the UpdateTableMethod1() and UpdateTableMethod2() in
the codes I provide.
------------------------------------------------------------------------------------
I just put some codes on the website. If you are also interested, you
can just copy-paste the code on your file and run it. This code would
generate 2 tables and insert content to the tables in NorthWindCs
database in MsSql server. Please change the connection string to
yours.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace UpdateMultipleTables
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.DataGrid dataGrid1;
//private conStr = "Server=Local; SSPT = true; ";
private string conStr = "server=Local;User ID=sa;
PWD=hello;database=NorthWindCs";
SqlDataAdapter adapter1 ;
SqlConnection con ;
private DataSet NewDataSet;
public Form1()
{
InitializeComponent();
//Create the connection to DataBase
CreateConnection();
//Create tables "ParentTable" and "ChildTable". And Insert content to
the 2 tables
CreateDB();
//Create a new row in both ParentTable and ChildTable
CreateNewRow();
//I try 2 ways to update the tables. But both of them gave me the same
problem,
//The new row in "ChildTable": is WRONG!
//UpdateTable1Method1();
UpdateTableMethod2();
}
public void CreateConnection()
{
con = new SqlConnection(conStr);
}
//Create tables "ParentTable" and "ChildTable". And Insert content to
the 2 tables
public void CreateDB()
{
string commandText =
"if exists (select * from NorthwindCS.dbo.sysobjects where name like
'ParentTable') "+
"Begin " +
"DROP TABLE ParentTable "+
"CREATE TABLE ParentTable( ID INT IDENTITY(1,1) NOT NULL , Animal
VARCHAR(40) NOT NULL ) "+
"INSERT INTO ParentTable( Animal) values('Bird') "+
"INSERT INTO ParentTable( Animal) values('Dog') "+
"END "+
"ELSE "+
"Begin "+
"CREATE TABLE ParentTable( ID INT IDENTITY(1,1) NOT NULL , Animal
VARCHAR(40) NOT NULL ) "+
"INSERT INTO ParentTable( Animal) values('Bird') "+
"INSERT INTO ParentTable( Animal) values('Dog') "+
"END "+
"IF exists (select * from NorthwindCS.dbo.sysobjects where name like
'ChildTable') "+
"Begin "+
"DROP table ChildTable "+
"CREATE TABLE ChildTable( ID INT IDENTITY(1,1) NOT NULL , Name
VARCHAR(40) NOT NULL , ParentID INT Not NULL) "+
"INSERT INTO ChildTable( Name, ParentID) values('small bird', 1) "+
"INSERT INTO ChildTable( Name ,ParentID) values('small dog', 2) "+
"END "+
"ELSE "+
"BEGIN "+
"CREATE TABLE ChildTable( ID INT IDENTITY(1,1) NOT NULL , Name
VARCHAR(40) NOT NULL , ParentID INT Not NULL) "+
"INSERT INTO ChildTable( Name, ParentID) values('small bird', 1) "+
"INSERT INTO ChildTable( Name ,ParentID) values('small dog', 2) "+
"END ";
adapter1 = new SqlDataAdapter(commandText, con);
try
{
DataSet ds = new DataSet();
adapter1.Fill(ds);
dataGrid1.DataSource = ds;
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
}
/* New Rows in ParentTable and ChildTable
*
* ------ParentTable------
* ID Animal
* 1 Cat
*
*
* ------ChildTable------
* ID NAME ParentID
* "1 small cat 1"
*/
/*
* But after the new rows saved back to the database, the new rows
saved wrongly as:
*
* ------ChildTable------
* ID NAME ParentID
* 1 small bird 1
* 2 small dog 2
* 3 small cat 1 =====> The ParentID doesn't dynamically change to 3
but keep the same as 1.
* This makes it doen't reference to the correct row in ParentTable
*/
//Create a new row in both ParentTable and ChildTable
public void CreateNewRow()
{
//carete data in parent table
NewDataSet = new DataSet("NewDataSet");
DataTable ParentTable = new DataTable("ParentTable");
DataColumn dc = new DataColumn("ID", typeof(int));
dc.AutoIncrement = true;
dc.AutoIncrementSeed = 1;
dc.AutoIncrementStep = 1;
ParentTable.Columns.Add(dc);
dc = new DataColumn("Animal", typeof(string));
ParentTable.Columns.Add(dc);
NewDataSet.Tables.Add(ParentTable);
DataTable ChildTable = new DataTable("ChildTable");
dc = new DataColumn("ID", typeof(int));
dc.AutoIncrement = true;
dc.AutoIncrementSeed = 1;
dc.AutoIncrementStep = 1;
ChildTable.Columns.Add(dc);
dc = new DataColumn("Name", typeof(string));
ChildTable.Columns.Add(dc);
dc = new DataColumn("ParentID", typeof(int));
ChildTable.Columns.Add(dc);
NewDataSet.Tables.Add(ChildTable);
// DataRelation relation = new DataRelation("ParentChildRelation" ,
ParentTable.Columns["ID"], ChildTable.Columns["ParentID"], true);
// NewDataSet.Relations.Add(relation);
DataRow dr = NewDataSet.Tables["ParentTable"].NewRow();
dr["Animal"] = "Cat";
NewDataSet.Tables["ParentTable"].Rows.Add(dr);
//carete data in child table
dr = NewDataSet.Tables["ChildTable"].NewRow();
dr["Name"] = "small cat";
dr["ParentID"] = NewDataSet.Tables["ParentTable"].Rows[0]["ID"];
NewDataSet.Tables["ChildTable"].Rows.Add(dr);
dataGrid1.DataSource = NewDataSet;
}
//This update method followed by the recommended sequence of updateing
tables in Oreilly book. But it doesn't solve
//my proble. The Child table row "3 small cat 1" is wrong
public void UpdateTableMethod1()
{
try
{
adapter1= new SqlDataAdapter("Select * from ChildTable", con);
SqlDataAdapter adapter2= new SqlDataAdapter("Select * from
ParentTable", con);
SqlCommandBuilder sb = new SqlCommandBuilder(adapter1);
SqlCommandBuilder sb1 = new SqlCommandBuilder(adapter2);
adapter1.Update(NewDataSet.Tables["ChildTable"].Select(null, null,
DataViewRowState.Deleted));
adapter2.Update(NewDataSet.Tables["ParentTable"].Select(null, null,
DataViewRowState.Deleted));
adapter2.Update(NewDataSet.Tables["ParentTable"].Select(null, null,
DataViewRowState.ModifiedCurrent));
adapter2.Update(NewDataSet.Tables["ParentTable"].Select(null, null,
DataViewRowState.Added));
adapter1.Update(NewDataSet.Tables["ChildTable"].Select(null, null,
DataViewRowState.ModifiedCurrent));
adapter1.Update(NewDataSet.Tables["ChildTable"].Select(null, null,
DataViewRowState.Added));
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
}
//I try to use 2 SqlDataAdapter to update tables, but still get the
same problem : The Child table row "3 small cat 1" is wrong
public void UpdateTableMethod2()
{
try
{
adapter1= new SqlDataAdapter("Select * from ChildTable", con);
SqlDataAdapter adapter2= new SqlDataAdapter("Select * from
ParentTable", con);
SqlCommandBuilder sb = new SqlCommandBuilder(adapter1);
SqlCommandBuilder sb1 = new SqlCommandBuilder(adapter2);
adapter1.Update(NewDataSet.Tables["ChildTable"]);
adapter2.Update(NewDataSet.Tables["ParentTable"]);
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(16, 24);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(496, 216);
this.dataGrid1.TabIndex = 0;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(560, 294);
this.Controls.Add(this.dataGrid1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------* Tag: Three-Tier Application Examples. Tag: 103874
NullReferenceException in call to DataTable Select
I'm trying to use the Select() method on a DataTable but I'm getting a
NullReferenceException. Here's the stack trace:
at System.Data.Select.Evaluate(Int32 record)
at System.Data.Select.FindFirstMatchingRecord()
at System.Data.Select.GetBinaryFilteredRecords()
at System.Data.Select.SelectRows()
at System.Data.DataTable.Select(String filterExpression, String sort)
I've found a work-around but I can't explain why it works. The work
around is to call the Select() method once first without a filter
argument, then to call it again with the actual filter argument you're
interested in. Like this:
DataRow[] records = ds.Tables["MyTable"].Select("", "C1, C2, C3, C4,
C5, ID"); //note the empty string as the filter
records = ds.Tables["MyTable"].Select(myFilter, "C1, C2, C3, C4, C5,
ID"); //myFilter contains the actual filter value
And for some reason the sorting string to the first Select() call has
to be the same string that's used in the second Select() call. So doing
this wouldn't work:
DataRow[] records = ds.Tables["MyTable"].Select("");
records = ds.Tables["MyTable"].Select(myFilter, "C1, C2, C3, C4, C5,
ID");
The reason I discovered this work-around is that if you copy and paste
the entire call to the Select() method into one of the debugger watch
windows, you'll get a message stating the same null reference exception
as the value of the expression. But if you replace the filter with ""
in the Select() call in the watch window, it will return the correct
result as the expression value. Then if you step through the actual
code it works (it doesn't throw the exception)! It's like the DataTable
needs to be re-initialized before you can call the Select() method,
even if you do it in the debugger watch window.
Does anyone have any ideas about what's going on here?
Thanks,
Dave Tag: Three-Tier Application Examples. Tag: 103868
Like keyword
Hi Group
I have one column which can be either Null or with some value.
I have one filter criteria in From End with
"All", 'RTF Yes' and 'RTF No'.
Depending on the filter selected by user i have to select the pertaining
rows as below
If Filter "All" select all rows from table
if Filter = 'RTF yes' select only rows where 'RTF yes' in rows ( where
columns in not null )
if Filter = 'RTF No' select only rows where column is null
how can i put this into where clause.
Please advice.
Thanks
Pat.... Tag: Three-Tier Application Examples. Tag: 103863
Optimizing multiple rows storing into Access 2003. Need Help!
Hi I am looking for a way to optimize my data storing into an Access
2003 Table (the mdb file I am using is Access 2000 version)
oleDbDataAdapter seem to write one row at time even if it receives
multiple rows
I tried this code below
CalBackFunc() <- My call back func is called every second approx
{
......
TypedDataSet1.Merge(?? ) //<- My main dataset in updated here
if(CycleCount>20)
{
CycleCount=0; //<- Every 20 times I make an update into the
//- database to reduce the I/O stuff
MyDt=new MyTypedDataSet();
MyDt.Merge(TypedDataSet1.MyTable1.GetChanges()); <- I copy
//the new data here
TypedDataSet1.MyTable1.AcceptChanges();
oleDbDataAdapter1.Update(MyDt.MyTable1); <-I make my storing
into the database here with 20 rows each time
}
}
This don't seem to work as I want it; I am looking if there is an
auther way to store multiple rows in the same time into Access
database.
Maybe like storing into an xml file and periodically store it back to
the database in one shot.
Could some one tell me how can I optimize this kind of storing, it
would be very healpful.
Thanks a lot
Yachea Tag: Three-Tier Application Examples. Tag: 103861
Re: DataAdapter problems...
OK
I have made a little progress on this....
Seems I was missing:
dataset.Tables[0].AcceptChanges();
However, this alone did not fix it.... I needed to manually assign the value
from the 'bound' textbox, by doing...
dataset.Tables[0].Rows[0]["Name"]=boundtextbox.Text.ToString();
This seems odd to me... as the textbox appears bound to the datatable, but
when I change the value, it doesn't seem to be writing back properly....
although a MessageBox.Show(dataset.Tables[0].Rows[0]["Name"].ToString());
shows the correct value... it doesn't have the same (required) effect until
I specifically assign the value in code.
Can anyone help??
Thanks
"Paul Aspinall" <paul@aspy.co.uk> wrote in message news:...
> Hi
> I have a dataset which consists of a datatable.
>
> I make changes to the data in the datatable, via the use of a bound
> textbox. When debugging, I output the value of:
>
> dataset.Tables[0].Rows[0]["Name"].ToString()
>
> and this reflects the correct value that I want. However, the dataadapter
> does not seem to recognise the change, and doesn't update the underlying
> table back to the DB.
>
>
>
> However, if I specifically set the value of the DB, via
>
> dataset.Tables[0].Rows[0]["Name"]="aaaaa";
>
> then all seems to work fine.....
>
>
>
> Any ideas??
>
>
>
> Thanks
>
>
>
> Tag: Three-Tier Application Examples. Tag: 103860
DataAdapter problems...
Hi
I have a dataset which consists of a datatable.
I make changes to the data in the datatable, via the use of a bound textbox.
When debugging, I output the value of:
dataset.Tables[0].Rows[0]["Name"].ToString()
and this reflects the correct value that I want. However, the dataadapter
does not seem to recognise the change, and doesn't update the underlying
table back to the DB.
However, if I specifically set the value of the DB, via
dataset.Tables[0].Rows[0]["Name"]="aaaaa";
then all seems to work fine.....
Any ideas??
Thanks Tag: Three-Tier Application Examples. Tag: 103858
SQL Server Error Trapping in ASP/ASP.NET
I've run into an odd bit of behavior when dealing with SQL Server 2000 and
ASP/ASP.NET that I wanted to discuss.
The issue I encounter is that in a stored procedure, once a SELECT statement
succeeds and returns a recordset, all resulting errors are ignored by
ASP/ASP.NET in certain cases (see details below). Wouldn't you expect the
ADO/ADO.NET command to fail if the procedure it calls fails?
For example, I created a simple stored procedure that is meant to fail after
successfully returning a recordset.
--------------------------------------------------------------------------
CREATE PROCEDURE spt_TestSqlErrors
@ErrMsg VARCHAR(255) = '' OUTPUT
AS
--SUCCEEDS returns a recordset
SELECT 'Test' AS FirstName, 'User' AS LastName
--SUCCEEDS but does not return a recordset
DECLARE @SelectResults VARCHAR(255)
SELECT @SelectResults = FirstName FROM tblUsers WHERE UserID = 12345
--SUCCEEDS but updates 0 records
UPDATE tblPerson SET ID=0 WHERE 1=0
--FAILS divide by zero
SELECT 12/0 AS DivisionError
--SUCCEEDS and raises an error
SET @ErrMsg = 'Error Message.'
RAISERROR(@ErrMsg, 16, 1) WITH LOG
GO
--------------------------------------------------------------------------
With ASP.NET
Command.ExecuteNonQuery - will return an error (Divide By Zero)
Command.ExecuteDataReader - will not return an error (Divide By Zero)
Adapter.Fill - will return an error (Divide By Zero)
With ASP
Command.ExecuteNonQuery - err object does not register an error
Recordset.Open - err object does not register an error
Use whatever hypothetical situation you like to explain why a stored
procedure would return multiple recordsets and would raise an error if the
second recordset didn't exist. Wouldn't you expect the DivideByZero or
Raiserror to roll up to ASP and ASP.NET in all situations and not be ignored
by the ExecuteDataReader or by ASP completely?
What do you think?
Paul Tag: Three-Tier Application Examples. Tag: 103852
Lock tables during SELECT
I am doing a transfer operation from one database to another.
During that time, I want to lock some tables so no new data can be written.
How can I do this ?
--
incognito...updated almost daily
http://kentpsychedelic.blogspot.com
Texeme Textcasting Technology
http://texeme.com Tag: Three-Tier Application Examples. Tag: 103851
vb.net version 1.1 Can't connect to SQL server2000 on a server.
Can someone tell me why I can't use the data adapter to SQL server 2000 on my
server using vb.net 1.1? When I try from my workstation, I get a good test
connection message, but then VB will tell me the following message "Unable to
connect to database. It is only possible to connect to SQL Server Desktop
Engine Database with this version of Visual Studio."
Can someone tell me how to get around this, or what I need to buy to enable
this data connection?
Thanks a lot for any help. Tag: Three-Tier Application Examples. Tag: 103850
TableMappings
Hi,
I got a problem by putting 3 SELECT statements in one DataAdatper. I try
to build a 'Select' DataAdatper, which only has select command. I put
following lines in select commandtext
Select * from Orders;
Select * from OrderProducts;
Select * from Products;
I use DataAdapter wizard. DataAdapter wizard will generate 3 tables
automatically like Table, Table1, Table2. Then I go to set table mappings
like Table --> Orders, Table1-->OrderProducts, and Table2 ---> Products. It
seems work find until I try to remove 2nd select. After I remove 2nd Select,
my table mappings are all messed up, Table-->Orders, Table1-->OrderProducts.
It is wrong. I thought if I remove 2nd Select, 2nd tab mapping should be
remove too. In fact, I am wrong. So my question is how to let TabMappings be
synchronized when a Select commad is removed.
Thanks !
fei Tag: Three-Tier Application Examples. Tag: 103848
Cannot Create a Dataset for an OLEDB DataAdapter
Hello,
I have an OLEDB DataAdapter and cannot create a Dataset to use with the
adapter because the SelectCommand contains a parameter. Is there a work
around for this?
Any Help is appreciated.
Thank You Tag: Three-Tier Application Examples. Tag: 103847
Error while using Scope_Identity() instead of @@identity. WHY?
Hello everyone,
I am trying to get back the primary key and was using @@identity
without any problem. However, when I use scope_identity() I get the
following error.
"Cast from type 'DBNull' to type 'Integer' is not valid."
Please help.
Thanks Tag: Three-Tier Application Examples. Tag: 103846
Error joining tables from separate db's using SqlCommand object
I'm trying to run a query that joins tables from 2 databases on the
same server. The query is like this:
SELECT TitleID, u.Name as Assignee
FROM tblTitle t
LEFT JOIN titlepost..Portal_Users u
ON t.TitleProcessor = u.email
When I put it in a stored procedure and execute the sp using SqlCommand
object, there are no problems. But I need to be able to run this query
using the CommandText property rather than by calling a stored
procedure. When I attempt this, I get "Invalid object name
'titlepost.dbo.PortalUsers'". My connection string is
"server=10.10.10.10;Trusted_Connection=true;database=abstractors"
Any suggestions are appreciated.
Corbin Tag: Three-Tier Application Examples. Tag: 103843
Constructing a Dataset from XML
I have an XML file I've created in another application that contains
information on files, forms, and job header. My plan is, in my new
"consumer" app, to read in this data and work with it, ultimately
producing labels for shipping, etc.
My planned approach is to construct a Dataset with 3 DataTables from this
data: One table for job header; one table for form info; and one table
for specific records. Then I want to set up one-to-many relations from
the top, down.
It's probably the SQL Server programmer in me that I'm taking this
approach, am I overthinking it? Should I just stick with a flat
DataTable? Would a collection be a better choice? What benefits will I
get from the DataRelations? If I set up a DataGrid on my form, can I
easily display, say, Job Number | Form Code | Record Filename, etc.? In
other words, if I'm not creating a database on some other server, do I
benefit by going to the trouble of normalizing the data in this way?
I'd appreciate any comments.
--
Michael Kellogg Tag: Three-Tier Application Examples. Tag: 103835
ASP.NET Connection String
Hello, I have successfully been using the following connection string to
connect via a SQLConnection object in my ASP.Net application for many weeks:
Data Source=MARS-TEST;Initial Catalog=CascadeWMCClient;UID=marsweb;PWD=marsweb
Today, after our Network Support Technician added a hard drive to the
machine, I can no longer connect to the machine via an ASP.Net application on
my development PC. When I attempt to do so, I get this error: SQL Server Does
Not Exist Or Access Denied.
I am using the same connection string on our Web Server, and this will
connect fine, using the same connection string.
Can anyone explain the likely cause for the error above? It seems odd that
this has only occurred since the machine was rebooted? Tag: Three-Tier Application Examples. Tag: 103834
copy datatables between datasets..
How do I copy a table from one dataset to another ?
code I am using and that is not working :
dataset2.tables.add(dataset1.tables(tablename))
Please help me.
prashant Tag: Three-Tier Application Examples. Tag: 103832
Use data designers in non-visual component
Is there any way of using the ADO data wizards in a non-visual
component? If you create a "web service" project, you drag ADO
components onto a designer and use wizards, but I can't work out how to
do this with a standard class library.
Cheers. Tag: Three-Tier Application Examples. Tag: 103830
Create a parameter for the oledb data adapter
Hello,
Is it possible when configuring an OLEDB DataAdapter, using the Query
Builder, to specify parameters?
I've tried placing =@parametername in the criteria section of the Query
Builder, but this seems to always gerenate errors and then the Datasets won't
fill.
The datasource is a set of Visual Fox Pro tables.
Any help is appreciated.
Thank you Tag: Three-Tier Application Examples. Tag: 103826
Why does first reader.Read take all time in stead of command.ExecuteReader?
Hi All,
I am using CoreLab.Oracle.dll (2.40.2.0) to access an Oracle9i
Enterprise Edition Release 9.2.0.1.0 - Production server.
In C#, I am using CoreLab classes to access the database. Typically, I
create a command object of CommandType StoredProcedure and open a
reader on it. The Procedure returns a ref cursor.
I am surprised to see that the command.ExecuteReader() takes little
time (e.g. 0.1 s) to complete, while the first reader.Read() takes
much more time (e.g. 10 s). In fact, if I execute the procedure some
other way (SQL editor in Toad), execution time is comparable to the
time reader.Read takes.
I do not think that command.ExecuteReader works asynchronously, since
putting the thread to Sleep for 10 seconds does not help reader.Read
to complete faster.
Does anybody know why this is so?
Also, how does this combine with the Command.Cancel method? I cannot
execute command.Cancel while reader.Read is working. How could I use
command.Cancel properly?
See below for details.
Thanks in advance,
Roel Schreurs
// Sample code
OracleDataReader reader = null;
OracleConnection conn = new OracleConnection("<ConnectionString>");
conn.Open();
OracleCommand command = conn.CreateCommand();
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "<Package>.<Procedure>";
OracleParameter parameter = command.CreateParameter();
parameter.OracleDbType = OracleDbType.RefCursor;
parameter.ParameterName = "<CursorVariable>";
parameter.Direction = ParameterDirection.Output;
command.Parameters.Add(parameter);
Debug.WriteLine("Starting ExecuteReader at " +
System.DateTime.Now.TimeOfDay);
reader = command.ExecuteReader();
Debug.WriteLine("Finished ExecuteReader at " +
System.DateTime.Now.TimeOfDay);
//Optional Thread.Sleep(10000);
Debug.WriteLine("Starting first Read at " +
System.DateTime.Now.TimeOfDay);
while (reader.Read())
{
Debug.WriteLine("Finished Reading at " +
System.DateTime.Now.TimeOfDay);
}
-- Results:
Starting ExecuteReader at 15:07:58.063
Finished ExecuteReader at 15:07:58.188 0.125
Starting first Read at 15:07:58.203 0.016
Finished first Read at 15:08:07.922 9.719
Starting ExecuteReader at 15:04:27.859
Finished ExecuteReader at 15:04:27.984 0.125
Starting first Read at 15:04:38.000 10.016
Finished first Read at 15:04:47.688 9.688 Tag: Three-Tier Application Examples. Tag: 103823
Copying a table in ADO.net and the pesky identity column
I am finding problems in trying to copy a databse table from one SQL
2000 server to another using ADO.net. However the source table has an
identity column and I need to preserve the values in the destination
table. Obviously every time I run the below code the destination table
does not have the correct identity column.
For Each objDataRow In dsSource.Tables(0).Rows
With dsDest.Tables(0)
objDBRow = .NewRow()
For Each c In .Columns
objDBRow(c.ColumnName) = objDataRow(c.ColumnName)
Next
.Rows.Add(objDBRow)
End With
ObjCmdBuilder = New SqlCommandBuilder(objAdapter)
objAdapter.Update(dsDest, tablename)
Next
What is the best approach in acheiving this? Bear in mind that the two
SQL servers cannot talk to each other so that I cannot use
sp_addlinkedserver and use a stored procedure.
Am I going about this incorrectly?
Thanks Rippo
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Three-Tier Application Examples. Tag: 103818
Multi DB. And now?
Hi all,
That is a really bad, bad question, but some of us have problem with a
application with more than one DB. Anyone here dev. the same app. for more
than one DB? Why the best solution in the ADO.NET for that, thinking in time
and cost, of course.
In my case, for example, I have a app. that work only by webservices and
should be installed in many bases, like SQL Server, Oracle and PosgreSQL.
That's a fruit salad!! :-) Tag: Three-Tier Application Examples. Tag: 103814
Removing row pointed to by bound combo
Hi
I have a combo which is bound to a datatable.
I want to remove the record from the datatable, which the combo points to.
Can anyone confirm the correct syntax....
I believe it will be something like
datatable.Rows.Remove(.......??how do I find the row that is bound to the
combo??);
Thanks Tag: Three-Tier Application Examples. Tag: 103809
Correct syntax for pasing a SELECtT statement in a string
What is the correct syntax for passing a select statement via the Reader.
The following code doesn't return anything.
Dim strSQL2 As String = "SELECT * from ATable WHERE ' " &
ComboBox1.Text & " ' = ' " & TextBox1.Text & " '"
Dim cmd As New OleDbCommand(strSQL2, Conn)
Dim rdr As OleDbDataReader
rdr = cmd.ExecuteReader
ListBox1.Items.Clear()
ListBox1.Items.Add("")
While rdr.Read
ListBox1.Items.Add(rdr("Col_One") & " " & rdr("Col_Two") &
" " & rdr("Col_Three") & " " & rdr("Col_Four"))
End While
rdr.Close()
Thanks
--
Gordon Tag: Three-Tier Application Examples. Tag: 103798
MyGeneration for .NET (100% Free Code Generator / OR Mapper)
MyGeneration is 100% free, tired of hand coding business objects, stored
procedures, spend your time wisely doing other thing and let us help you.
See http://www.mygenerationsoftware.com
1) MyGeneration is a Template Based Code Generator Supporting Four Template
Languages - JScript, VBScript, C# and VB.NET
2) Ability to Create Your Own Embedded User Interface in your Templates
3) Supported ORM Architectures - Gentle.NET, Opf3, NHibernate
4) MyGeneration dOOdads Architecture Included for Both C# and VB.NET (See
Menu)
5) Support for 11 Different Database Systems.
Microsoft SQL, Oracle, IBM DB2, MySQL, PostgreSQL, Microsoft Access,
FireBird, Interbase, SQLite, VistaDB, and Advantage.
5) Online Template Library for Publishing and Downloading Templates
6) Very Active Support Forums
7) No Hassle, No Questions asked Download Tag: Three-Tier Application Examples. Tag: 103797
Web service on two tables
Please could anyone show me how to create a web service which accesses and
updates information in two tables. I have seen examples in MSDN based on one
table but these fail when using the DataAdapter Config Wizard tries to join
two tables.
Many thanks Tag: Three-Tier Application Examples. Tag: 103795
Synchronize Question
I have a situation where I have read only access to an Access database.
I need to query the database and insert the rows retrieved into my own
database. However there is no gaurantee that the original query won't
return rows that I've already inserted into my own database.
So my question is what is the best way to handle the situation? Just
trap the errors when the insert fails? Query my own database for
primary keys and then discard those rows from the original query? Check
each row of the original query for existance in my own database before
attempting to insert?
This is a desktop application which is basically single user so
performance isn't of the utmost priority. I'm basically looking for a
best practice approach to this problem.
Thanks
Slonocode Tag: Three-Tier Application Examples. Tag: 103793
OracleDataAdapter filling Dataset with duplicate rows
Hi,
I am using OracleDataAdapter to fill my DataSet. I am using Select Distinct
in my sql querry to get unique recored.
I am getting duplicate rows in DataSet.
My SqlPlus shows only one row of Data. When I execute the code to fill DataSet
My DataSet.tables[0]. rows.count gives me count of 2.
When I loop through DataSet to display Values I am getting same values twice.
Anyone has any suggestion on how to get distinct rows in dataSet.
Thanks in Advance,
MS Tag: Three-Tier Application Examples. Tag: 103792
Error: "System.Data.OleDb.OleDbException: No value given for one or more required parameters"
I am developing an ASP.NET application that uses Access 2000 as its backend,
and have just started getting the following error on 2 ASP.NET pages that
had been working until late last week (and I don't think I made any changes
to either page other than changing the user control that creates the
header).
Server Error in '/myApp' Application.
----------------------------------------------------------------------------
----
No value given for one or more required parameters.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: No value given for one
or more required parameters.
Source Error:
Line 721:
Line 722: myDataAdapter.SelectCommand.Parameters("Thing_ID").Value =
CInt(Session("Thing_ID"))
Line 723: m_intNum1 = myDataAdapter.Fill(myDataSet1, "Thing")
Line 724:
----------------------------------------------------------------------------
----
I'm not having any other data access problems in the application - other
pages do lookups to populate drop down lists, and I can add records to other
tables in the database. I've checked the table that the code in question is
trying to read, and it seems to be fine. I've debugged it, and the value of
the parameter (which is the only parameter for that command) IS set and it
IS an integer, which is the type of the parameter. It seems that the problem
is NOT because of the value of the parameter, but something else - does
anyone have any ideas? Tag: Three-Tier Application Examples. Tag: 103790
ORA-01461 while moving data from sqlserver to oracle
I worte a conversion program which moves all data from SqlSrv to Oracle,
using the OracleClient and SqlClient classes of .Net.
Now when a column has 2001 characters or more I get this error. I've read a
lot of it, but I do not fully understand what is wrong, and more important,
how it can be solved.
I know a lot about SqlServer, but very little about Oracle.
I am using a standard SqlDataAdapter, and a OracleDataAdapter. I am using
the OracleCommandBuilder to generate the Oracle insertcommand.
The conversion method is very straightforward and simple: I open a
SqlDataAdapter with a 'Select * from Table' command, and an
OracleDataAdapter with the same command. I fill two Datatables using this
two adapters, which results in a filled datatable from the sqlserver db, and
an empty datatable from the oracle db.
Then I simply move all data from the first table to the second, and then I
execute the Update methode of the OracleDataAdpater.
As said, this is working properly for 99,9% of my database. Only strings
with a length of >2000 will fail with the Oracle ORA-01461 exception....:-(
Dim strSelect = "selectr * from test"
Dim sqlC as new SqlConnection(sqlConnectionString)
Dim sqlDa as new SqlDataAdapter(strSelect, sqlC)
Dim oraC as new OracleConnection(oraConnectionString)
Dim oraDa as new OracleDataAdapter(strSelect, oraC)
Dim oraCB as new OracleCommandBuilder(oraDa)
Dim sqlDt as new Datatable
sqlDa.Fill(sqlDt)
Dim oraDy as new DataTable
oraDa.Fill(oraDt)
Dim oraRow as Datarow
For Each sqlRow as Datarow in sqlDt.Rows
oraRow = oraDt.NewRow
For i as Integer = 0 To sqlDt.Columns.Count - 1
oraRow(i) = sqlRow(i)
next
oraDt.Rows.Add(oraRow)
Next
oraDa.Update(oraDt)
Currently I have added some extra lines in the inner loop to handle string
data (using sqlDt.Columns(i).DataType) and to substring too long strings to
a length of 2000 maximum. That's only way I can have this routine error
free....:-((
Can anyone help me?
Jan van Veldhuizen Tag: Three-Tier Application Examples. Tag: 103785
Good Practice on ListBox
Greetings
I want to display a listbox on the form which will include two columns from
the data table" FirstName" & "LastName"
What I've done now, is modify the DataAdapter to include two additional
colums as:
[FirstName] + " " +[LastName] As NameFN
[LastName] + " " +[FirstName] AS NameLN
I've selected NameFN as the DisplayMember of the listbox
However, I've also selected the Sort option to be true
So what I see on the listbox doesn't correspond to the record selected on
the form.
The record is selected automatically on the form because my DataSource
Property is bound to the dataset object.
Is this a good practice ?
Or its better to create a dynamic Array List on loadup and use that ?
If that is the case how can I make the list selection, make the record on
the form change ?
Thanks Tag: Three-Tier Application Examples. Tag: 103784
How to save/update DataTable when its structure is unknown?
Hi all,
I would like to have a functionality that saves/updates a given DataTable
into the DB while its structure is unknown.
I think of 2 possible solutions:
1) to use SqlCommandBuilder - which is very expensive in the runtime
(performance issues)
2) constructing my own commands - iterating over the DataTable and construct
update, delete and insert commands. In this approach I have a small problem
as I don't know the original sql types of the columns and it seems to be an
equivalent to the first solution either.
Does anybody think/may suggests another solution, approach ?
Thanks in advance,
Uri Tag: Three-Tier Application Examples. Tag: 103783
MSDataSetGenerator and strongly typed DataSets in VS.NET 2005 Beta
I have having a problem compiling a strongly typed DataSet in VS.NET 2005
Beta 1 when it contains an <xs:include> tag. Everything compiles fine under
VS.NET 2002 and 2003. Here is an example:
File 1 - PRLEntityGroups.xsd :
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="PRLEntityGroups"
targetNamespace="http://tempuri.org/PRL"
xmlns="http://tempuri.org/PRL"
xmlns:mstns="http://tempuri.org/PRL"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:group name="AccessLevelGroup">
<xs:sequence>
<xs:element name="AccessLevelID" type="xs:int" />
<xs:element name="AccessLevelName" type="xs:string" />
</xs:sequence>
</xs:group>
</xs:schema>
File 2 - ImportShape.xsd :
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="PRLImportShape"
targetNamespace="http://tempuri.org/PRL"
xmlns="http://tempuri.org/PRL"
xmlns:mstns="http://tempuri.org/PRL"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:include schemaLocation="PRLEntityGroups.xsd" />
<xs:element name="ImportShape" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="AccessLevel">
<xs:complexType>
<xs:sequence>
<xs:group ref="AccessLevelGroup" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
The line that fails is <xs:group ref="AccessLevelGroup" /> in File 2.
MSDataSetGenerator tells me AccessLevelGroup is an "undeclared model group".
However, I have included the XSD file containing this declaration and both
xsd are using the same Root namespace.
Again, this worked fine in VS.NET 2002 and 2003.
Any help on figuring out a work around would be helpful.
I could declare the types within each xsd and not include an external xsd
with all my type definitions, but that would be a waste of time. The point
is to be able to include external xsd files and use those types defined in
the external xsd files.
Thanks! Tag: Three-Tier Application Examples. Tag: 103781
ADO.NET Oracle Varchar2 BUG?
Hi,
I have an Oracle 8.1.7 server and I'm extracting a Varchar2(length 300)
using an aspx page and the field is always Null, even if it's not in the DB.
I tried the EXACT same code in a windows form and it works perfect.
Is there a bug in asp.net/ado.net with Varchar2 bigger than 256 char ? (I
have no problems with Varchar2 of length < 256).
Also, I tried creating a copy of my table with a Varchar1 instead of the
Varchar2 and it worked too (>256). Tag: Three-Tier Application Examples. Tag: 103779
sending mail through stored procedure
Hi
Can anyone tell me how can I send email through stored procedure in sql
server ? I want to send attachment with this email too.
TIA Tag: Three-Tier Application Examples. Tag: 103777
SQLDataReader and Columns
How would I get the length of a column from a SQLDataReader? I'm looking
for something like Query Analyzer uses to display its data. So, I would
need to know that a varchar(200) is 200 where a varchar(20) is only 20.
Also I need to know how many characters a datetime would fill up. This
kinda information.
Does this make sense?
-Roger Tag: Three-Tier Application Examples. Tag: 103773
Execute File SQL in AdoNET VB
Hello,
I have a file .SQL Containing a Script to Create Tables and Stored
Procedure...
Example :
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[SP_ADVANCED_SEARCH]') and OBJECTPROPERTY(id,
N'IsProcedure') = 1)
drop procedure [dbo].[SP_ADVANCED_SEARCH]
GO
.......
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE TABLE [dbo].[TBLTEST]
Etc Etc....
It is possible Execute Then Scirpt With AdoNet ... Tag: Three-Tier Application Examples. Tag: 103768
Passing OracleDateTime.null.value to store procedure???
using Data access application block for oracle, I try to pass a null value
to the OracleDateTime to the store procedure. but I got an exception saying
"this value si null", what am I missing here? shouldn't I be able to pass
null parameters?
Kevin Tag: Three-Tier Application Examples. Tag: 103766
Databinding in c# - Important
Hello
All the samples I found are based on datagrid for the child table.
What if I don't want the child records to be displayed in a datagrid, but in
their own data bound controls like "text box, combo & list boxes). And I
want to provide a second level of navigation buttons to traverse those child
records in the child table.
I'm sure this is possible, but I can't seem to find any sample on it.
Please let me know if you can throw any light on it.
Thank You Tag: Three-Tier Application Examples. Tag: 103761
edit memory DataTable
Hi,
I created simple dataTable (one field numeric, one string). Then I prepared
dataConnector and put DataGridView on the form. In datagrid I can edit now
numeric field but string field after post is clear (NULL value). Can anyone
help?
Thanks Tag: Three-Tier Application Examples. Tag: 103752
edit string field in DataGridView
Hi,
I created simple DataTable (memory table) object with two fields
-numeric Id
-string Name
then I configure dataConnection and put on the form DataGridView.
I bind fields from table to columns and now I can edit numeric column
but when I try edit string column then it is after post event clear (NULL
value).
Why?
Thanks Tag: Three-Tier Application Examples. Tag: 103751
DataRow to XML
Hello,
I am creating a datarow (new or existing) in my data-tier and passing
it to my business tier where it is filled with data and then passed
back to data-tier to be inserted into the table.
I need to keep original and updated versions of the datarow in xml
format. Just need the datarow in xml format. So basically I need two
strings - string1 containing data from initial state of datarow and
string2 containing data from updated state of datarow.
I think that xml read/write can only be done via datasets and not via
datarow. Can anyone provide any pointers?
Thanks Tag: Three-Tier Application Examples. Tag: 103750
Lock Table
In a SQL Server 2000 Database I have a Table which is
shared by many users. I have a VB.NET Procedure which
contains many calls to Stored Procedures and ADO.Net
Commands to clear and update this shared table. What I
would like to do at the start of this lengthly procedure
is to place an exclusive lock on the table until the whole
procedure has finished running all its separate update
statements. Then I will unlock it. If another user runs
the same procedure while the table is locked by the first
then I would like a message displayed to say that "the
table is in use, Please try again later." Is there an
easy way to achieve all of this? It would be difficult to
put all the update commands in the same transaction as
different connections are used. Tag: Three-Tier Application Examples. Tag: 103741
Current record of datatable in dataset
Hi
I have a datatable which I have linked to a combo control, via the
datasource property of the combo control.
I have also set the displaymember property of the combo, to ensure that my
description is shown in the combo.
However, I want to have another value of the same row of the datatable (as
selected in the combo), displayed in a text box. ie. so that when I change
the value in the combo, a text box displays a value from another field in
the same datarow.
Can anyone offer any tips, or code samples?
Thanks Tag: Three-Tier Application Examples. Tag: 103740
how to prepare patch
Sir,
In a form i have kept 2 textboxes(a,b) and a button(add). which supports
only of integer values i have written.
after entering the values in the textboxes and after clicking the add button
result is displayed on a message box. (this functionality supports only for
ineteger values.
after this i have given the exe of this program to the client.
then client asks me to " if i give decimal values it must work ".
now how to prepare the patch for the program to add decimal values also and
how to update the exe which i have prepared. Tag: Three-Tier Application Examples. Tag: 103327
Cant connect to SQL Server 2000 Developer edition
Hi,
I have been trying to connect SQL Server2000 developer edition using the
following string.
SqlConnection conn = new
SqlConnection("server=localhost;database=pubs;uid=sa;pwd=");
I dont know where i am going wrong.
SQL Server Service Manager shows the following:
Server : Hemant
Services : SQL Server
Running \\Hemant -MSSQLServer
Even tried this command and numerous other combination but none seems to work.
SqlConnection conn = new
SqlConnection("server=Hemant;database=pubs;uid=sa;pwd=");
I want to establish connection using SqlConnection to the database pubs
using C# in .NET IDE.
Help me out. Where am i getting it wrong?? If someone else has answered
this question then provide me the link. Tag: Three-Tier Application Examples. Tag: 103130
duplicate ids after insert
Hi,
I'm trying to create an archiving script, using the folowing query for all
database tables
insert into table2 select * from table1 (table1, table2 are 2 tables having
exactly the same definition)
The rpoblem is that the rows are,'t deleted from the table TABLE2, so the
next time the user runs the script he'll find some rows already existing in
TABLE2, so he'll have an error.
How can I handle this without to know exacly what are the IDs or the
structure, juste to say "if the row (the unique key) exists skip it, but
continue with the other rows"
Thanks. Tag: Three-Tier Application Examples. Tag: 103126
Timberline (Pervasive) ODBC Access
Is anyone else out here working with Timberline version 7.x,8.x or 9.x and ODBC and .NET? If so any advice to offer? I am working with a number of older VB 6 applications that interface (mostly just read) Timberline data stored in a Pervasive SQL database that I am porting to VB.NET.
Experimentation has shown me that I apparently need to use Timberlines own driver, I have had limited success with the Pervasive native drivers. I am trying to stay in an all managed solution so I have been using the System.Data.ODBC namespace but that appears to cripple my access to things like Schema info etc.
Any suggestions or pointers to online resources would be appreciated. I am already aware of Event!'s web site.
Thanks in advance.
Bob Porter Tag: Three-Tier Application Examples. Tag: 103125
ExecuteReader requires an open and available Connection. The connection's current state is Closed.
(Type your message here)
--------------------------------
From: renu
Friends,
when I am trying to create a login page and connecting to the sqlserver database I am getting the following error
ExecuteReader requires an open and available Connection. The connection's current state is Closed.
and mycode is
Dim strconn As String
Dim strsql As String
Dim command As SqlCommand
Dim i As Integer
Try
strconn = "server =(local);trusted_connection=yes;database=consultants;"
Response.Write("connection ok")
Dim conn As New SqlConnection(strconn)
strsql = "select count(*) from consul_login where uname='" & txtUname.Text & "'and pword='" & txtPassword.Text & "'"
command = New SqlCommand(strsql, conn)
conn.Open()
Catch ex As Exception
Response.Write(ex.Message)
End Try
i = command.ExecuteScalar()
If i <> 1 Then
Response.Redirect("e:\dotnet\authenticationdenied.aspx")
Else
Response.Redirect("e:\dotnet\timesheet.aspx")
Response.Redirect("timesheet?n1" & txtUname.Text)
End If
can anybody help me out?
thanks
renu
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>gev9cu2MuEiLCsHn9s10qw==</Id> Tag: Three-Tier Application Examples. Tag: 103113
concurrency violation
I have a dataset with a data adapter=2E The text fields are bound=
to text boxes=2E When I use sqlprofiler to view the stored=
procedure executed and the data, the fields of both the=
@newComment and @orginalComment have both the same value=2E The=
value in both fields is the same value entered into the textbox=2E=
I know that the object is supposed to copy the orginal values=
retrieved from the database, but I have no idea why the changes=
are occuring to the @original=2E
this=2EBindingContext[dsCollectionAgency1,=
"Collection_Agency_Sel"]=2EEndCurrentEdit();
try
=09{
=09daCollectionAgency=2EUpdate(dsCollectionAgency1,=
"Collection_Agency_Sel");
=09}
catch (Exception e)
=09{
=09MessageBox=2EShow( Convert=2EToString(e=2EMessage), "Error Saving=
Agency Information", MessageBoxButtons=2EOK,=
MessageBoxIcon=2EExclamation);
=09}=09=09=09
Does anyone have any idea why this occuring?
From: Kevin Cabral
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>2NNKo4s1+06Jk0cWyZJuCw=3D=3D</Id> Tag: Three-Tier Application Examples. Tag: 103112
Fire query on DataSet
DataSet is supposed to be an in-memory database=2E So is it=
possible to fire a query on it=2E I want to fire a "Select" query=
(with alises in it) and also a "Transform" (Crosstab) query=2E In=
the current scenario I am putting things in an Access table but=
for performance reasons want to deal with in-memory contents=2E
Thanks in advance=2E
--------------------------------
From: Arun Gupta
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>sTSX/kubC0qPi2iCiclPTg=3D=3D</Id> Tag: Three-Tier Application Examples. Tag: 103111
Where can i find simple Three-Tier Application Examples?
"Anibal" <nospam@sinbasura.com> a écrit dans le message de news:
%23ugV332AFHA.2880@TK2MSFTNGP14.phx.gbl...
> Where can i find simple Three-Tier Application Examples?
>
> Thank you.
>
>
>