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 > april 2007

Filter by week: 1 2 3 4 5

Data rows not commiting to database.
Posted by skl at 4/30/2007 9:24:01 AM
I am currently using VS.NET 2005 to read in a text file into a sql server database table. The code cycles through the file and using a .add with a dataset seems to add all the rows just fine. When the program finishes and I go do a query on the table it is empty. I am new to using VS so I ...more >>

Typed datasets with multiple datatables?
Posted by Dave at 4/30/2007 8:12:03 AM
Using the typed dataset designer, I dragged an existing stored procedure onto it which has several select statements in it For simplicity, something like: select * from table1 select * from table2 select * from table3 It seems the designer generates on datatable based on the first selec...more >>

Can I create tables in an existing database or manage a dynamic dataset?
Posted by gobis at 4/29/2007 10:53:49 PM
Hello all, I am working on a csharp database application that should give its end users the ability to create new tables related to existing ones or even create the database structure completely on their own. I know how to do that by creating a DataSet object and adding tables and relations...more >>

Error dataset deletion
Posted by Flomo Togba Kwele at 4/28/2007 11:30:47 PM
I got the following error: Concurrency violation: the DeleteCommand affected 0 of the expected 1 records. I have two tables in a strongly typed dataset, parent and child. I have defined the delete rule of the relationship to cascade in both the dataset and in the database. I can delete a ...more >>

Refresh Binding Navigator Upon Row Delete
Posted by Alex at 4/28/2007 2:31:59 PM
I'm having a problem with the binding navigator on a form in that it won't reflect the results of a deleted record. The binding source is a single table bound to a sql db as its data source. When I call the code to delete a record (always a single record), the code executes properly and the re...more >>

Persistent settings
Posted by John at 4/28/2007 2:13:24 PM
Hi I need to store the path to db in my app. I have used app setting for this. Unfortunately various clients have different db paths and I have set them up once on each client location. The problem is that when I send them updates and they uninstall the old version and reinstall the new versio...more >>

ConnectionString parameter and Dataclass library
Posted by Frederic_D at 4/28/2007 12:00:01 PM
Hello i created my data access layer in a class library (a dll), i referenced this dll in my project. When i deploy my solution i can access to the app.exe.config file, but i don't find the config file of my dataclass.dll. so i can't change connectionsstrings of my application. how can i do. ...more >>

polling a database
Posted by Pascal at 4/28/2007 9:45:38 AM
Hi everybody, a suggestion, please. I have an application A that modifies the records of an access database. I should write an application B (running on the same machine) that monitor these changes, without modifying application A. I think the only solution is polling the database and check eve...more >>



ADOX in VISTA not available??
Posted by ChaoTix at 4/27/2007 12:00:00 AM
Hi All, I am using VB.NET 2005 on Microsoft Vista.=20 I have opened a project in VB.NET and when i try to run it, it will = cause a error on the adox. Here is my Source: =20 Public Function CreateAccessDatabase(ByVal DatabaseFullPath As String) = As Boolean Dim bAns As Boole...more >>

DataTableDataView, how do I use dataview to show only 3 fields on the grid
Posted by aboutjav.com NO[at]SPAM gmail.com at 4/26/2007 4:54:03 PM
Hi, I am getting a datatable which I assigned the dataview as MyDataView = datatable.view; the datatable has about 7 - 10 fields. I only want to display 2 fields on my wingrid, like name and description. How do I user dataview to filter out the rest of the columns? Thanks, AJ ...more >>

SQLCommand ParameterDirection.ReturnValue not what it was
Posted by Tom Garth at 4/26/2007 4:46:04 PM
With classic ADO you could attach a ReturnValue parameter to a command containing inline parameters. Ex: Cmd.CommandString = "PubsInsert('G. B. Shaw', 'I lost my Rifle')" Dim pRET As New ADODB.Parameter pRET.Type = adInteger pRET.Direction = adParamReturnValue Cmd.Paramet...more >>

stored procedure with varchar(max) output parameter
Posted by Andrew Robinson at 4/26/2007 10:53:19 AM
I have a stored proceedure that has a varchar(max) output parameter. How do I specify my size value in the parameters collection? or is this something that cannot be done? Thanks, ...more >>

