Home All Groups Group Topic Archive Search About

ADO.NET

microsoft.public.dotnet.framework.adonet
Score monitor database table
Steven Van Eyck - 24 Mar 2007 7:46 PM - 3 messages
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 ...
Score SqlNotificationInfo
Lubomir - 23 Mar 2007 11:32 PM - 13 messages
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" ...
Score Conversion of .NET DateTime to SQL datetime via VarBinary
Karch - 23 Mar 2007 9:46 PM - 2 messages
I am doing some experimenting with serialization (for use with Service Broker) and I am having a problem converting from a .NET DateTime (in the client application) to a SqlDbType.VarBinary (as passed to the stored procedure VARBINARY(MAX)) and then finally back to a valid DATETIME in Sql ...
Score Access Compact/Repair in ADO.Net?
Paul Engel - 23 Mar 2007 3:57 PM - 7 messages
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? ...
Score Parent-Child-Relation and DataView - .net 2.0
Rolf Welskes - 23 Mar 2007 1:19 PM - 4 messages
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. ...
Score Update databse frx
Marin - 23 Mar 2007 12:40 PM - 4 messages
I have problems with updating access database from asp.net 2.0 application. I use this code: SQL = "UPDATE Tabela Set Polje1=" & CInt(Text) & " WHERE ID=" & CLng(Session("ID")) cmd = New OleDbCommand(SQL, odbConn) cmd.ExecuteNonQuery() No compile error, no run-time error but database is not updated!! How to ...
Score Possible to create an Expression column that reaches back through several relations?
Earl - 23 Mar 2007 5:09 AM - 2 messages
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 ...
Score Performance and Memory Usage Consideration about DataTable and Dat
Samuel - 23 Mar 2007 12:24 AM - 15 messages
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? ...
Score Any harm in using Async=true to sql server 2005 for non-async db calls
Chris Becker - 23 Mar 2007 12:05 AM - 2 messages
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 ...
Score Datagridview and relation
Earl - 22 Mar 2007 11:15 PM - 4 messages
I can write a bunch of code to use a datagridview with two related tables, but I'm hoping to be able to use the bindingsources to do it instead. I'm not getting any exceptions, but the datagridview is only displaying the ...
Score Updating Disconnected DataSets with GridView
ist - 22 Mar 2007 7:32 PM - 2 messages
Hi, I am trying to create a Session-Wide, Disconnected, Updatable DataTable (or DataSet) object and use it through an ASP.NET GridView. The scenario is this: 1. When the page is first loaded, connect to DB, get data, fill ...
Score A stable dataset/datatable/datarow visualizer?
John Dalberg - 22 Mar 2007 6:33 PM - 1 message
I tried a few dataset visualizers from codepoject.com. They have added features over the one which comes with VS2005 like the ability to view deleted and updated rows. However they are unstable and I get exceptions when used with typed datasets. Some of them do not show columns if a column ...
Score Updated table has changed the row order
Lubomir - 22 Mar 2007 5:00 PM - 4 messages
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. ...
Score How to handle concurrency issue with better performance?
cherry - 22 Mar 2007 2:04 AM - 11 messages
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' ...
Score How to add new (empty) types rows to TableAdapter with contraints?
Todd Beaulieu - 21 Mar 2007 9:01 PM - 3 messages
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 ...
Score Can I have two databound cbo's to same parent Table/different rows
Todd Beaulieu - 21 Mar 2007 4:57 PM - 2 messages
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). ...
Score Oracle 10g and OracleClient .Net 1.0/1.1
Dougie Brown - 21 Mar 2007 3:36 PM - 7 messages
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 ...
Score DataSet.Merge
mail747097 - 21 Mar 2007 2:04 PM - 1 message
I have two DataTables, DataTable1 and DataTable2. I would like to merge DataTable2 into DataTable1. If DataTable2 contains a row that does not exist in DataTable1 I would like that row to have RowState Added or if DataTable2 contains a row that is changed compared to ...
Score NullReferenceException on DataSet.Clear. dotnet 2.0 bug ?
Stephen Ahn - 21 Mar 2007 3:50 AM - 1 message
This error can be reproduced on Windows XP PCs (with dotnet versions 2.0.50727.91 and 2.0.50727.42). The error does not occur on a Vista PC (with dotnet version 2.0.50727.312). The code also works fine when compiled under VS2003 and  run under dotnet ...
Score SQL Server Error 1205, State 50 while reading a view
Valerie Hough - 20 Mar 2007 10:57 PM - 1 message
Client is using SQL Server 2000 SP4. They are getting SQL Error 1205, State 50 while reading results from a view as follows: string connStr = "Server=MyServer;" +                          "IntegratedSecurity=SSPI;" ...
Score My Book is Incomplete Regarding SQL Commands ;-(
pooba53 - 20 Mar 2007 9:42 PM - 10 messages
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 ...
Score DataRelation problem
Jim Brandley - 20 Mar 2007 8:15 PM - 1 message
I have a DotNet 2.0 application working under Oracle, and I'm getting it up on SQL Server 2005. I have a dataset that contains two tables. The second contains objects from the same database table as the first, but are ...
Score Request: ADO.NET Step by Step Practice Files
Ali Laleparvar - 20 Mar 2007 7:53 PM - 4 messages
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... ...
Score Any Reason To Wrap TableAdapter With a Using Statement?
twahl - 20 Mar 2007 7:47 PM - 2 messages
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()) ...
Score Batch Processing
Shawn B. - 20 Mar 2007 6:10 PM - 2 messages
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 ...
Score Multiple providers with typed tableadapter
Polaris431 - 20 Mar 2007 2:37 PM - 4 messages
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 ...
Score insert stored procedure does not commit to the database More options
philhey - 20 Mar 2007 12:48 PM - 5 messages
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 ...
Score DataGridView.SelectionChanged event fires twice
Simon Harvey - 20 Mar 2007 11:09 AM - 3 messages
Hi Guys, Can anyone tell me why the DataGridView.SelectionChanged event fires twice when I databind to it. If I do the following, the first row is selected automatically, but the changed event fires twice: List<Trailer> trailers = Trailer.SelectAll(); ...
Score How to refresh a typed dataset in Visual Studio 2005
johnsmithme2004 - 20 Mar 2007 1:50 AM - 2 messages
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 ...
Score Syncronize dataset with database in multithreaded application.
Jess Lundager Andersen - 19 Mar 2007 9:30 PM - 3 messages
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. ...
Score Preview Data dialogue demands values for every param in a store pr
Peter Jones - 19 Mar 2007 9:16 PM - 2 messages
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 ...
Score How do i move an SQLDatabase to another location?
Tony Girgenti - 19 Mar 2007 7:48 PM - 13 messages
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. ...
Score the insert s successful, but nothing changes in DB!
roger_27 - 19 Mar 2007 7:46 PM - 2 messages
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 ...
Score Anyone remember an ado.net cheatsheet on the web?
sherifffruitfly - 19 Mar 2007 6:02 PM - 1 message
Hi all, I recall seeing a handy code-snippet "cheat sheet" for common ado.net processes - it had about 10/15/20 of them, if iirc. I neglected to bookmark it, and can't remember where it is now (and google was a ...
Score Child Aggregate Filter Not Recognising Newly Added Child Rows (ADO.NET 2.0 Dataset)
s.gregory - 19 Mar 2007 5:56 PM - 3 messages
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 ...
Score SQLCommand timing out too fast?
AC - 19 Mar 2007 2:47 PM - 3 messages
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 ...
Score Typed Dataset Problem
Bryce - 19 Mar 2007 2:11 PM - 3 messages
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 ...
Score Build ADO.NET ResultSets for Merge Replication.
iKiLL - 19 Mar 2007 1:34 PM - 7 messages
Hi all I am developing in C#, CF2 and SQL Mobile. Currently my app is using Merge Replication. This is all working well. I have now decided to try and use Result sets in my application but I am not ...
Score ADO.NET TableAdapter "The connection is closed" error
foolmelon - 19 Mar 2007 1:18 PM - 1 message
It happens occasionally and randomly.  We have a simple TableAdapter retrieving a row from an Oracle table based on the table's primary key.  The TableAdapter was generated by Visual Studio 2005 TableAdapter Query Configuration Wizard by choosing "Use SQL ...
Score How to: Different filters for two binding sources with the same data source
nvx - 19 Mar 2007 10:48 AM - 3 messages
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"]; dataGridView1.DataSource = bindingSource1; ...
Score How to data-bind a ToolStripMenuItem to a column of a DataTable?
nvx - 19 Mar 2007 9:44 AM - 1 message
Hi, I'd very much like to bind a ToolStripMenuItem to a column of a DataSet.DataTable so the entries in that column would be the items in the ToolStripMenuItem. Is there any possibility to do this? I've tried ...
Score ORA-00917 missing comma when using OleDb to insert chinese character
cherry - 19 Mar 2007 9:14 AM - 2 messages
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 "¦â" and the exception message is ORA-00917 missing comma. This is so strange for me since this is a very simple chinese ...
Score Why custom (config) files are not copied in Web Site / Webservice bin folder
PAF - 19 Mar 2007 9:14 AM - 1 message
Hi all, I have a solution that contains a Web Site / Webservice project and one library project. The library project use a config file. When I build the solution, the config file is not copied in bin folder of web site in spite of the config file is flagged as "Copy Always". ...
Score Problems Updating Access Table
Octavius Khan - 18 Mar 2007 10:46 PM - 3 messages
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 ...
Score How do i move this stuff to a client site?
Tony Girgenti - 18 Mar 2007 10:31 PM - 1 message
Hello. 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. I just spent the whole day trying to figure out why my program stopped ...
Score Closing an Access OleDBConnection from another Form
pooba53 - 18 Mar 2007 8:28 PM - 3 messages
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 are ...
Score A thorny issue regarding composite keys in a typed dataset
DCW - 18 Mar 2007 6:09 PM - 4 messages
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.  ...
Next »