Sceppa Core Reference errata on pp 469/473 and please help with concurrency error
I'm having trouble with concurrency errors (0 records affected)
but the Core Reference section relating to this subject seems to
have an error in the code sample. Maybe I'm wrong about this;
could someone please correct me if so!
On p. 473, the timestamp column is being assigned a value
e.Row("TSCol") = ....
and the penultimate paragraph on the page reads:
"After retrieving the new timestamp value and assigning it to the
appropriate column in the DataRow object..."
** But when I try to assign this column, I get an error that my
(SQLServer2000) timestamp column is READONLY. **
My update command uses the Primary Key and the timestamp columns
to check for concurrent changes to the row. My update command goes
like this:
Update T
Set ...
where PK = @PK and TS = @TS
And in the OnRowUpdated eventhandler, I assign the UpdateCommand
timestamp parameter as follows:
UpdateCommand.Parameters("@TS").Value = cmdGetTS.ExecuteScalar
However, when I make a second change to a record that I have just
updated (the scenario described at top of p.469 in Core
Reference), I get a concurrency error (0 records affected) even
though I am indeed using the most recent timestamp and have
correctly assigned the TS and PK parameters of my update query
prior to invoking the DA.Update() method.
Page 469 reads: "If you don't have the new value for the timestamp
column in your DataRow object, the subsequent update attempt will
fail."
I don't understand why the *row* must contain the new timestamp
value if one is using the primary key and the timestamp to test
for concurrency problems, and the update command takes the form
"Update Table ...where PK=@PK and TS=@TS". Wouldn't you want to
assign the UpdateCommand.Parameters("@TS") instead of the
e.row("TS")?
Clarification appreciated!
Timo Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68177
newbie needs a sample
I am a programmer that is fluent in Visual Basic 6.0, and I am trying to
learn VB .NET. I would like to create an application that imports comma
separated data in a textfile into a database in Access or SQL Server. I am
familiar with ADO, but not with ADO .NET. Would someone be kind enough to
send me a sample project to get me started?
Daniel Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68169
Transfering a dataset
I am reading a dataset from a CSV file and creating XML. From there I put it
into a dataset.
What I want to do now is to take that datatable and store it into a database
(through an ODBC connection).
I thought there was an easy way to assign the dataset to the new connection
and/or dataadapter and tell it to store/save/etc. the datatable to the
database.
Can someone point me in the right direction? Or am I just off my rocker
again?
Thank you for any insight you can provide,
Ken Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68168
Quick Question
Hi,
I am wondering what is faster. I am useing OLEDB to connect to an Access
database and was wondering which is faster. Calling a query saved in Access
or using SQL in the program? And is it a big difference in performance.
Thanks in Advance Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68154
Creating logins
Can I create a Windows Group login from .Net code, and if so, how?!
Cheers in advance
Sparky Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68144
Quey builder
Hi,
I like to create a query builder to allow the user to create his statistics
and see them using Cristal report
Any idea about how to do this, is there any controls that can help me.
Thanks. Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68141
Datagrid getting info from two tables in one database
Hi,
I'm quite new to developing ASP.NET applications with databases (ADO).
I think I've got a very easy question, but I haven't been able to sort
it out yet.
In SQL Server I've got two tables in my database: "issues" and
"users". The idea of the application (I use C#) is that users can add
issues. So the "issues" table has a secondairy key "user_id" connected
to the "id" column of the "user" table.
In a datagrid I want to show the "issue" table, but (!) instead of
showing the user_id number on this grid (from the "issue" table), I'd
like to show the matching name taken from the "users" table". Second,
when this datagrid is edited the user column should show a dropdown
list with all the user names, instead of the standard textfiels with
the "user_id". I've found something for this using the ASPX code;
<<<CODE>>>
<EditItemTemplate>
<asp:DropDownList id="Dropdownlist1" runat="server" DataSource="<%#
dataSet1 %>" DataMember="Users" DataTextField="name"
DataValueField="id">
</asp:DropDownList>
</EditItemTemplate>
<<<END CODE>>>
This option does show a dropdown list with all usernames in my
datagrid when I go to the editmode of this datagrid. However the
top-item of this dropdownlist is always selected by default. I want
the application to check which value the "user_id" fiels in the
"issues" table has and find the matching name in the "users" table and
fills this in. And in non-edit mode I want the datagrid to also so the
user name matching the user_id.
Any help would very much be appreciated.
Regards,
Jules Hoppenbrouwers
<Please reply to this newsgroup. The emailaddress is just a
spamcatcher.> Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68138
Juction tables
Using VS 2003, VB.net, SQL MSDE
Doing my first junction table in Server Explorer, Database diagrams, and
having the following error message below on one of the relations. I am
following the instructions exactly, so I am not sure what the problem is.
3 tables in a telephony application:
Table 1 is Calls (i.e. telephone calls)
Table 2 is Calls_Customer_Junction (consists of only primary keys from table
1 and 2, which are both primary keys in table 2)
Table 3 is Customers (i.e. Customer who answered the call)
The relationship between table 1 and 3 is many to many (I think), each Calls
row could have a different Customers row and each Customers row could be
from a different Calls row.
The one to many relation from Table 1 to Table 2 draws fine and saves fine.
But, the one to many relation from Table 3 to Table 2 draws fine, but when
you save it, you get the error message below.
Not sure what the problem is. Any ideas? Any links that might help?
Thanks.
Bob
'Customers' table saved successfully
'Calls_Customers_Junction' table
- Unable to create relationship 'FK_Calls_Customers_Junction_Customers'.
ADO error: Introducing FOREIGN KEY constraint
'FK_Calls_Customers_Junction_Customers' on table 'Calls_Customers_Junction'
may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or
ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint. See previous errors. Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68135
How to derive SqlDbType from column data type
I need to know the correct SqlDbType of a column to use it in a dinamically
build parametrized sqlCommand.
As I can see when I build a parameter it expects a System.Data.SqlDbType but
if I look at the DataType property of a column in a table in a dataset I get
a diferent 'type' of data.
Is there a way to derive the SqlDbType from the dataset.datatable.column
datatype?
Vicenc Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68123
oledbDataAdpater Memory Leak
I have written a Windows Service using VB.NET that reads the mySQL
database and creates an XML for the data. This process is called
inside a timer's (to generate the XML files at specified time
interval) Tick event. I use oledb for connecting to the database.
Now the [Memory usage] for my service in the [Windows Task Manager]
rises each time the timer event is fired and never drops back.
Now after some period of time the system crashes due to memory leak.
When I comment the Fill method code and run the service, the memory
usage is stable.
How can this (type of memory leak) be prevented. Is this due to the
Memory leak problem of oleDBDataAdapter's Fill method.
Why the objects are not Garbage collected after the objects are closed
in the timer_tick event?
I have provided the code that creates memory leak (kind of) in my
service. (i have deleted the lines of code that generates xml files
from the dataset, as this code itself generates memory leak kind of
thing.)
-----------
'code for the Timer1_Tick event
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Dim oledbConnection1 As OleDbConnection
Dim svlQuery As String
Dim dsUser As DataSet
Dim oledbDataAdapter1 As OleDbDataAdapter
'oledbConnection1 = InitiateDB()
oledbConnection1 = New OleDbConnection
oledbConnection1.ConnectionString =
"Provider=MySqlProv.3.0;Data Source=DSNTest1;Integrated
Security='';Password=DSNTest1;User
ID=DSNTest1;Location=dbservern01;Extended Properties='OPTION=3'"
Try
oledbConnection1.Open()
Catch myExp As Exception
Exit Sub
End Try
svlQuery = "select * from SampleTable"
dsUser = New DataSet
Try
oledbDataAdapter1 = New OleDbDataAdapter(svlQuery,
oledbConnection1)
oledbDataAdapter1.Fill(dsUser)
Catch myExp As Exception
oledbDataAdapter1 = Nothing
oledbConnection1 = Nothing
Exit Sub
End Try
dsUser.Clear()
dsUser.Dispose()
oledbDataAdapter1.Dispose()
oledbConnection1.Close()
oledbConnection1.Dispose()
End Sub
-----------
Regards
Karthikeyan C S Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68120
Help !
HI,
Can we fill Datagrid in a Windows form by code i.e programmatically without
using Data binding.
- Gary Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68118
Access Database corrupted
Hi,
It seems not possible to repair an access DB programmatically with ADO.NET.
JRO only compact it, without repairing.
The only way seems to use MS Office PIAs.
My customers have Access 97. Is there PIAs for 97? I suppose no! Only for XP
& 2003, isn't it?
Then the only possiblity seems to launch Access 97 with my mdb as
argument... and ask the customer to do it himself? any other idea??? Or
create a com dll that reference Access 97 and then try to repair it?
Any idea?
Thanks,
Sebastien Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68117
Calling a Table Valued MSSQL Function from C#
Hello All,
I am trying to call a Function in SQL Server which returns a TABLE type.
I get an exception
Unhandled Exception: System.Data.SqlClient.SqlException: The request for
procedu
re 'testFunc' failed because 'testFunc' is a function object.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior
, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at CallSqlFunc.Main(String[] args)
The C# code which I have written is
using System;
using System.Data;
using System.Data.SqlClient;
public class CallSqlFunc
{
public static void Main(string[] args)
{
SqlConnection con = new
SqlConnection(@"server=nt229141;trusted_connection=yes;database=junk");
SqlCommand cmd = new SqlCommand("testFunc", con);
cmd.CommandType = CommandType.StoredProcedure;
con.Open();
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read())
{
Console.WriteLine(reader.GetInt32(0));
}
con.Close();
}
}
The SQL Server Function code is
create Function testFunc ()
returns @junktable table (num int)
as
begin
insert @junktable values (1)
insert @junktable values (2)
return
end
Why doesn't this code work? I am able to call Scalar SQL Server
functions. The problem comes only when trying to call TVFs.
Thanks in advance for your help.
regards,
Abhishek. Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68110
Constraint Problem
Hello, I have been told if I being down a SQL 2000 table, the constraints are
NOT automatically brought down when you use a DataAdapter. Is that true?
In reading about the method for the DataAdapter called "FillSchema", it
indicates that it will the primary key constraint are loaded if one of the
primary keys are identified in the "SelectCommand". It will also populate the
"AllowDBNull", "AutoIncrement", "MaxLength", "ReadOnly" and "Unique".
So if I use the dataadapter and just invoke the "Fill" method, it does not
build the schema, but if I issue the "FillSchema" it will? Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68105
Why DataGrid.VisibleRowCount <> DataTable.Rows.Count???
This is a multi-part message in MIME format.
------=_NextPart_000_0641_01C38E54.F7128910
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable
Hi All,=20
I have a problem of controlling datagrid. I bind a DataTable to a =
DataGrid. =20
Could anyone tell me why DataTable is having 63 rows count whereas the =
datagrid is having only 26 visiblerowcount???
but I can visually see all 63 rows...=20
Thanks!
FYI: I'm using .net framework 1.0 sp2=20
Ivan
------=_NextPart_000_0641_01C38E54.F7128910
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi All, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a problem of controlling =
datagrid. I=20
bind a DataTable to a DataGrid. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Could anyone tell me why DataTable =
is having=20
63 rows count whereas the datagrid is having only 26=20
visiblerowcount???</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>but I can visually see all 63 rows... =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>FYI: I'm using .net framework 1.0 sp2 =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Ivan</FONT></DIV></BODY></HTML>
------=_NextPart_000_0641_01C38E54.F7128910-- Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68104
DataView.Find error: Expecting 2 value(s) for the key being indexed, but received 1 value(s).
Hello all,
I've searched the forum for this error, but there are only two posts
on the topic. We are seeing something very strange happening. We
have a DataView with a Sort property specified to a two column
expression:
DataView dv = new DataView( sourcetable );
dv.Sort = "ContentTypeId,ContentId";
//then we create our search array:
object[] searchKeys = new object[2]{ 9, 2 };
//and run our search:
if( dv.Find( searchKeys ) > -1 )
{
....
}
//never gets inside the if loop, error:
Expecting 2 value(s) for the key being indexed, but received 1
value(s).
but the really interesting thing is that if we change the sort key in
the command window to a single key, and pass in the same array, we get
the opposite error:
dv.Sort = "ContentTypeId";
if( dv.Find( searchKeys ) > -1 )
{
...
}
we get this error:
Expecting 1 value(s) for the key being indexed, but received 2
value(s).
Can anyone shed any light on this topic? We are using a DefaultView
on a datatable, and it is a static member of our class in an ASP.NET
HttpModule ocntext.
thanks in advance!
Benjamin Joldersma
Sr. Software Engineer,
Citadel Media, Inc. Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68098
how to query a dataset or datatable with a sql-query?
is there any way to make that possible?
i have search on google and only found answers suggesting to use
rowfilter on a view or similar, but if I would like a complex
sql-statement with GROUP BY and some SUMs and such, is that possible
with a filter?
there must be some way to use SQL for this? it seems absurd otherwise.
the reason for this is that there _is_ no database in my case, the
datatable i have is populated manually. and i would like to be able to
extract data from it.
/glenn
--
http://wailqill.com/ Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68097
Oracle returns trailing zero
All,
I am using C# in VS2003 against an Oracle 8i DB. I use the code below to
return a DataSet. Its DataTable has a trailing zero for any number fields
that have an odd scale. This occurs regardless of whether I use the MS
Oracle Provider for 1.0 or 1.1.
When this code is compiled using VS2002(framework 1.0), the trailing zero is
not there.
I know Oracle internally stores a trailing zero for Number fields with null
or odd scales. However, the framework 1.0 didn't return that trailing zero.
The framework 1.1 does. Does anybody know of a way to prevent the 1.1
framework from returning this trailing zero?
Thanks in advance...
-Scott Meier
OracleConnection objConn = new OracleConnection("Data Source= ********;User
ID=***;Password=****;Connection Lifetime=60");
string strDTName = "testtable";
try
{
OracleCommand objCmd = new OracleCommand();
OracleDataAdapter objDA = new OracleDataAdapter(objCmd);
m_objDSMain = new DataSet();
objCmd.Connection = objConn;
objCmd.CommandType = CommandType.Text;
objCmd.CommandText= "SELECT * FROM WELL";
objDA.Fill(m_objDSMain, strDTName);
return m_objDSMain;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
} Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68092
RowFilter and Filtered Records
I have a DataTable that I'm applying a filter to using
DataTable.DefaultView.RowFilter. After this when I look at
DataTable.DefaultView.Count, I get the correct count for the filtered
records. The problem is when I start iterating through
DataTable.DefaultView.DataViewManager.DataSet.Tables[0], I get records that
should be filtered out.
I'm using this same process on 2 different tables. It all works correctly on
1 of them, but not the other and I haven't been able to figure out what the
difference is. Any ideas are much appreciated!
Scott Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68088
REF Cursor returned across db link?
All,
I've created a synonym that points to a package over a database link
like so:
CREATE SYNONYM API_MYLINK FOR USER.CSAPI_V2@INSTANCE.DOMAIN.COM
I've granted execute like so:
grant execute on CSAPI_V2 to scott;
When I attach to the database in C# using ODP.NET and attempt to
dispatch a stored procedure using the synonym like so:
API_MYLINK.Create_Invoice
Also, there are two parameters to the Create_Invoice stored procedure:
1) is an input parameter of type number 2) is an output parameter of
type ref cursor.
I get the following exception raised:
Oracle.DataAccess.Client.OracleException ORA-00604: error occurred at
recursive SQL level 1
Is it possible to return a REF CURSOR over a DB LINK and if so, can
someone provide a code snippet demonstrating the dispatch of a stored
procedure over a
database link that returns a REF CURSOR.
Thanks,
Matt Houseman Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68086
Single element in a DataSet
OK, I have filled a DataSet with an SqlDataAdapter and I just want the data
in one column of one row. How can I do this since the following gives me
the infamous 'Object reference not set to an instance of an object' error:
strng = datset.Tables("Users").Rows(0).Item("Users").ToString()
My table is called Users and I want the first row, and the only column is
also called Users.
I broke it down by declaring a DataTable and a DataRow etc and the problem
comes up at the Rows stage, I can assign tbl=datset.Tables("Users") with no
problem, but cannot assign
rw=tbl.Rows(0) without getting the error above.
And you can't declare a New DataRow because the New constructor is Private
So can someone please give me example code on how to extract one element
from a DataSet into a variable so it can be used in code. MSDN only gives
examples on how to manipulate data while still in the DataSet or how to bind
it, rarely how to extract it in code.
The one example they do give uses
For Each tbl In datset.Tables
For Each rw In tbl.Rows
For Each col In tbl.Columns
Debug.Print(rw(col))
Next
Next
Next
But I still get the error when I try doing this, in the For Each rw In
tbl.Rows. Somehow I can't get any rows at all. Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68081
SqlCommand.CommandTimeout really works?
I use SqlCommand to run a query against a SQL Server database in ASP.NET
and I need to abort the query if it takes more than a specified time. I've
tried to
use CommandTimeout property but it doesn't seem to work. Digging in
System.Data.dll
with ILDASM it appears that the property isn't used anywhere.
Is this true or I'm missing something? If it's true, then there is any other
easy way
to acomplish this task?
Cristian IONITA Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68080
DataSet connected to DataGrid crashes my app?
Hi,
I have a strongly typed dataset that I put data into that I receive
asynchronously via a socket connection.
The app works fine until I set dataGrid.DataSource = myDataSet. The app
crashes will a NullException inside Application.Run().
Could I be adding data to the DataSet incorrectly? I call BeginLoad and
EndLoad before and after I add a row to the dataset.
Any ideas?
Thanks,
John Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68079
concurrency issues (on aspx page in vb)
I have a asp page which uses ado.net to access a access database, and when
two people try to retrieve information from a page that is generated from
the access database, i get the you cant do this the database's state=open
error page... how do i get around this? there will be a lot of users on this
site... thanks! Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68077
XML and Datagrids
I want to be able to load a xml file into a datagrid on a form. From this I
want a user to be able to edit any field in the datagrid and then write
those changes back to specific elements in another xml file.
I have been able to read an xml file into the datagrid...this is no problem.
I am having trouble with once I have made the changes, writing them back out
to the other xml file.
Any help would be appreciated.
Thanks,
Kevin Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68074
Building My Own DataAdapter
This is a multi-part message in MIME format.
------=_NextPart_000_0033_01C38DBB.3EC478D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi, I'm trying to build a personalized class named "DataRowSP" and =
"DataTableSP" with some additional functionality I didn't found on =
standard classes.
Today I've been fighting with this:
My Middle tier objects (Customer, Product, etc) inherit from DataTableSP =
(CustomersTable object) and from DataRowSP (CustomerRow object).
I've added a 'Load' Method wich recovers data from the database and a =
'Save' method similar to the DataAdapter, but in the same DataRow, so I =
can individualy update Rows.
Every DataRowSP object has a property named "TableSP" from which I make =
the same use as if it was the 'Table" property of a Row object. So this =
property tells me which table a particular Row belongs.
I Need to get this done:
When a new row is added, I need to set some properties to give the =
"welcome" to the reciently added Row to the Table that will contain it. =
But How can I Do this?
There is an event for the datable named "RowChanged" with Action and Row =
parameters. That's what I need. But pay attention that I need to =
overrite it (that's what I think)
My Classes Structure is like this:
DataRow
DataRowSP
CustomerRow
DataTable
DataTableSP
CustomersTable
When I add a CustomerRow to a CustomersTable I Need to set a property =
named "TableSP".
HOW can I get this done?
Thanks. I've as clear as I could.=20
------=_NextPart_000_0033_01C38DBB.3EC478D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi, I'm trying to build a personalized =
class named=20
"DataRowSP" and "DataTableSP" with some additional functionality I =
didn't found=20
on standard classes.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Today I've been fighting with =
this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My Middle tier objects (Customer, =
Product, etc)=20
inherit from DataTableSP (CustomersTable object) and from DataRowSP =
(CustomerRow=20
object).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I've added a 'Load' Method wich =
recovers data from=20
the database and a 'Save' method similar to the DataAdapter, but in the =
same=20
DataRow, so I can individualy update Rows.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Every DataRowSP object has a property =
named=20
"TableSP" from which I make the same use as if it was the 'Table" =
property of a=20
Row object. So this property tells me which table a particular Row=20
belongs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>I Need to get this=20
done:</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When a new row is added, I need to set =
some=20
properties to give the "welcome" to the reciently added Row to the Table =
that=20
will contain it. But How can I Do this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There is an event for the datable named =
"RowChanged" with Action and Row parameters. That's what I need. =
But pay=20
attention that I need to overrite it (that's what I think)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My Classes Structure is like =
this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DataRow</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
DataRowSP</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
CustomerRow</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DataTable</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
DataTableSP</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
CustomersTable</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>When I add a CustomerRow to a =
CustomersTable I Need=20
to set a property named "TableSP".</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>HOW can I get this done?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks. I've as clear as I could. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0033_01C38DBB.3EC478D0-- Tag: DataSource Indexes Vs. DataAdapter Select Statements Tag: 68066
Connection String question
Hi !
I am trying to connect to sample Northwind MSDE database. I installed
it in default location (under Program Files/Microsoft SQL).
The following connection string works Ok:
String connString = "DATABASE=northwind;INTEGRATED
S