all groups > dotnet ado.net > march 2005
Filter by week: 1 2 3 4 5
DataTable.Row[i].EndEdit()
Posted by Antonio Budano at 3/31/2005 7:24:43 PM
Hi,
How can I know which row is currently being editing when I have some
controls bound to a DataSet.DataTable in order to call the EndEdit method
prior to update data to the database?
Is there any CurrentRecord indexer?
When I call Rows.Add metod, the row I am adding will be put at the end?
... more >>
Architecture: One Producer, Many Consumers
Posted by Neil B at 3/31/2005 7:13:55 PM
Hi all,
This sounded like a really easy R&D challenge but .NET is leaving me
with too many options and I don't have six months to experiment and find
the best one. Hence I would like to lean on this board's expertise.
Environment is C#/.NET/SQLServer2k/VisStudio .NET.
I have several remo... more >>
sqlcommand parameters with null
Posted by gv at 3/31/2005 3:36:07 PM
Is there an easier \ shorter way of doing this?
If txtreason.Text = "" Then
NoteCmd.Parameters.Add("@reason", SqlDbType.VarChar, 100).Value
= vbNull
Else
NoteCmd.Parameters.Add("@reason", SqlDbType.VarChar, 100).Value
= txtreason.Text
... more >>
Strange slow down with imbricated DataReader (Oracle, c#)
Posted by guhar1 NO[at]SPAM yahoo.com at 3/31/2005 12:20:45 PM
This is my first c# windows app.
I create a data reader on an Oracle table. Returns 552 rows. I iterate
thru them, goes like light speed.
Next, for each row returned, I need to fetch from another table to get
some other information. When I do that, my program takes 20s instead
of 1s. I even... more >>
How does ADO.NET handle transactions when the connection is broken
Posted by Rob Thompson at 3/31/2005 11:36:09 AM
Hi,
We are thinking of using ADO.NET to implement transactions on our
SqlConnections, but would like to know how ADO.NET and SqlServer handle the
situation when the connection gets broken.
We have a client application in one location and a SqlServer DB in another
location. We have tested th... more >>
closing connection not by design
Posted by JiangZemin at 3/31/2005 9:26:27 AM
Hi, i wanted to get this groups opinions on a design issue ive run into:
a programmer has coded a common data access class which is supposed to be
inherited by all data access layers at my firm. This class instantiates a
connection in the constructor, relies heavily on OleDb objects by necessi... more >>
Trouble with creating DataRelations - Need Help
Posted by Prasun at 3/31/2005 9:25:31 AM
I am building an App that takes an Excel file and populates 3 DataTable's in
a Dataset. I then was to create a relationship between these 3 DataTables.
After dong so I want to run some code to process / modify the data in the
tables and then return the result back into an Excel file. I am a beg... more >>
Decimals truncated in dataset
Posted by robot7 at 3/31/2005 9:23:02 AM
I'm airly new to .net and I can't seem to figure out this problem, I hope you
can help...
I'm filling a dataset from an Access database with columns of type =
Decimal. When I load a datagrid with the dataset, the numbers are truncated,
i.e. in Access I see 0.87224505043, in my datagrid i se... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Datatable.Select method - Difference Between %AE% and *AE*
Posted by palanir NO[at]SPAM gmail.com at 3/30/2005 11:12:45 PM
Hi,
Keyvalue :AETHAE
Keyvalue : AETH
The problem is that I am using the Datatable .select method and
Filter expression is %AE%.This Pattern is searchs only mid string not
with starting point.
Output: AETHAE
IF i use the *AE* , then searches from the starting point
Output: AETHAE an... more >>
How to synchronize Dataset to database
Posted by Arnab at 3/30/2005 10:59:05 PM
In our project we fetched data into dataset from the database.
Now we are storing the data in a XML File from the dataset.
The modified DataSet is kept in the XML File And dataset is closed.
Later at the time of saving we are building the dataset from the XML file
and then want to save the data... more >>
Problems inserting data into Access database
Posted by Roshawn Dawson at 3/30/2005 4:04:16 PM
Hi,
I'm trying to insert new rows into a table in an Access database.
Here's my code:
Dim cn As OleDbConnection
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
cn = New OleDbConnection(ConfigurationSettings.AppSettings("cnstr"))
... more >>
DataSet and Table join
Posted by dmsy at 3/30/2005 3:59:15 PM
Is there a way to join DataTables, kind of like how you do join in SQL?
... more >>
DataTable Select method
Posted by Mandar Patankar via .NET 247 at 3/30/2005 2:34:10 PM
I want to know what kind of queries can i execute on datatable select method. The one i am interested in is between query
for eg:- this is my sample query
Select max(resultan) from TblseasResult Where SeasId='15.3.13.3302005' And Countno between 4801 and 4806
where Countno is numerical fi... more >>
Can't find stored procedure
Posted by tshad at 3/30/2005 1:46:10 PM
On Sql Server 2000, my program can't seem to find the Stored Procedure:
AddNewResumeTemplate.
The error it shows is:
Could not find stored procedure 'AddNewResumeTemplate '1234',1001,'This is a
test','This is our resume',5'.
The problem is that it is there. I even have Sql Profiler run... more >>
using ReadXML with disparate XML data
Posted by Joe at 3/30/2005 11:13:03 AM
I want to load data from two related but different XML files into a two
different DataTables in a single DataSet, then create relations, and finally
filter and select specific data. I can't figure out how to load the two
different sets of data into one DataSet. For example, the following resul... more >>
A question about closing the SqlDataReader
Posted by M at 3/30/2005 10:54:39 AM
Hi all,
I have code like:
SqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
{
// do something here
}
else
{
reader.Close(); // this is the line I'm not sure about
Response.Redirect("to_some_other_page.aspx");
}
reader.Close();
My question is:
Is re... more >>
Can I execute sql drop database cmd w/a SqlParameter
Posted by John Aldrin at 3/30/2005 10:36:10 AM
Hi,
I'm wondering if it is possible to execute a sql command to drop a
database with a SqlParameter containing the name of the db to drop.
I've tried the following and I get an error
SqlCommand dropDbSqlCmd = _masterDbConn.CreateCommand ();
dropDbSqlCmd.CommandType = CommandType.Text;
dr... more >>
Replacing MSDE
Posted by Michael at 3/30/2005 10:34:43 AM
Hello,
I have made a Windows Application in C#, with a database running under MSDE.
The application is quite simple, and there is only 3 tables, and only one
has maybe 200-250 records maximum (the 2 others have only 10-20 records).
I wanted to use XML files for datasets, but i am not sure... more >>
Excel file permissions problem
Posted by Nikolay Petrov at 3/30/2005 10:09:34 AM
I have an Excel file, which I use to store some data.
When reading from file, everiting is ok.
When i try to insert some row, an OleDbExcetpion is thrown.
I'va tracked it to a permission problem.
The sheats of my Excel file as protected with password.
Any way I can supply this password to the c... more >>
List SQL Servers instaled on the system and the ODBC drivers
Posted by irimiabc at 3/30/2005 8:53:08 AM
Hi!
I am trying to find a way for listing the SQL servers installed on a
machine, for example MS SQL, Oracle, My SQL, Transact SQL.
And also the ODBC drivers that exists on a system, including ODBC drivers
for sql servers previosly listed, and the ODBC drivers for flat files (for
exampl... more >>
DataReader problem
Posted by David Young at 3/30/2005 8:38:49 AM
I hope someone can help. I'm using a SqlDataReader to pull some data from a
Sql 2000 database. Most of the columns are varchar's of varing lengths and
one of the columns is defined as a char(2). Using the datareader I can get
the values of the varchar columns, but the char column returns empty... more >>
Connecting to non SQL database
Posted by Jake at 3/30/2005 8:29:05 AM
When i try to connect to an old UniVerse database (using their ODBC drivers)
visual studio (vc# standard) gives me an error saying something to the effect
that this version can only connect to Access/SQL databases. What version of
visual c# or visual studio do I need to connect to any ODBC co... more >>
Altering Access Database Using ADO.NET
Posted by lee.ottaway NO[at]SPAM v21.me.uk at 3/30/2005 6:33:28 AM
Hi
Since the last version of my released software I've had to make some
modifications to the back end Access database such as adding an extra
field to a table and adding new queries.
Does anyone know the easiest way to modify a tables structure and add
queries using purely VB.NET or is it n... more >>
DataAdapter Query Access
Posted by Johny at 3/30/2005 6:15:05 AM
Hi people, i have a question about this:
I need to know how can i obtain the sql queries (Insert, Update, Delete)
that are executed by DataAdapter.Update on a DataSet. I know that i can see
that queries on SQLProfiler but i want to obtain that sentences on my
code...It's possible???
I ho... more >>
Simply adding a table
Posted by Thomas Krause at 3/30/2005 3:32:40 AM
What is the best way to add a new table to a database?
If possible I don't want to use SQL, but ADO.Net directly.
I'm a Ado-Newbie and tried the following:
dataSet.Tables.Add("xyz");
adapter.Update(dataSet);
but this does not work. I believe that Adapter.Update() only works for
Tables ... more >>
A simple insert problem
Posted by Dave Cooke via .NET 247 at 3/29/2005 10:52:12 PM
Hi all,
I know I am going to kick myself but I have run into a bit of a brick wall and I need some help before I loose the rest of my hair.
All I want to do is insert a new row of data into a access database from a vb.net app I'm writing.
I have read so many forums today and I think I must b... more >>
return OleDbDataReader from static function
Posted by Sharon at 3/29/2005 10:28:19 PM
Hi all
I want to return OleDbDataReader from a static function,
So I will have DB interface for my Entire project,
Is it possible?
How do I close the connection ??????
Thank you
Sharon
/////////////////////////////////////////////////////////////
//Example of use :
////////////////////... more >>
Handling paging in the UI without using datagrid/dataview
Posted by Hari at 3/29/2005 4:29:02 PM
Hi
Please give me some inputs on the following :
Iam planning to use a custom control to list a large number of records from
sql database through ado.net. so in the following code, if i give a select
* query, does the dataset holds the complete records in the memory? or is
there anywa... more >>
Excel and ADO.NET
Posted by Prasun at 3/29/2005 3:52:30 PM
Hello:
I am building an App that takes an Excel file and populates 3 DataTable's in
a Dataset. I then was to create a relationship between these 3 DataTables.
After doing so I want to run some code to process / modify the data in the
tables and then return the result back into an Excel file. ... more >>
is it possible
Posted by João Santa Bárbara at 3/29/2005 3:36:54 PM
hi all
is it possible to use 2 datareaders at the same time with the same
connection ????
how ???
if not ? how can i do a clone from a connection ????
thks
JSB
... more >>
ADO.Net DataSet to ADO Recordset
Posted by Ganesh at 3/29/2005 1:13:04 PM
I have two applications, one on ASP.Net and the other on ASP (both have
different explicit databases). It so happens that the ASP application now
wants to use the dataset created in ASP.Net for further information
processing.
How do i make this happen?... more >>
Messages in ADO.NET
Posted by Mike Caputo at 3/29/2005 1:03:03 PM
I would like to be able to execute a long-running stored procedure from a
Windows Forms application. The procedure loops through about 7,000 items,
calling various other procedures along the way, and progress is displayed in
SQL Query Analyzer using the Print command. It appears that Print e... more >>
How to override (null)?
Posted by Cezar at 3/29/2005 12:11:01 PM
Sorry, this can be trivial question, but somehow I cannot find the answer to
it.
When I bind a data grid to a table, then some cells show a text value
"(null)". This is happening for fields that have a database null value.
When I manually read the database I can intercept this and override th... more >>
How can I do a comum DAL to access SQL, Oracle, Access, etc
Posted by Fernando Lopes at 3/29/2005 11:16:54 AM
Hi.
I want to develop a class (my Data Access Layer) to access all database what
am I want (like Oracle, SQL Server, Access, MySQL)
Someone did anything like that? Or know how can I do that?
I hear something about Pet Shop 3 model access each Oracle than Sql Server.
The model they are utilize... more >>
ado.net create a table
Posted by freetorn2002 NO[at]SPAM yahoo.ca at 3/29/2005 11:05:33 AM
Hi ,
I want to copy a dbf file to the the access database.I thought of two
solutions
1. Copy the dbf to the access db by the query
SELECT * into dest_table from [source.dbf] in 'source folder'
this does not work out, it gave me the error that u have no
permission
2.create a table with the sa... more >>
Easy question, need help on how to find the position of a record
Posted by Michael Rodriguez at 3/29/2005 10:13:26 AM
I have a basic customer data entry screen where the sort order is customer
name. Given a customer's ID#, I need to find the position of that record in
the list that is sorted by name, i.e. in the form's currency manager. In
order to move the record on the screen to the record I want, I would... more >>
LABEL ON not part of sql server?
Posted by Steve Richter at 3/29/2005 10:11:44 AM
in sql server, how do I specify the column heading of a column? That
is a column heading other than the column name.
in the little sql I know, in the SQL on the IBM AS400, the following is
permitted:
Example 1: Enter a label on the DEPTNO column of table DEPARTMENT.
LABEL ON COLUMN DEPARTM... more >>
DataReader works even if the SQLServer is shutdown.
Posted by Nimmagadda Ramakrishna via .NET 247 at 3/29/2005 10:01:23 AM
Hi,
I was thinking that the SQLDataReader should not work if there is=
no connection to the SQLServer=2E
We experimented the scenario but looks like after we execute the=
ExecuteReader method, in the debub mode on VS=2ENET , we then=
shutdown the SQLServer 2000=2E Then we tried to iterate th... more >>
Excel ADO question
Posted by Nikolay Petrov at 3/29/2005 8:56:12 AM
I use Excel file as a data source for my Web Service.
I want to know a few things.
1. When reading from the Excel file, does it remain locked for the time of
reading the data? Must I implement some logic, to check if the file is
locked?
2. May I use SQL statements to Insert, Update and De... more >>
Patterns and Practices - SQL Database Question
Posted by Mythran at 3/29/2005 8:53:20 AM
One of the major pitfalls of the new Patterns and Practices Enterprise
Library, compared to the old version of the SQL Helper libraries, is that
the code gets blown up. Before, using the SQLHelper library, I could write
code as follows, while the new library I must do stuff following the firs... more >>
DataAdapter Update
Posted by J L at 3/29/2005 8:39:45 AM
If a DataAdapter.Update fails mid-way through the dataset, are earlier
updates rolled back or how is this handled?
For example, let's say I am a dummy and I create a dataset without
setting a unique key constraint. Then I try to do an update on the
underlying database. It would fail on the rec... more >>
Filtering Dataviews
Posted by wjousts at 3/29/2005 8:21:03 AM
The DataView RowFilter property rather annoyingly doesn't allow for wildcards
in the middle of strings. So, for example:
col LIKE 'A*B'
doesn't work, i.e. it doesn't return all rows where col starts with A and
ends with B and has anything inbetween. To get around this I derived my own
cl... more >>
Bulk insert to sql server
Posted by Ran Davidovitz at 3/29/2005 6:39:01 AM
Hi.
We have an object model that return a list of about 2500 lins and i want to
add them to sql as fast as i.
How can I do a bulk insert to sql Using ADO.net?
Thanks
... more >>
how is SQLConenction associated to a Database
Posted by Abhishek at 3/29/2005 5:39:37 AM
Hello
When we open a connection using some connectionstring the connection is
associated to a database which we specify in the ConnectionString. Now
my question is
1) When i do a changedatabase does the connection object closes the
connection to the server and opens the connection again for a n... more >>
retrieving a large amount of data across the network from SQL2000
Posted by Randy Collins at 3/28/2005 9:49:42 PM
We need to retrieve approx 200,000 records containing about 100 megabytes of
data across the network from a SQL 2000 DB server to a VB.NET app that then
cursors through this data, does some processing and outputs it to several
destination tables. What is the optimal way to handle this large am... more >>
SQL Server and Split function
Posted by Indy at 3/28/2005 8:33:39 PM
I wish to create a procedue (in SQL Server) that takes one long string -
i.e. 25 names that are separated with a '#'. In C# I use Split function to
get 25 different strings from that one, but I don't know how to do it in SQL
Server
Thx
... more >>
disconnected experiment
Posted by barret bonden at 3/28/2005 7:39:57 PM
I get
An unhandled exception of type 'System.ArgumentException' occurred in
system.data.dll
Additional information: Format of the initialization string does not
conform to specification starting at index 175.
from this line: cn.ConnectionString = bs
listing (more or less out of page ... more >>
Yukon UDT Help
Posted by Rod O. at 3/28/2005 5:40:13 PM
Hi all,
What is the syntax for adding a UDT that has a namespace? When I try
CREATE ASEMBLY Foo FROM "C:\Foo.dll" WITH PERMISSION_SET=SAFE
CREATE TYPE Bar EXTERNAL NAME Foo.SomeSpace.Bar
I receive the error
Incorrect syntax new '.'.
If I create the same UDT with no namespace... more >>
Cascading updates not working
Posted by Dave at 3/28/2005 4:16:37 PM
I have been using this feature for a long time and it's worked like a
champ, but I've come across a time when it doesn't seem to work.
Typically (when it works) there is a parent table that has it's Primary
Key set with the AutoIncrement. There is then a Child table that has a
DataRelation (wi... more >>
Copy a table between databases
Posted by Patrick B at 3/28/2005 2:40:39 PM
If you have a DataTable full of data, what's the easiest way to save the
DataTable as a new table in a Microsoft Access database?
This is a C# application. What the application needs to do is:
1) Run a select query on an Access database and fill a DataTable with
the result.
2) Create a ne... more >>
|