Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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
August 2008


all groups > dotnet ado.net > january 2006

Filter by week: 1 2 3 4 5

Fill strongly type dataset from stored procedure
Posted by ken at 1/31/2006 8:10:29 PM
Dear all, I have a file-strongly type dataset, that have two independent table inside it. I want to fill the two table in the dataset by one stored procedure(have two select sql on it) how can i do e.g. create spname ... SELECT * FROM table1 SELECT * FROM table2 GO and Dataadap...more >>

Generating an SqlParameter from a value in a DataSet
Posted by Stephan Zaubzer at 1/31/2006 6:00:18 PM
How can I generate a Parameter if I cannot retrieve the SqlDbType from an item in a row of a DataSet? Is it safe to just take the object I retrieve from the DataSet and take the following constructor for the Parameter: SqlParameter(string parameterName, object value)??? Regards Stephan...more >>

Using a design time connection from a class
Posted by Ant at 1/31/2006 5:15:28 PM
Hi, I've created an SQLConnection by dragging a DataAdapter onto the form. The connection was named sqlConnection1. When I try to reference this connection in code from another class, I cannot find it. Intellisense only finds the classe SQLConnection. This must be a scope issue. How ca...more >>

Looking for an alternative
Posted by Michael Jackson at 1/31/2006 2:57:46 PM
Current project is in .NET 2003 using SQL Server 2000. I use strongly typed datasets in this app, created by dragging a table form Server Explorer to a design surface, walking thru the SQL Data adapter wizard and generating Datasets. The database in the Server Explorer is a db designed and ...more >>

How can I find the BindingSource has some changed data
Posted by A.M-SG at 1/31/2006 11:30:41 AM
Hi, In my WinForms application, I have a set of controls that are bound to a BindingSource control. When the user closes the form, I need to ask him if he wants to save data. The problem is I cannot find anyway to check if the value of any textboxes is changed! Obviou...more >>

