Home All Groups Group Topic Archive Search About

ADO.NET

microsoft.public.dotnet.framework.adonet
Score Using a DataTable instead of a DataReader
jonefer - 23 Sep 2006 9:01 PM - 8 messages
I've gotten quite comfortable using a DataReader to grab a single value from a table as in the following: Public Shared Function IsUserAdmin(ByVal strNUID As String) As Long         Dim dr As SqlDataReader ...
Score Backing up master
Zach - 23 Sep 2006 11:29 AM - 4 messages
Re SQL Server 2005 Express Edition When I attempt to back-up the master file, I get told it is being used by another application. So the file cannot be copied for back-up. This is even the case after a complete shut-down of the PC. What is the solution to this? ...
Score Edit and update multiple rows at a single click
Rakesh Parekh - 23 Sep 2006 3:56 AM - 3 messages
Dear How can I select multiple checkboxes and update it to database at a single click on update button.The GridView allows to edit only one row at a time so for each row I have to select edit and than select checkbox and then click on update. ...
Score DataColumn.DataSetDateTime Property - What is it good for?
thomas - 23 Sep 2006 3:40 AM - 7 messages
Hello everybody, When I saw this new DataColumn.DataSetDateTime property for the first time I thought myself: wow, what a good idea! Perhaps ADO.Net seamlessly converts UTC to local and vice versa, so I will be able to store dates as UTC but ...
Score How to use DataSet for MS-SQL and Oracle
Scott - 23 Sep 2006 1:58 AM - 5 messages
All, Is it possible to use the same (strongly typed) DataSet object with an Oracle table adapter (or data adapter) and a MS-SQL table adapter? It would be nice to use the same dataset object so the calling code can use ...
Score How t
ad - 22 Sep 2006 9:47 PM - 1 message
I have a talbe, there is a smallDateTime field in it. I want to update this filed with a today's date. I want to make s sql like "Update myTable set dateField = {0}" I can I replace the {0} in the sql? ...
Score How t
ad - 22 Sep 2006 9:47 PM - 1 message
I have a talbe, there is a smallDateTime field in it. I want to update this filed with a today's date. I want to make s sql like "Update myTable set dateField = {0}" I can I replace the {0} in the sql? ...
Score How t
ad - 22 Sep 2006 9:47 PM - 2 messages
I have a talbe, there is a smallDateTime field in it. I want to update this filed with a today's date. I want to make s sql like "Update myTable set dateField = {0}" I can I replace the {0} in the sql? ...
Score Using Informix Client SDK I get this error ( The parameter data type of DBNull is invalid )
Objectguy - 22 Sep 2006 8:01 PM - 2 messages
We have the following environment ..Net Framework 2.0 - Informix Client SDK 2.90 TC6 - Informix 9.40 FC8 The following error started appearing after we upgraded to TC6. It never happened in TC4/TC5. System.ArgumentException: The parameter data type of DBNull is ...
Score Getting reusable API to "discover" the DB connection it needs at runtime
jdonnici - 22 Sep 2006 5:11 PM - 1 message
We're working on an application that has a 'common' project that hosts a variety of 'general desktop app' APIs - user preferences, the non-UI code the app's services uses, etc. As part of that logic, it makes use of another ...
Score BeginEdit is ignored
SHB-MSDN - 22 Sep 2006 3:38 PM - 4 messages
Hi, Im pretty new to ADO.net and I ran into the following problem: I try to add a row to a DataSet that has NotNull-Constraints on its columns. When doing: DataRow row = ds.Tables["docdescriptors"].NewRow(); DocTypeDB dt = new DocTypeDB(row); ...
Score Access / DAO - What's the Future
TrevorS - 22 Sep 2006 3:08 PM - 5 messages
We are using Access as the "repository" for a C++ MFC application. It's single user. The schema is complex (100 tables) and can be a few hundred MBytes in size. We are starting to reach the limits: occassionl "Query too Complex" and ...
Score String[9]: the Size property has an invalid size of 0???
AlBruAn - 22 Sep 2006 6:28 AM - 4 messages
I'm attempting to insert data to a table via an ExecuteNonQuery call on a SqlCommand sproc object, but I keep getting the error displayed in the subject line and can't, for the life of me, figure out what the ...
Score MS Access and Typed Dataset problem
TigerMan - 22 Sep 2006 4:33 AM - 8 messages
Hi, I am attempting to use a typed dataset with an Access database. I have the data showing in a grid and that works prefectly but when I try to update, it does nothing. I tracked the problem down to the fact that the DataAdapter ...
Score Most efficient way to process this set of records???
Hexman - 22 Sep 2006 2:24 AM - 7 messages
Hello All, I'd like to know the most efficient way to process a set of records.  I've built a composite record that is to contain columns from 6 other "Master" tables.  I need to update the composite record with the values of those columns and perform some calculations along the way.  I coded a vb.net (2005) ...
Score Iterating an ADODB RecordSet using System.Reflection
Jules - 22 Sep 2006 1:26 AM - 4 messages
Everyone, I have to be able to retrieve data from ADODB RecordSet, but without referencing the ADODB interop. I do get a RecordSet object, but when I try to use a DataAdapter to populate a Dataset:     myDataAdapter.Fill(myDataSet, myRecordSetObject, "MyTableName"); ...
Score Whats going on with the DAAB and UpdateDataSet?
Karch - 22 Sep 2006 1:10 AM - 6 messages
OK, I've been staring and debugging for hours. Surely, someone else has run into this problem. I have a typed dataset that contains 3 tables with relationships between them. I need to insert the records for the first table ...
Score ADO.NET 2.0 Love it or die from it!!!
Niyazi - 22 Sep 2006 12:53 AM - 10 messages
Hi. When I move to VS.NET 2003 I find very challenging than since march 2005 I had big problem doing a report with IBM AS400 and luckily I finished. I get 5 days of to study new ADO.NET 2.0 with VS.NET 2005 Professional edition. It ...
Score ArrayList and FilterRow
TigerMan - 21 Sep 2006 9:03 PM - 6 messages
Hi, I have an interesting problem. With the code below, the loop takes ages to run: For intA = 0 To aryJobs.Count - 1 Dim strJobx As String = aryJobs(intA).ToString strJobx = "JobNumb = '" & strJobx & "'" adsWork.Tables(0).DefaultView.RowFilter = strJobx ...
Score Access DB Update Problem-
Erencans - 21 Sep 2006 8:36 PM - 3 messages
string updateSQL;             updateSQL = "UPDATE TestDetails SET AnsweredWordID =             OleDbCommand command = new OleDbCommand();             command.CommandText = updateSQL; ...
Score Questions about generated stored procedures by VS 2005 (TableAdapter).
Steven Spits - 21 Sep 2006 6:51 PM - 5 messages
Hi, When I let a TableAdapter generate stored procedure for "SELECT * FROM Supplier WHERE SupplierID = @SupplierID", it generates (some parts removed): Select: SET NOCOUNT ON; SELECT * FROM Supplier WHERE SupplierID = @SupplierID Update: SET NOCOUNT OFF; UPDATE [Supplier] SET <...> WHERE <...>; ...
Score Creating a database
Adrian - 21 Sep 2006 4:12 PM - 12 messages
I am new to stored procedures. Is the code below a stored procedure? It doesn't have "CREATE PROCEDURE" in the code. How should I incorporate the code below in a C#.NET application? Thank you, Adrian. USE master GO ...
Score Problem with NewRow in .NET 2.0
Bill - 21 Sep 2006 3:22 PM - 2 messages
I am trying to add new rows to a DataTable in .NET 2.0 using the code below. The problem I have is that all new rows have all of the column values set to System.DBNull.Value instead of the values I assign. ...
Score GetSchema( "Columns" ) results in ???
Scott S. - 21 Sep 2006 2:51 PM - 7 messages
I am moving a project over from VS2003 to VS2005.  It is an adhoc data mining tool that lets you explore tabular data from just about any source. In it I use SqlConnection, OracleConnection, OledbConnection, and OdbcConnection as needed.  For each type I had special code to get the tables ...
Score Stored Procedures Query
Adrian - 21 Sep 2006 1:41 PM - 8 messages
Is it possible to use stored procedures with SQL Server 2005 express edition? 1. In "Object Explorer" under "Databases" there is no pocket called "Stored Procedures". Is such a pocket available anywhere else? 2. Alternatively via C# Visual Studio (Standard Edition), if under "Project" ...
Score Stored procedures
Adrian - 21 Sep 2006 1:39 PM - 5 messages
Is it possible to use stored procedures with SQL Server 2005 express edition? 1. In "Object Explorer" under "Databases" there is no pocket called "Stored Procedures". Is such a pocket available anywhere else? 2. Alternatively via C# Visual Studio (Standard Edition), if under "Project" ...
Score DateTime Conversion
evint - 21 Sep 2006 1:37 PM - 2 messages
Folks,    I have created a DataTable containing a column, FilterOn, using the DateTime type:            col = tbl.Columns.Add("FilterOn", GetType(DateTime))    While attempting to store a value of #12:00:00 AM# I observed that ...
Score DataReader and DB connection closing?
rockdale.green - 21 Sep 2006 1:24 PM - 3 messages
I am using Microsoft.Practices.Enterprise.Library When I use IDataReader I saw this line "It is the responsibility of the caller to close the connection and reader when finished." I was wondering if I close the DataReader do I automatic ally close the ...
Score I get a Exception when I try to delete a dataRowView in Compact Framework
garbage - 21 Sep 2006 12:23 PM - 2 messages
Hello people, I'm developing a mobile app with Compact Framework. I have a grid, and it's dataSource is a dataView (named dvi). When I try to delete a row from this dataView, it throws an exception: "An unhandled exception of type 'System.ArgumentOutOfRangeException' ...
Score Transactions and MS-Access
herbert - 20 Sep 2006 10:31 PM - 3 messages
I generated a TableAdapter using VS.2005 wizard and MS-Access. How do I add support for Transactions? TransactionScope on MS-Access is not supported by OleDb provider. thanks herbert ...
Score oraOps10.dll -- cannot load
mjc9885 - 20 Sep 2006 9:57 PM - 2 messages
with this issue.  For most, it came down to a permissions problem; however, my error still persists.  I have gone so far as to give the ASPNET machine account full permissions to the C:\ drive and all subfolder & files, yet I still get the "Unable to load DLL ...
Score Tough Transaction Problem with Stored Procs and ADO.
LineVoltageHalogen - 20 Sep 2006 8:44 PM - 3 messages
Greetings All, I was hoping that someone might be able to shed some light on a problem I am having.  In short I have an application written in C# calling a stored proc.  Without going into the reasons why (it is ...
Score Simple unit test for TransactionScope not working!
hellosticky - 20 Sep 2006 5:36 PM - 6 messages
I am very confused why this test is not working. I create a fake table, then insert a row without completing the scope, and just in case, throwing an exception, but when the test finishes, there is still a row ...
Score Is a second class factory the only way to get an IDbDataAdapter reference?
bulwark_jrm - 20 Sep 2006 5:10 PM - 2 messages
Hi, I try to make my code as technology independent as possible via interfaces. For example, for my data access, the only code specifically referring to the System.Data.SqlClient namespace is a classfactory which returns an IDbConnection reference.  From there, I can do a CreateCommand() to ...
Score reading text files
Bill H - 20 Sep 2006 4:35 PM - 2 messages
I've read text files before using the ODBC text driver, but the extensions on the files have always been csv or txt.  Now I am trying it on a file with a .log extension and I'm getting a read-only error.  If I rename the ...
Score GetErrors is not returning all rows in error
Oldman - 20 Sep 2006 2:03 PM - 4 messages
I am using .NET 2.0 and writing code using C#. I have a datatable that is being filled with data and it has a primary key, which is a single column ID.  There are cases where there can be duplicate ...
Score BindingSource.CurrentItemChanged event
Ceefour - 20 Sep 2006 11:42 AM - 1 message
Hi! I want to ask a question regarding BindingSource. I can't get CurrentItemChanged event to work. It's only called if the current row position is changed or if EndEdit() is manually called. I want it to be fired whenever a control lost focus / Validate-d or ...
Score 2 SQL Queries in 1 OLEDBCommand Object
Mohammad-Reza - 20 Sep 2006 11:01 AM - 4 messages
Hi. Is it possible to embed two sql queries ( or statements, whatever ) in just one OLEDBCommand object, and execute them at the same time? Dim t_cmd as new OLEDBCommand t_cmd.CommandText="SELECT * FROM Sales;DROP TABLE Sales;" .. .. .. t_adapter.Execute (t_cmd) ...
Score DataSet.WriteXml
Rastko Soskic - 20 Sep 2006 9:26 AM - 2 messages
Hello everyone. I have table where some fields contain some html; Now, I want to retrieve content as xml and transform it using xslt; The quickest way is to retrieve using dataset, write xml and  transform it, right? However, WriteXml for example, <br/> tag writes as &lt;br/&gt; ...
Score Datatable row deleting
Jacksm - 20 Sep 2006 2:49 AM - 3 messages
When I delete a row using datatable.row.delete() it deletes the row from the datatable instead of just marking it in the datatable so when I go to to an adapter.update(datatable) i am getting primary key violations.  Any help would be appreciated above is my code for ...
Score System.Transactions Q
KA Kueh - 20 Sep 2006 1:52 AM - 6 messages
Dear all, Does anyone know if the new System.Transactions in .Net 2.0 works with ODBC and OLEDB data providers?.  Thanks. Regards, Kueh. ...
Score Unable to cast object of type 'System.DBNull' to type 'System.String' in table adapter
Fred Dag - 20 Sep 2006 1:38 AM - 2 messages
Hi, I have a table adapter created using the DataSet gui in VS2005. The code it generates returns this error: System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. Line 3224:            get { ...
Score dataview sort problem
Jim - 19 Sep 2006 7:45 PM - 6 messages
I have a dataview that I'm trying to apply a sort to, but when I iterate through the rows in the dataview, they are still in the original order.  Here's my code.  I'm using an XML document to populate ...
Score Using BeginExecuteReader not from a windows form
Valerie Hough - 19 Sep 2006 5:32 PM - 1 message
I want to create a utility class which is defined as follows: public Class MyDataReadingClass { .... } In that class I want to encapsulate all the logic for performing certain SQL Server queries and have the result set accessible from my parent, which will ...
Score NullReferenceException when updating an Item
Pete Smith - 19 Sep 2006 4:52 PM - 1 message
Hi, I'm fighting the error "Object reference not set to an instance of an object." when I try to update an item in a dataset (see below). Does anybody have an idea what I can do to solve this issue? ...
Score Debugging SQL Server 2000 from VS 2005
Brent - 19 Sep 2006 3:35 PM - 3 messages
I asked this question in SqlServer.programming and it was never answered. I am hoping someone here can help me out. Hi i have a pretty basic question. We just enabled debugging on some of our development SQL Servers. Most of our servers have over 5000 stored ...
Score getting CLOB in provider independent fashion.
an inquirer - 19 Sep 2006 3:32 PM - 1 message
Hi, I'm trying to do something like that:                         DbParameter paramOut = new OracleParameter();                         paramOut .ParameterName = "longStringOut"; ...
Score selecting row in gridview and paging
Eiriken - 19 Sep 2006 1:06 PM - 4 messages
Hello, I have a result in a gridview. The result usually consists of thousands of rows. The gridview has sorting and paging enabled. I have added an additional column in the gridview, where users can select rows by clicking a checkbox. The reason for this is to allow users export only ...
Score Authetication
Adrian - 19 Sep 2006 11:48 AM - 3 messages
I have my SQL Server 2005 Express set up for Windows authentication. An application I want to run uses SQL Server Authentication. How can I reconfigure my SQL Server 2005 Express to allow for that? Adrian. ...
Score DataView Problem
Krishna - 19 Sep 2006 9:56 AM - 2 messages
Hi,    I am krishna,software developer in KISOFT, chennai,india.I developed one application using visual studio 2005.I am using Dataview object in my application.it's working properly in offline but the online application display the following error ...
Score Connection property has not been initialized
sasi.vempalli - 19 Sep 2006 6:57 AM - 1 message
Imports System.Data.sqlclient Public Class track     Inherits System.Web.UI.Page Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'Put user code to initialize the page here ...
Score Connection property has not been initialized
sasi.vempalli - 19 Sep 2006 6:57 AM - 1 message
Imports System.Data.sqlclient Public Class track     Inherits System.Web.UI.Page Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'Put user code to initialize the page here ...
Score Connection property has not been initialized
sasi.vempalli - 19 Sep 2006 6:54 AM - 2 messages
Imports System.Data.sqlclient Public Class track     Inherits System.Web.UI.Page Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'Put user code to initialize the page here ...
Score System.ArgumentOutOfRangeException
Krishna - 19 Sep 2006 4:51 AM - 3 messages
Hi,    I am krishna,software developer in KISOFT, chennai,india.I developed one application using visual studio 2005.I am using Dataview object in my application.it's working properly in offline but the online application display the following error ...
Score how to rectify System.ArgumentOutOfException
Krishna - 19 Sep 2006 4:35 AM - 2 messages
Hi,    I am krishna,software developer in chennai,india.I developed one application using visual studio 2005.I am using Dataview object in my application.it's working properly in offline but the online application display the following error ...
Score DataColumn.Expression Property and TimeSpan type (.Net 2.0)
thomas - 19 Sep 2006 3:07 AM - 3 messages
Hello, According to the docs it should be possible to use TimeSpan type in DataColumn.Expression property. [link] - see the Convert function description. I just can not figure out how to specify TimeSpan value. Her is what I have ...
Score Strange 'Concurrency Exception' with VS2005 and SQL 2005
Piggy - 18 Sep 2006 10:31 PM - 1 message
Hi All, I am getting a very strange 'Concurrency Exception' updating records with VS 2005 (language VB) on a SQL 2005 Database Table. To handle data I use strong typed Dataset with TableAdapters and the interaction with the SQL Database ...
Score ADO.NET Workshop
William (Bill) Vaughn - 18 Sep 2006 8:57 PM - 1 message
See [link] --  just for those of you that want more information on ADO.NET 2.0. ...
Score Authentication
Adrian - 18 Sep 2006 7:22 PM - 6 messages
I have my SQL Server 2005 Express set up for Windows authentication. An application I want to run uses SQL Server Authentication. How can I reconfigure my SQL Server 2005 Express to allow for that? Adrian. ...
Score Character special in ADO ConnectionString.
Jefferson Valim - 18 Sep 2006 6:23 PM - 2 messages
Hi, we have a function that defines the password of the user access the data base. This function was written initially in Delphi and the access to the data base is ADO. In this environment the access is made without problems. ...
Score Getting Time Zone Offset from Oracle
jpabich - 18 Sep 2006 1:17 PM - 3 messages
I am trying to get the time zone offset value that is stored in an oracle database field of type TimeStamp with TimeZone.  I can see the value in the database column.  However, when I run the query and get it ...
Score problem about DataSet.ReadXml method
HC - 18 Sep 2006 11:53 AM - 1 message
Hi all,    I¡¦m writing a program that reads XML data from SharePoint and uses DataSet.ReadXml method to manipulate data. As tested, I found some data cannot be retrieved from the DataSet. This problem occurs in some columns if ...
Score Output Parameter not being returned correctly - DAAB in ASP.NET WAP
Alec MacLean - 18 Sep 2006 10:29 AM - 9 messages
Hi, I'm using the DAAB Ent Lib (Jan 2006) for .NET 2.0, with VS 2005 Pro.  My project is a Web app project (using the WAP add in). Background: I'm creating a survey system for our company, for which invites will target selected personnel among our customers via email.  Each email will provide a custom hyperlink for each respondent using a SQL generated GUID value in the querystring.  The GUID will be checked for validity before the user can proceed to the survey, and is used as part of the "use-once" process so that the respondent cannot re-submit multiple times. ...
Score Datagrid Problems
Calson33 - 18 Sep 2006 6:52 AM - 2 messages
I created a datagrid with an edit button which redirects to another page for editing. This seemed to work fine. Then, I added a way to search which just modified the SQL by adding a WHERE clause (I know, it's going to be put into a stored proc, just trying to get it to work ...
Score Row number in DataRow.
pradeep_TP - 18 Sep 2006 6:36 AM - 4 messages
Hi All, I am iterating through the rows in a table through foreach statement. I am using DataRow object here to store the row from the DataRow collection. Within the loop I need to find out the current row number. I could have used ...
Score ObjectDataSource & FormView adding two extra paramaters to Update method giving error non-generic me
Fred Dag - 18 Sep 2006 4:24 AM - 1 message
Hi, I have a FormView that uses a ObjectDataSource. It retreives data alright but when updating it gives a ObjectDataSource 'ObjectDataSourceCatalogueItem' could not find a non-generic method 'UpdateByCatalogueItemID' that has parameters: CatalogueItemTitle, CatalogueItemDescription, CatalogueItemImage, Original_CatalogueItemID, CatalogueItemID, CatalogueItemREFItemNumber, original_CatalogueItemREFItemNumber. where as the actual UpdateParameters looks like ...
Score ODBC or OLE DB
Chris - 18 Sep 2006 1:27 AM - 5 messages
Hi, What should I choose ODBC or OLE DB? I need to connect to Oracle, SQLServer, Ingres and maybe MySQL. I am not using stored procedures. I cannot find any microsoft recomendations on there MSDN site. Can anyone point me to some documents that have the benifits of one over the ...
Score Error clearing Date fields
Kevin Jackson - 17 Sep 2006 6:17 PM - 3 messages
I'm using an Access Database,  and VB.Net 2003. One of my tables has, amongst others,  2 fields that are defined as Date/Time fields. with a format of Medium Date. In the VB Solution explorer I added a new form using the Data Form Wizard ...
Score gridview databind timeout
Gerhard - 17 Sep 2006 5:10 PM - 11 messages
Hi, I have an application with a GridView with a data source of a stored procedure in MS SQL Server 2005. The stored procedure is going against a large encrypted table, so is memory and processing intensive.  However, the stored procedure does run in an ...
Score Determine whether SQL Server exists
_DD - 17 Sep 2006 6:21 AM - 26 messages
I'd like to include a 'Test Connection' button in an app, for testing validity of a SQL connection string.  I'd prefer to keep the timeout low.  What is the conventional way of doing this? ...
Next »