Multi select stored proc and strongly typed data sets
Posted by Amir Tohidi at 4/26/2007 9:40:00 AM
Hi I have a stored proc that has two select statements in it i.e. it returns 2 result sets. When I try to use the Visual Studio DataSet designer and point it to this stored proc, it only sees the first select of the sp and therefore only generates the one DataTable etc. Is there a wa...more >>

Unable to Connect To Sql Server 2000 using .NET 2005 EXPRESS
Posted by Terrance at 4/26/2007 8:14:04 AM
Can anyone help me with an issue. I have a .net app that tries to connect to my sql server here on my laptop on my company's network. When I have someone on the network try the app they get the following message in the errorlog: *Timeout expired. The timeout period elapsed prior to completion ...more >>

Accessing Linked Servers via ADO.NET
Posted by michael at 4/25/2007 1:24:00 PM
I have a SQL Server 2005 instance. On it are a bunch of databases and a linked server. ADO.NET easily accesses all the named databases on this server. However, I would like to access data through a linked server on the same instance of SQL Server. However, the GUI of the DataAdapters won't all...more >>

Extra Row Added to Table
Posted by Ken at 4/25/2007 10:34:02 AM
Whenever I run this code, I get a row added to my table in the primary field whose text is "System.Object". This code is intended to simply add a single row to a single table. Anybody see why this is happening and what I need to do to stop the extra row? Private Sub btnDeleteOrder_Cli...more >>

Decimal SqlParameter strange behaviour
Posted by mikicaradojcic NO[at]SPAM gmail.com at 4/25/2007 5:56:27 AM
I've created SqlParameter with precision = 15, Scale =2 and name = @param1. I added it to command which text is: Begin SELECT * FROM TABLE WHERE VALUE < @param1 END if I put param .Value = for example 99.99d it works. If I put param .Value as 99.00d it breaks with out of range value. ...more >>

Failed to enable constraints.
Posted by Bryce at 4/24/2007 9:13:54 AM
I have googled and see this is a common issue, but for some reason I can't figure this out. I have a typed dataset, and have created a Query called "GetDataById(@id)" I call it like this: VerificationForm.VerificationFormDataTable table = VerificationTableAdapter.GetDataById(id); (wh...more >>

Provider independent data access: problem with Excel ODBC source
Posted by Jim Walsh at 4/24/2007 8:48:02 AM
VS2005 I have an application that is used by a variety of users. The application analyzes some data and writes the results into a database. Different users use different databases, and sometimes the same user will use a different database at different times. So, I want the user to be ab...more >>

Timeout or other timing-type problem???
Posted by fuzz_ball at 4/23/2007 6:57:06 PM
So I'm experiencing an odd problem. I establish a connection and enlist in transaction and then save my dataset changes to the database. My dataset contains 20+ tables that get updated, and I have my code setup to handle inserts/modifies/deletes in the correct order. I'm experiencing a really...more >>

DbDataAdapter.Fill() - just the first row
Posted by David Thielen at 4/23/2007 4:42:03 PM
Hi; Is there a database independent way to fill just the 1st row of a DataTable? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com Cubicle Wars - http://www.windwardreports.com/film.htm ...more >>

IDbConnection + select -> DataTable
Posted by David Thielen at 4/23/2007 4:28:09 PM
Hi; This should be possible but I can't figure out how to do it other than reading each row and stuffing it into a table. I have an IDbConnection and the select - no other info. I need a DataTable of the data that will be returned from the select. How can I do this? -- thanks - dave ...more >>

ORA-00904 while using update
Posted by sjoshi at 4/23/2007 2:32:18 PM
I'm trying to use this simple code to update an Oracle table and it fails with this message: Oracle.DataAccess.Client.OracleException : ORA-00904: "MINDEX": invalid identifier The Select command works fine. OracleConnection con = new OracleConnection("Data Source=SP3DSMP2;User Id=sys;Pass...more >>

Integrated Security
Posted by Arne at 4/23/2007 1:46:02 PM
integrated Security= true or Integrated Security=SSPI Does the above mean the same thing in a connection string?...more >>

Asynchronous calls to sql server 2000
Posted by dkil1972 at 4/23/2007 12:43:40 PM
In upgrading an application to .Net 2.0 from 1.1 I had an opportunity to implement some asynchronous calls to the database. In the application there is a quick search facility that makes 6 calls to 3 different database. This I thought was the perfect scenario for Asynchronous calls. Anyway i ...more >>

