Groups | Blog | Home


Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > dotnet ado.net > march 2007

Filter by week: 1 2 3 4 5

Deployment issue - Error 26
Posted by Flomo Togba Kwele at 3/31/2007 9:34:43 PM
I am developing a forms app on a Windows XP machine with VS 2005 and also a copy of SQL Server 2005 Developer. The target environment is a dedicated server running SQL Server 2005 Standard and client machines running the VS2005-developed code on Windows XP. Initial testing looked OK after chan...more >>


Transactions + multiple table adapters
Posted by Mark Baldwin at 3/30/2007 10:57:50 PM
I am using SQL2000 and .NET 2.0 I have a dataset, with two DataTables each having a TableAdapter. I need to use the insert command on the first TableAdapter and then execute a stored procedure on the second table adapter - all within a transaction. Now I want to use datasets, because they ...more >>

SELECT query
Posted by Lubomir at 3/30/2007 4:08:01 PM
Hi, I have a table: column: A | B ---------------- row: a | 1 a | 2 c | 2 c | 3 I need to get from this table all "distinct" records with maximum value in B for particular value in A So in this case I need the result will have 2 rows: a|2, C|3 ...more >>

Concurrency Violation
Posted by pooba53 at 3/29/2007 3:45:23 PM
My VB .NET 2003 application communicates with an Access database. So far everything has been working just swell. I have a menu selection in my main form that when clicked launches a "customer data" form that folks fill personal information into and the textboxes are bound to a certain number o...more >>

Adding identity column to an existing DataTable
Posted by SoftLion at 3/29/2007 3:25:24 PM
Hi all, I'm trying to add an identity like column into an existing table of a DataSet: DataSet ds = ... .... DataColumn identity = new DataColumn( "ROWINDEX", typeof(int) ); identity.AutoIncrement = true; identity.AutoIncrementSeed = 0; identity.AutoIncrementStep = 1; ds.Tables[0].Column...more >>

Variable WHERE part of SELECT command
Posted by Lubomir at 3/29/2007 9:36:00 AM
Hi, I need to get data from a table from a database. The data will be queried according ID column. In a fixed time interval my application will receive the list of IDs. Than all records with this IDs should be retrieved from database. Tehre is not any select SQL command which would allo...more >>

Shameful design
Posted by Amir Tohidi at 3/29/2007 2:44:05 AM
Hi In all the years I have been using the internet, this is first time that I am venting my anger publicly! So as you can imagine, I am not a happy bunny! We have just come across a new issue in our application which we have traced to DataRow class no longer being marked serialisable in .N...more >>

Tabledefs and VB.net
Posted by Vanny at 3/28/2007 4:40:00 PM
I'm really new to vb.net. What I like to know is what would be the code to read the definition of table or view. Here is the piece of code in VB6 that try to find a column name called "year" in a view. How to write this in VB.net? For Each fldField In gdbOes.TableDefs(viewname)).Fields ...more >>



How do you programmatically create a file in the App_Data folder?
Posted by Tony Girgenti at 3/28/2007 12:59:11 PM
Hello. Developing a web site in VS2005, SP1, VB, .NET 2.0, ASP.NET 2.0 on XP Pro, SP2. I'm trying to write a file to the App_Data folder in my project using: Dim docPath As String = "~\App_Data\Trips.xml" Using sw As StreamWriter = File.CreateText(docPath) sw...more >>

Loading ado.net table from datatableReader - wont update table on
Posted by Rich at 3/28/2007 12:04:08 PM
Hello, I have to read data from an external file into a ado.net table ds.tblExternal.ReadXml(...) and I want to load this data into a table that resides in a sql server (2000) DB. I can do this if I loop through ds.tblExternal and add new rows to the ado.net table from the DB: da.Fi...more >>

Can not update text with Polish characters.
Posted by Eurofirms. at 3/28/2007 5:02:04 AM
I have a table where there are translations of various strings into different languages. I need to load this strings and allow some users to modify and update the strings back into the table. When I load a text written in polish, the application loads the data correctly and the user see all...more >>

Deployable SQL Server authentication for ASP.NET
Posted by warder at 3/27/2007 7:00:54 PM
Hi, We have an ASP.NET application that connects to a SQL Server database. Historically we have used a trusted connection, and during our database creation, created granted database access to the system account <SQLSERVERNAME>\ASPNET. This appears to work great on XP in that IIS appears...more >>

Violation of PRIMARY KEY constaint...
Posted by Ken Abe at 3/27/2007 6:58:02 PM
Dear Community, I'm using ADO.net to update a SQL Server 2005 table. The table has a an aggregate primary key made of two integers. I use the typcial SqlDataSet/SqlDataAdapter tools to perform updates and inserts, after an initial call to da.FillSchema(). My select command is 'select * from...more >>