How do I set the DateTimeMode property when filling a DataTable
Posted by kenandcorey NO[at]SPAM gmail.com at 1/31/2006 8:59:04 AM
[ I posted this in Microsoft.Public.Data.Ado, but I haven't had a response. I thought I would try here too. ] I am investigating how best to manage UTC timestamps in ADO.Net. We ran into a lot of issues with UTC DateTime serialization in .NET 1.1. With .NET 2.0, there are new properties to he...more >>

Bug in TableAdapter Code Generator?
Posted by Mark Olbert at 1/31/2006 8:31:10 AM
I've run into problems using TableAdapters under VS2005 where the underlying Fill() method fails due to a constraint violation. This occurs when there was no change to the data of the underlying table -- hence there shouldn't be a constraint problem, so far as I can see -- but where the width of a...more >>

SQLAdapter Timeout doesn't work
Posted by matteo at 1/31/2006 1:34:07 AM
Hi everybody, i've a problem with loading a dataset: i need to load entire contents of various tables into dataset, however i don't know size of this table. If table size is too big simply i need a timeout exception and go on. The problem is that when the table is too big, the Fill method avanz...more >>



Web Service SQL Connection Model
Posted by Chris Arnold at 1/31/2006 12:00:00 AM
Hi All, I am near completion of a project consisting (broadly) of a web app, a web service and a SQL server - the usual sort of configuration. Both the SQL server and the web service are tasked with dealing with large amounts of data per user; and a large number of users. At the moment I...more >>

Dataset creation problem.........
Posted by sendtobiren NO[at]SPAM gmail.com at 1/30/2006 11:04:49 PM
Hi All, I have two access databases. First contains a table which contains userids. The second one contains the users records. I tried to create a dataset which will query in these two databases and get two datatables. I tried to add relation between these two datatables. But while setti...more >>

Unable to insert BLOB in Oracle
Posted by Bala Nagarajan at 1/30/2006 5:23:21 PM
Hello, I am unable to insert BLOB objects into Oracle 9i database from .NET. I get the following exception: "ORA-01460: unimplemented or unreasonable conversion requested". I have a table in the database that accepts a number and blob object. The blob object i am trying to insert is a ...more >>

ADO.NET 2.0, WebMethods and datatable strange behavior
Posted by A.M-SG at 1/30/2006 4:09:38 PM
Hi, I am using VS2005 and .NET 2.0 I have a WebMethod that accept a typed data table. I realized that whatever rows that client sends to the SOAP server through the datatable, the webmethod received an empty datatable!! After spending several hours, I found that the only kin...more >>

DataColumn size
Posted by Kari Lappalainen at 1/30/2006 3:18:41 PM
Hi everybody! Do someone know the easiest way to obtain the datacolumn size in code (I mean the size that you define creating a text field in a table)? In VB6 you could get it by means of Recordset.Field. DefinedSize property. I have been searchin for something similar in ADO.NET but with...more >>

DataSet Question
Posted by ted at 1/30/2006 10:21:02 AM
Hi, I have a dataset that is filled with data from the db. The user has modified that data in one of the tables where some of fields should now be null. I have played around with delete the row and adding a new row but have problems with the update. Do you think I should just reset the r...more >>

Saving contents of datatable to Access table without writing SQL
Posted by eric.goforth NO[at]SPAM gmail.com at 1/30/2006 9:49:43 AM
Hello, In ADO.NET is there anyway to save the contents of an datatable directly to an Access table without having to loop through and generate a SQL insert query string? I figure there's probably a way to do it as one chunk. I'm using VB.NET 1.1. Thanks, Eric ...more >>

AD.NET 2.0: BindingSource and Parent Child relationship
Posted by A.M at 1/30/2006 8:06:09 AM
Hi, I have two BindingSource(s) in my form, one for parent and one for child area. The unique situation in my form is that the child area chooses its parent by a ComboBox. The problem is when I use AndNew method in the child BindingSource, I cannot choose the parent record...more >>

How to write generic code access in ADO.NET
Posted by anonieko NO[at]SPAM hotmail.com at 1/30/2006 4:38:57 AM
M. Chand is a .NET consultant, author and the admin and founder of C# Corner. He has been working with .NET technology since pre beta releases. http://www.dotnetwire.com/frame_redirect.asp?newsid=3171 using System; using System.Data; using System.Data.Common; using System.Data.OleDb; ...more >>

SQLconnection problem
Posted by jay at 1/30/2006 4:24:05 AM
I'm pretty new to asp.net and I'm having trouble just trying to set up a basic SQLconnection within visual studio, I'm sure the problem must be something basic but I can't seem to find it. The problem is that the connection string ("Integrated Security=yes;Initial Catalog=Northwind;Data Source...more >>

Binary serializing of dataset in framework 2.0
Posted by Anders at 1/30/2006 3:58:21 AM
I was eager to try the new binary serialization of dataset in version 2.0 of the framework. The new serialization seems to be very fast comparede to the "binary" serialization in framework 1.1. However I have a few problems consering columns of the type Date: Columns set to the value of Dat...more >>

Updating a third table
Posted by Joyce at 1/29/2006 10:29:45 PM
Hi, I have learned how to successfully add, modify and update both tables in a master/detail form such as Customers and Orders. What I am having trouble with now is how to update the Qty field in a third table, Products, as we add lines to the child form. That is each row should subtract the q...more >>

DataColumn.Exression and string formatting
Posted by A.M-SG at 1/29/2006 7:11:20 PM
Hi, I am truing to add a calculated column to my data table. The column must show something like: "Date: 2005-01-23" I underestand that we can use Convert to convert a DateTime value to string. How can I convert it in specific date format? Thank you, Alan ...more >>

Q: Updating the correct keys
Posted by Geoff at 1/28/2006 10:12:25 PM
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has two fields: a primary key and another holding a string. In table B there are three fields: a primary...more >>

Accessing a field in untyped DS
Posted by Ant at 1/28/2006 8:48:19 PM
Hello, I have an copied data set. I'm trying to access a field. daOrder.Fill(dsOrderSheet); DataSet dsCopy = new DataSet(); dsCopy = dsOrderSheet.Copy(); // How do you do this part? output = dsCopy.Tables["orders"].Rows[0].ItemArray["orderDate"]; //or output = dsCopy.Tables[0...more >>

How do I assign a typed DataTable to its typed DataSet?
Posted by A.M-SG at 1/28/2006 8:23:17 PM
Hi, The following code: TypedDataSet typedDS = new TypedDataSet(); TypedDataSet.TypedDataTable typedDT; // // Code to fill typedDT // typedDS.TypedDataTable = typedDT; // Colmpiler error! gives me a compiler error: Property or indexer cannot be assigned to -- it is read only What i...more >>

Adding a Datatable to a dataset
Posted by Ant at 1/28/2006 6:12:26 PM
Hi, I'm currently getting up to speed with ADO.NET & have a few questions on it. This question relates to why a data table is added to a data set such: DataTable dtEmp = ds.Tables.Add["employees"]; // From book i would have thought it would be more like: DataTable dtEmp = New DataTabl...more >>

Datagrid calculated column not updating
Posted by David Kirkman at 1/28/2006 2:34:15 PM
I have a datagrid (C# Windows Forms App) bound to a dataset. One column in the dataset is a calculated column based on an expression that simply subtracts the value in one column from the value in another column. I created the dataset using a dataset control and the properties dialog boxes. The ...more >>

ODBCDataReader NO_DATA error when reading from CSV file
Posted by simon NO[at]SPAM theyachtmarket.com at 1/28/2006 10:01:56 AM
This is a strange one. In ASP.Net v1.1 using VB, I'm using an ODBCDataReader to read from a CSV file. Most of the time it works, but if the "description" field contains more than 2046 chars, I get a NO_DATA error (see below for full error) when trying to read that row. If this field contains 2...more >>

"EOF" in Data table
Posted by Ant at 1/27/2006 9:53:27 PM
Hi, I'm just coming from classic ADO (& still thinking that way) & I'm wondering how you can determine when you get to the EOF in a data table. This is what I've done below. It works, but I don't think it's the most elegant way of doing it. How is this normally done? Am I thinking the total...more >>

Adding commands at runtime to generated adapters
Posted by Scott Bruno at 1/27/2006 5:01:27 PM
So I’ve got this dataset that was built with the designer. All is well except that the Select command needs to be generated at runtime for app-specific reasons. I thought I would do something clever, which was add a version of Fill() to the dataset class that takes the SQL string as a par...more >>

[.NET 2.0]Problem with DataTable.Load (dt,LoadOptions.Upsert)
Posted by Oriane at 1/27/2006 3:14:06 PM
Hi, I would like to update an Sql Server database with Excel data. For this, I use2 identical typed datatables: dtSql, and dtXls. Here's my code simplified: TypedDataTable dtXls = new TypedDataTable; TypedDataTable dtSql = new TypedDataTable; dataAdapterXls.Fill (dtXls); dataAdapterSql.F...more >>

Where to use connection, dataset, datareader ?
Posted by Doru Roman at 1/27/2006 2:01:45 PM
Hi, I have some difficulties in understanding how to use the connection, dataset, datareader in a form. Let's suppose I want to create a datareader and when I push a button to bring another row from the dataset. Supposedly I create under MyForm_Load event the connection, then a command an...more >>

EndCurrentEdit does not push changes into the dataset
Posted by susan at 1/27/2006 9:28:12 AM
I have a Windows Form written in C# with a non-edit DataGrid showing a list of records. When the user selects a row in the grid, the full details of the record display in a panel which contains textboxes and comboboxes. The underlying datatable that the detail panel is bound to only ever has one...more >>

Middle tier Data access object in .net assembly or COM?
Posted by david at 1/27/2006 7:29:04 AM
Hi, I am new in VS.net. We try to migrate our VB6 application to .net. In our VB6 application, we have a middle tier data access object to handle the connection and stored procedures' calls. Do we still do middle tier DO in COM? or in just Assembly? why? Thanks in advance, DW ...more >>

Manipulating data on input w/ TableAdapter & Dataset.
Posted by Mike Edgewood at 1/27/2006 6:21:13 AM
I know this is easier to do with a datareader and a listview, but can it be done with a tableadapter and a dataset? I want to manipulate the data prior to it reaching the dataset, For instance, data is stored as Firstname and Lastname and sometimes there will be no firstname, so appending a ...more >>

TransactionManagerCommunicationException using TransactionScope
Posted by Christopher Kimbell at 1/27/2006 4:11:02 AM
I'm writing a Windows service that uses the new TableAdapter in .NET 2.0. I have several adapters that must be updated as an atomic operation, so I have wrapped them using the TransactionScope. When I run my code I get a TransactionManagerCommunicationException with the following message "...more >>

SQL Table to DataSet to Dataview, to DataSet to XML!
Posted by matteo at 1/27/2006 2:20:37 AM
Hi everybody, i've a question for this group: i've developed a windows service that every x minutes count records present in a sql table and if those records are bigger than a fixed threshold start with clean operations. Workflow is this: 1) Load records in a DataSet: DataSet ds = ne...more >>

DataSet to Dataview to Dataset to XML!
Posted by matteoalessio NO[at]SPAM libero.it at 1/27/2006 2:12:27 AM
Hi everybody, i've a question for this group: i've developed a windows service that every x minutes count records present in a sql table and if those records are bigger than a fixed threshold start with clean operations. Workflow is this: 1) Load records in a DataSet: DataSet ds = new Da...more >>

DataAdapter error
Posted by Ant at 1/27/2006 12:55:01 AM
Hi, I've created a relational group of tables using the designer for the Data Adapter. It decided to cross join all the tables, so I manually did it using Inner joins, nothing special just PK to FK. When I click preview data, then try to fill a dataset created by the Generate Dataset bu...more >>

Fitting TableAdapter into Remoting Infrastructure
Posted by CMM at 1/27/2006 12:00:00 AM
Short question: how to fit TableAdapters into (true) n-tier development. More Info: In VS2003 in terms of *physical* n-tier development, I had a fairly nice pattern going. My DAL exists on a separate server and accessed via remoting. In order for the client machine to "know" about the classe...more >>

General network error
Posted by Valerie Hough at 1/26/2006 9:24:21 PM
Hi I am supporting a client that gets 5-10 of the following errors each day: General network error. Check your network documentation. ----------------------------- Stack trace: at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data...more >>

Table name in Dataset
Posted by Ant at 1/26/2006 6:57:02 PM
Hi, When I create a typed dataset containing multiple relational tables using Generate dataset, it creates a single set of records based on what was chosen when setting up the data adapter. If I have an orders table, an orderItems table, a customer table etc. set up in the DataAdapter, the ...more >>

GetChanges question
Posted by WineNCheese at 1/26/2006 1:51:35 PM
Can someone please tell me how the following is possible? When I do this: System.Data.DataSet addedAndModified = myDataset.GetChanges( DataRowState.Added | DataRowState.Modified ); some of the rows in the resulting dataset have a RowState of DataRowState.Deleted. ...more >>

DBAccess in WinForms
Posted by Vedanshu Mandvikar at 1/26/2006 1:30:05 PM
Hi EveryOne, What is the best approach for data access while developing applications using Windows Forms ? Is it opening, working with and closing a new SQLconnection and SQLcommand object everytime a DB access is needed , or maintaining a single open connection/command object at the applic...more >>

Error saving typed dataset (.NET 2.0) - Object not set to referenc
Posted by tgb at 1/26/2006 10:44:01 AM
I have an ASP.NET project with a typed dataset (with table adapters). The table adapters' connection string property was set to get the connection strings out of the web.config file. I was able to add new table adapters, and all worked well for a while. Now I need to add another table ada...more >>

SqlTransaction problems
Posted by Michael at 1/26/2006 10:27:04 AM
Hi Everyone, I'm currently working on a form that requires 3 stored procs to run (one of them several times), but these stored procs are in different functions (see below). The problem is that after the commit, the database doesn't reflect any of the changes. I open a new connection before ca...more >>

cannot connect to an oracle
Posted by Julia at 1/26/2006 8:42:06 AM
Hi I have problems when I try to connect to my Oracle db from VS 2003. I get this error: ORA-12154: TNS:could not resolve the connect identifier specified My tnsnames.ora-file I have this text: MALL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Z9100774.ne.ad.ner.capgemini.com...more >>

DataReader Limits data returned!
Posted by TY at 1/26/2006 7:55:46 AM
I have a stored procedure that returns xml data (using For XML), it returns about 9000 records. I use a datareader to write the data to a XML file. For some reason, the datareader doesn't write all data, it seems like the data returned has some size limit. here is my code, my code is based o...more >>

click event handler executed twice
Posted by dsvick NO[at]SPAM gmail.com at 1/26/2006 5:15:10 AM
Hi everyone: I got simple aspx with a user control in it that posts some entered data to a database. The problem I'm seeing is that when the submit button is clicked the code is executed twice and I get duplicate rows in the database. The including aspx page is this: <%@ Page language="c...more >>

question on sql
Posted by ken at 1/26/2006 1:29:02 AM
Dear all 1.)How can i save the stored procedure in sql 2005 server, into server and NOT in file location 2.)How can create folder in stored procedure to separate categories? 3.)How can view the created date and modify date of stored pro ...more >>

TransactionScope and DataSets
Posted by Kirk Jackson at 1/25/2006 6:19:02 PM
Hi, I'm wondering what the official Microsoft recommendation is for handling TransactionScope transactions when using TableAdapters within a DataSet. I have a dataset that various areas of my business logic uses, and at a higher level I'd like to wrap several business functions in a Tran...more >>


DevelopmentNow Blog