Can you precompile a desktop app?
Posted by the_grove_man NO[at]SPAM yahoo.com at 4/23/2007 10:18:42 AM
I read an article that you can procompile ASP.NET to speed up initial response time for users since pages do not have to be compiled the first time they are requested. http://msdn2.microsoft.com/en-us/library/ms227972.aspx Is it possible to do this with desktop applications? Thanks for an...more >>

SQL Server connection Pool error in Debug
Posted by Jerry J at 4/23/2007 6:24:01 AM
In my ASP.net application I am getting the following error... "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occured because all pooled connections were in use and max pool site was reached". This only happens when I am in debug...more >>

how to count hierarchical data from database?
Posted by vchaturvedi23 NO[at]SPAM gmail.com at 4/23/2007 3:37:18 AM
hellow frnds, i hv a form of vb.net with SQL2000 connection, how can i count the hierarchical data from database. eg. every customer hv a id and each customer hv two downline id left downline and right downline(either one of them will hv value or both hv value) ...more >>

Nested TransactionScope
Posted by David Morris at 4/22/2007 9:34:03 AM
Hello, I am trying to set up some nested transactions to speed up a group of unit tests. The unit tests call a common method to build up some test data, which takes about 30 seconds and then runs a specific test. Each C# unit tests has a using statement that creates a new new TransactionS...more >>

Referential update error with DataSet
Posted by Flomo Togba Kwele at 4/21/2007 9:05:52 PM
I get an error when executing the Update method on a dataset. The dataset is a strongly typed one, with two tables in a parent/child relationship. The parent has an identity column for its PK, while the child's PK is a composite one. Its first column is the identity column of the parent and the...more >>