Problem with Data Readers and connections
Posted by Somesh at 3/27/2007 6:12:06 PM
Hi, I am doing maintenance work for a ASP .net application which uses ADO .net to access the data from database (SQL Server 2000).The functionality is something like that it uses SQL Data Reader to fetch the data and always open a new connection to do the same since only one Data Reader...more >>

VS 2005 MS SQL server express query problem
Posted by Yogi at 3/27/2007 2:43:06 PM
I wrote simple application (C#) that use a database (MS SQL serwer) and I had very strage problem I want to have pramized query, so my code is... SELECT name FROM person WHERE (name LIKE N'%'+ @partOfName +'%') I used VS 2005 with MS SQL server Express Edition I used this...more >>

Loading a stored procedure based on index?
Posted by mjpdatadev NO[at]SPAM yahoo.com at 3/27/2007 7:48:44 AM
I have a few sprocs and I want to create a generic handler for them. Basically, I want to call any sproc and leave it up to the developer to know the parameters. To keep it simple, I would like to do it so that the only thing that the developer has to know is the appropriate datatype and NOT th...more >>

System.Collections.Generic.List
Posted by Kuldeep at 3/27/2007 12:00:00 AM
Framework: Visual Studio 2005, ASP.NET Programing Language: C#.NET I am using a Generic List Collection to fetch a particular master data from the database. Once collected, I use this Collection to bind it to a DataGrid. Now that I am using a Generic List Collection to populate the DataGrid...more >>

SqlClient/OleDbClient vs Remoting speed
Posted by Mark at 3/26/2007 6:32:37 AM
Hi I have prototyped a WinForms application that uses the Enterprise Microsoft Data Access block to load data into a strongly typed dataset. This works very well and is pretty fast. My problem is that our customers will probably complain about having the connections string (with username/pa...more >>

Unable to sort Dataview
Posted by Amritha.Datta NO[at]SPAM gmail.com at 3/26/2007 6:31:42 AM
Hi, I was trying to sort dataview using the below process. It is throwing exception. Please help. Dim DSExcel1 As DataSet DSExcel1 = New DataSet Dim myView As DataView myView = DSExcel.Tables(0).DefaultView ...more >>

monitor database table
Posted by Steven Van Eyck at 3/24/2007 8:46:48 PM
Hi there I'm developing a Windows Service that needs to take a specific action each time a new record is inserted in a database table. I can write a select statement that the Service executes recursively, but I was wondering if there is a more efficient way to 'monitor' a database table ...more >>

SqlNotificationInfo
Posted by Lubomir at 3/23/2007 4:32:03 PM
Hi, To capture changes in the database I am using SQLDependency. When the change is notified I update my UI. In the handler for OnChangeEvent I checked what type of info is passed to the method argument. I find out it is "Error" In MSDN I read it is an Internal Server Error. However,...more >>

Parent-Child-Relation and DataView - .net 2.0
Posted by Rolf Welskes at 3/23/2007 2:19:54 PM
Hello, I have the following problem: I have tableA, tableB A relation between tableA and TableB. So table B is the child of table A. In tableA, tableB may keyX be the foreingn key and Fk_tableA_tableB the relation. Now I have a DataView dvA pointed to tableA. Now I take a bindingSource bs...more >>

Access Compact/Repair in ADO.Net?
Posted by Paul Engel at 3/23/2007 11:57:45 AM
I am in the midst of converting some internal programs. Several of them, which still rely on some Access 97 databases, invoked the DAO 3.5 Object Library's DBEngine methods "Repair" and "Compact". Is anyone aware if this functionality is provided in any of .Net Framwork's System.Data classes? ...more >>

Possible to create an Expression column that reaches back through several relations?
Posted by Earl at 3/23/2007 1:09:35 AM
With a complex normalized database structure using surrogate PKs, sometimes to get a string name value, it's necessary to reach back through several PK-FK relationships. What I'd like to do is add a customer name to some datagridviews that are far down the sales process without setting up some...more >>

Performance and Memory Usage Consideration about DataTable and Dat
Posted by Samuel at 3/22/2007 5:24:10 PM
Hi, How do I free up the memory taken up by the .NET datatable and dataset after I finished working with them? How do I HELP the GC to do its job sooner to release memory taken up by DataTable/DataSet? I am worried about memory usage. Should I be using DataReader exclusively? But complex...more >>

Any harm in using Async=true to sql server 2005 for non-async db calls
Posted by Chris Becker at 3/22/2007 5:05:56 PM
Is there any harm (performance or otherwise) in using "Asynchronous Processing=True" in my connection string to a sql server 2005 database for both async db calls and non async calls? The idea behind it is taking advantage of connection pooling, and everything seems to work fine using the Async...more >>

Updated table has changed the row order
Posted by Lubomir at 3/22/2007 10:00:41 AM
Hi, 1/ I inserted new data to the database using SQLDataAdapter. All data are inserted, but the order of rows in db table is not identical with the order in DataTable used for the batch update. No sorting is made. This occures when I insert more then 800 or 1000 rows. 2/ I tried to...more >>

How to handle concurrency issue with better performance?
Posted by cherry at 3/21/2007 7:04:18 PM
I am now thinking a method to handle the concurrency issue in my program. In .Net, the Command Builder Class will generate SQL automatically in which it compares all the fields' original version with the version in database as the update criteria and thus avoid overwriting others' data. In m...more >>

How to add new (empty) types rows to TableAdapter with contraints?
Posted by Todd Beaulieu at 3/21/2007 2:01:23 PM
I'm struggling with relationship constraints, when adding new rows. If I want to add a single row in a single-table scenario and let the user enter values on a fom, it's easy. I just call the TA.Add{tablename}Row() method. In the edit form I bind and do an Update() when done. Problem? Say I...more >>

Can I have two databound cbo's to same parent Table/different rows
Posted by Todd Beaulieu at 3/21/2007 9:57:02 AM
I'm trying to create an edit form to schedule two teams to play on a given scheduled date. I have a Schedule Table and a TeamMatch Table. The TeamMatch Table has a ScheduleID Column (FK) and two TeamID Columns (FK). I'm in 2005 with a DataSet. I added the three TableAdapters and established ...more >>

Oracle 10g and OracleClient .Net 1.0/1.1
Posted by Dougie Brown at 3/21/2007 8:36:10 AM
Hi We're currently upgrading to Oracle 10g client and we've hit an issue with ..NET 1.0 and 1.1 applications that use OracleClient to connect to Oracle. Basically any .NET 1.0 or 1.1 application that tried to open a connection to Oracle would get a "System.Data.OracleClient requires Orac...more >>

My Book is Incomplete Regarding SQL Commands ;-(
Posted by pooba53 at 3/20/2007 2:42:49 PM
The book I'm learning VB .NET from barely scratches the surface of ADO.NET. I have a working application that has a database connection (to Access), a data connection OlDbConnection1, a data adapter OlDbDataAdpater1, and my text boxes are working as expected when bound to the Access fields. The ...more >>

Request: ADO.NET Step by Step Practice Files
Posted by Ali Laleparvar at 3/20/2007 12:53:27 PM
Hi! Is there anyone who has the practice files of "Microsoft ADO.NET 2.0 Step by Step" book by Rebecca M. Riordan? I' ll be really grateful if someone emails the files to me... ...more >>

Any Reason To Wrap TableAdapter With a Using Statement?
Posted by twahl at 3/20/2007 12:47:28 PM
Hi, Is there any reason to wrap a TableAdapter with a using statement? I don't think there is any reason to but I found example code that did. Thanks in advance!!! using (TransactionScope updateTransaction = new TransactionScope()) { using (MyTableAdapter adapter = new MyTableAdapter()...more >>

Batch Processing
Posted by Shawn B. at 3/20/2007 11:10:13 AM
Greetings, I'm interesting in hearing about certain techniques that might enable me to execute nonqueries in bulk much faster than one-by-one. Currently, we have areas on the system that'll execute anywhere from 25 to 1000's in bulk but it does so by sending the command each time. One t...more >>

Multiple providers with typed tableadapter
Posted by Polaris431 at 3/20/2007 7:37:29 AM
I am using VS 2005 and created a dataset using the designer. I have two different data sources although both have the same schema. One is a SQL Server 2005 database while the other is a SQL Server 2005 Mobile. In the designer a connection is automatically setup when I drag a table to the designe...more >>

insert stored procedure does not commit to the database More options
Posted by philhey NO[at]SPAM googlemail.com at 3/20/2007 5:48:43 AM
Hi, I have a problem where an insert stored procedure does not commit to the database from a vb.net program. I can run the stored procedure fine through the IDE, but when I use the following vb code the message box shows the next ID number but when I check the database no new row has been ad...more >>

How to refresh a typed dataset in Visual Studio 2005
Posted by johnsmithme2004 NO[at]SPAM yahoo.com at 3/19/2007 6:50:02 PM
I have generated a typed dataset in Visual Studio 2005 by dragging tables from Server Explorer onto the Designer surface. I then configured adapters and added some methods based on stored procedures. Now the underlying tables in the database were changed and I added and remove some columns. ...more >>

How do i move an SQLDatabase to another location?
Posted by Tony Girgenti at 3/19/2007 3:48:42 PM
Hello. I realize my other post was a bit lengthy, so i'd like to repost this question. Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro, SP2. It has a Dataset with two tables using an SQL 9.0 Server Express. After creating a new database from the VS server explore...more >>

Syncronize dataset with database in multithreaded application.
Posted by Jess Lundager Andersen at 3/19/2007 2:30:08 PM
Hi I have a multithreaded application that uses a typed dataset to held configuration data. The configuration data is also stored in at database. The dateset is send to the different threads using the byref keyword From time to time i need to update the dataset in the application. Using t...more >>

Preview Data dialogue demands values for every param in a store pr
Posted by Peter Jones at 3/19/2007 2:16:05 PM
Hi, If this isn't the correct forum please let me know where I should post. I'm developing in VS2005 and have a data source based upon a parameterised stored procedure. I click to preview my data and I'm presented with a very nice UI that lists all my parameters however, it is the nature...more >>

the insert s successful, but nothing changes in DB!
Posted by roger_27 at 3/19/2007 12:46:03 PM
Hey, this code seems to work fine, since there is no rows in the DB, it does the INSERT statement. then it proceeds to the second update statement and works great. but nothing is actually inserted into the database. its sql 2005, and this is .net 2.0 in C#. any ideas? P.S. I have wi...more >>

Child Aggregate Filter Not Recognising Newly Added Child Rows (ADO.NET 2.0 Dataset)
Posted by s.gregory NO[at]SPAM 4castweb.com at 3/19/2007 10:56:44 AM
The problem is simple: Astonishingly, it seems that in an ADO.NET 2.0 dataset, adding new rows to a child table does not seem to immediately reflect in any aggregate filter placed upon the parent table. For simplicity I have written some code below for a simple .NET 2.0 winforms app and a very...more >>

SQLCommand timing out too fast?
Posted by AC at 3/19/2007 10:47:28 AM
Dim com As New SqlClient.SqlCommand("OurRoutine") com.CommandTimeout = 1200 'let it run forever, well 20 minutes anyway When I set the timeout to 1200 for 20 minutes, I still get timeouts in 30 seconds... Our routine runs in just about 30 seconds, so sometimes it times out and others it d...more >>

Typed Dataset Problem
Posted by Bryce at 3/19/2007 10:11:47 AM
Using ASP.NET and C# (Visual Studio 2005). I generated a Typed DataSet. I run the following code, but don't get any errors, but it doesn't appear to be updating the database. (I've stepped through the code to ensure it is hitting the code): // Begin Code DirectoryListingTableAdapters.DIREC...more >>

How to: Different filters for two binding sources with the same data source
Posted by nvx at 3/19/2007 3:48:15 AM
Hi, is it possible to set different filters for two binding sources with the same data source? If so, how? I tried to use this code: BindingSource bindingSource1 = new BindingSource(); BindingSource bindingSource2 = new BindingSource(); bindingSource1.DataSource = myDataSet.Tables["tblname"...more >>

ORA-00917 missing comma when using OleDb to insert chinese character
Posted by cherry at 3/19/2007 2:14:18 AM
I have a program using OleDbCommand to insert some chinese character information into Oracle Database. It runs normal except when data contains a particular chinese character "=A6=E2" and the exception message is ORA-00917 missing comma. This is so strange for me since this is a very simple ch...more >>

Problems Updating Access Table
Posted by Octavius Khan at 3/18/2007 6:46:15 PM
I'm fairly new to VB.Net 2005 development and I am in need of updating MS Access 2000 data via code. This was easy to do in my prior programming language, but I am stuck here. :( I am using the following test code that when a button is pushed, the contents of the Customer_ID field is chang...more >>

Closing an Access OleDBConnection from another Form
Posted by pooba53 at 3/18/2007 1:28:36 PM
I have Form1 that has two OleDBconnections to an Access database. I have Form2 that has a function that requires the Access db be disconnected from my application. My Form2 knows nothing about the db connections in Form1 obviously. How do I close the open dbconnections from Form2 when they a...more >>

A thorny issue regarding composite keys in a typed dataset
Posted by DCW at 3/18/2007 11:09:20 AM
Hello group: Given a data table in a typed dataset with a composite key made up of 2 integer fields, what approaches have people taken with regard to editing them? The following might help describe the situation better. Situation: I have a grid view displaying some customer configura...more >>


DevelopmentNow Blog