binding source position when sorted
Posted by Rick at 4/21/2007 7:43:11 AM
VS 2005 I want to make sure I have this concept down correctly. I have a strongly typed datatable and a binding source connected to it. On my windows form a grid is connected to the binding source. When the grid is unsorted the datatable(bindingsource.positon).mycol = DirectCast(bindin...more >>

Amazming....but curious...
Posted by TJ at 4/21/2007 6:06:00 AM
Hi, Enviornment : Visual Studio .NET 2005 and SQL Server 2005 I created one stored procedure, let's say GetData()...Basically, what it does is that it just returns data from table. (Select [A],[B] from [Test] where id=@id..something like this...) I created a strongly typed data set with...more >>

Vista MDAC not installed HELP
Posted by paolol at 4/21/2007 12:00:00 AM
Hi, I have an error when I try to install a program that say "MDAC not present", I went to the MS page and downloaded the MDAC_TYP but when I run it nothing happen, I have Vista business with all patch, please help :( Thanks Paolo ...more >>

need column names from a select - may be no rows
Posted by David Thielen at 4/20/2007 8:30:00 PM
Hi; I have a case where I have a select and I need to get the column names the select will return. If the select will return a row I can just run the select. But it is possible for there to be no rows and I still need the column names. In this case Execute will return a DbDataReader with 0 ...more >>

Parameter object with return value
Posted by Norbert_Pürringer at 4/20/2007 6:15:24 PM
Hello there! Is it possible to define a stored procedure command by adding the return value parameter without specifying the data type? I don't really know, what the data type of the return value is, so I prefer to get the value as object. Is there a chance to do it? Regards, Norbert ...more >>

Where is the lock: on a row or a table?
Posted by Lubomir at 4/20/2007 9:24:01 AM
Hi, I would like to ask, how SQ Server Express manage the table access: I have two processes. What happen if one process is writing data into table,and another process is updating data from this table at the same time. Will be the second process allowed to access this table for reading ? ...more >>

debug breakpoint in generated tableadapter?
Posted by henk gijsbert at 4/20/2007 4:53:17 AM
Hi, I don't succeed into debugging into generated tableadapter code. Neither by stepping in (F11) nor by putting a breakpoint. Is this not possible or is there something special I must do in order to debug into tableadapter code. It is not that I want to change the generated code, I want to ...more >>

Manipulating data in .NET
Posted by beschler at 4/19/2007 12:40:00 PM
I have an ODBC data source that has EXTREMELY limited SQL functionality that I want to expose via a web service. For example, I need to SELECT DISTINCT and teh ODBC client does not support the DISTINCT keyword. So, in the web service I am forced to retrieve ALL records that match the WHERE...more >>

Serialize a DataSet to a string?
Posted by Chris Davoli at 4/19/2007 8:28:05 AM
I have a dataset (with one table in it) that I want to serialize into string data to store out on a SQL server DB. Here are my questions: 1.) Does anybody have some code that can do this? I saw there was a serialize method that uses a streamwriter, but I need a code example. ie; something l...more >>

insert data into Access database (could it be AutoNumber?)
Posted by Scott Starker at 4/19/2007 7:56:00 AM
This is a question from a Newbie. Although it executes correctly there is no new record added to the table (which isn't what I want :). Could it be that the table has an "AutoNumber" field (RecordID)? I have tried (among other things): SQLString = "SELECT * FROM TypeNames" DBAdapter2 = New O...more >>

How to pass field name itself as a parameter?
Posted by Andrew at 4/19/2007 7:20:02 AM
Hello, friends, In our c#.net app (2.0), I have an UPDATE statement like the follows for Oracle DB: UPDATE contract SET phone = :phone, fax = :fax, status = :status, ....(more fields here) WHERE contractNum = :contractNum I know I need to pass values for each parameters before execution...more >>

How does ADO.NET 2.0 DataAdapter do batch updates?
Posted by ronscottlangham NO[at]SPAM yahoo.com at 4/19/2007 6:33:03 AM
New feature in ADO.NET 2.0 is the ability to do batch updates using the DataAdapter UpdateBatchSize property. From what I understand, enhancements were added to the SQL Server and Oracle Data Providers to support this. We have the need to support this directly without going through the DataAda...more >>

SQL express and .NEt 1.1 ???
Posted by calderara at 4/19/2007 1:42:02 AM
Dear all, I have a simple question based on accessing to SQL express 2005 throught a ..net 1.1 librrary- Does this SQLClient class is capable of accessing SQl 2005 express ? Or do we need to use 2.0 thnaks for info regards serge...more >>

Quick seelct query record count
Posted by John at 4/19/2007 1:06:58 AM
Hi I need to check if a record exists (or not) in a table for a particular id. Is there a quick way to do this (like ms access dlookup function or similar)? Thanks Regards ...more >>

How can I Do bulk update
Posted by Umeshnath at 4/18/2007 10:32:01 PM
How can I Do bulk update. For example I have editable grid ,user is edting the grid and storing into dataset. I have to update all the changes into DB. I need to update only the changed records or fileds....more >>

OT: Anyone know where I can get a Postal Job?
Posted by Eric Thompson Jr at 4/18/2007 5:59:18 PM
There is so much talk about being a Postal Employee here in the Vista group, I was wondering if anyone had information on how one can become a Postal Employee. That would make my Momma proud. ...more >>

Using ADO.Net to Create and Alter an Excel File...
Posted by JJDoherty at 4/18/2007 12:46:31 PM
Hi All, I've posted this before but unfortunately I have found a solution yet so I am hoping that someone can help. What I wish to do is take an excel file from an end user, copy and rename it as "backup of...". Then I want to take the original file, delete it and create a new blank copy of...more >>

DataView to XML
Posted by Stuart Shay at 4/17/2007 9:12:31 PM
Hello All: I want to Filter a DataView then output to XML, the problem is when I = place a Row Filter on the DataView the changes are not applied on the = XML output. Thanks=20 Stuart=20 DataView oDataView =3D new DataView(oDataSet.Tables[0]); oDataView.RowFilter =3D string.Format("Em...more >>

SqlConnection exists in both System.Data.dll and System.Data.SqlClient.dll
Posted by YodaJ007 NO[at]SPAM gmail.com at 4/17/2007 6:15:36 PM
Can anyone point me in the right direction here? I'm attempting to compile a Windows project that consists of a single form at this time. It's a newly generated windows project with a few controls. Here is the compile error: The type 'System.Data.SqlClient.SqlConnection' exists in both 'c: ...more >>

Auto-update DataGridView
Posted by Peter A at 4/17/2007 10:01:24 AM
I have a DataGridView that is bound to a BindingSource whose data source is a table in a DataSet. The dataset is filled from an OleDBDataAdapter which is connected to an Access database. When a new row is added to the database, I want the DataGridView to automatically update to show it. Is ...more >>


DevelopmentNow Blog