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 > november 2004

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

ado vs oledb
Posted by Maileen at 11/30/2004 11:31:04 PM
Hi, I use to program using VB + ADO with MS Access. however, i've read that oledb is faster and better then ADO to access to DB. could you tell me in which wqy is it faster ? what i've seen till now, it's that i need 3 times more code lines to do the same thing. thanks a lot, PM...more >>


Using DSN in connection string with SqlConnection Object
Posted by Nirmalkumar at 11/30/2004 11:31:02 PM
I want to use DSN in Connection string. But for opening connection i am using 'SqlConnection' object. i.e using System.Data.SqlClient; So is it possible to use DSN in connection string with 'SqlConnection' object. OR i should go only for 'OdbcConnection'....more >>

How can I format date in databound combobox in windows app?
Posted by George P. at 11/30/2004 10:22:04 PM
Hi, I have a combobox bound to a smalldatetime column in a table. The ComboBox displays all available dates. However it displays them in long format and I want to display them in short format. Is this possible? ...more >>

Read-only transaction in Oracle
Posted by Maxim Maslov at 11/30/2004 9:52:13 PM
Hello All; Does anybody know any way to start read-only Oracle transaction in .NET application? This mode can be set in PL/SQL by SET TRANSACTION READ ONLY statement, but Oracle provider for .NET does not support such isolation level. Thank you, Maxim ...more >>

Very simple INSERT INTO with a DateTime parameter -> "Syntax Error in INSERT INTO statement"
Posted by loquak at 11/30/2004 9:20:32 PM
Hello. The following very simple code does not seem to accept the DateTime variable as a parameter - why? The table (MS Access db) here contains only a primary key and a column Date of type date/time. connection.Open(); transaction = connection.BeginTransaction(); commandString = "INSER...more >>

how to move record forward or backward
Posted by hui at 11/30/2004 9:19:44 PM
hi all I have got a datareader by sqlcommand, now I wanna move forward or backward, but I don't find first,last,prior and next methods. How can I do it? thanks for your suggestion. hui ...more >>

how to move
Posted by hui at 11/30/2004 8:23:41 PM
hi guys I have got a datareader, now I wanna get last record or locate any record by some integer step. How can I do it? thanks hui ...more >>

RowState Undelete?
Posted by localhost at 11/30/2004 4:43:54 PM
A row was deleted in a DataTable, and now I want to bring it back so I can remove it (so my dataadapter will not touch it later). How can I do that? Thanks. replaceExisting...more >>



Annoying Bug with parent-child-grandchild relationships.
Posted by George P. at 11/30/2004 4:11:15 PM
Tables: Parent, Child, Toys Relationships: ParentToChildRel, ChildToToysRel. dataGridParent.Datamember="Parent"; dataGridChild.Datamember="Parent.ParentToChildRel"; dataGridToys.Datamember="Parent.ParentToChild.ChildToToysRel"; all grids pointing to same datasource. the flaw is that when a m...more >>

newbie question.
Posted by Jensen Bredal at 11/30/2004 4:07:58 PM
Hello, I have backed up a table from a database in an DataTable (dt ) object. The table has been wiped up (in sql server) after the backup but i still have the copy in memory (in my DataTable object ). now i need to restore the table from memory. Is there a quick way of doing this apa...more >>

[BUG?] (2) Update database using stored procedure and OleDbDataAdapter.Update
Posted by joun at 11/30/2004 3:23:29 PM
As suggested by Cor Ligthert, i've created a simpler sample, with the same problem; this is the full source code, so everyone can try itself: Access database "dati.mdb": Tables: "myTable" Fields: fNumber Numeric fString VarChar(50) No primary keys defined. Stored Procedures: "q...more >>

XML Dataset
Posted by Séan Connolly at 11/30/2004 2:53:04 PM
I have a dataset that is based on an xml file, which contains the same structure as a sql server table and is exported from a dataset. When I do: sqlDataAdapter.Update(dataset, strTableName) I get the error: "Missing the DataColumn 'InspectionDate' in the DataTable 'tblEquipmentInspections'...more >>

Aborting a thread corrupts my SqlConnection (?)
Posted by Uri Dor at 11/30/2004 2:33:20 PM
Hi, I'm running a long query in a separate thread. If I abort that thread and then I try to use the same connection string again, I get an unexpected result. Details: the aborted thread runs a query that returns a resultset, using a DataAdapter. the query run afterwards is: INSERT INTO ...more >>

alter table structure using FillSchema
Posted by Daniel at 11/30/2004 2:16:37 PM
Hi All, using FillSchema() method of an dataadapter can I alter a table on sql server? instead of using "alter table alter column..." strings I'll use getSchemaTable modify columns I need and then use FillSchema to submit changes to the server... Thanks, Daniel ...more >>

OracleDataReader returning no rows or data even though data exists
Posted by MS at 11/30/2004 1:25:02 PM
Hi All, I am trying to get result from Oracle Function that returns a number. When I rum from SQL Plus I could see the result. When I call from my C# application I get no data. I am using System.data.OracleClient to access oracle function on Database 8.1.7. I am using Oracle 9i client fr...more >>

Displaying dates in dd/mm/yy format
Posted by Anonymouse at 11/30/2004 11:55:03 AM
I have two Date/Time fields in my Access 2003 database. The VB.NET app I'm developing (and making some real progress with) uses TextBoxes to input these as part of a record in a DataSet. Problem: Access always stores years as 4 digits, and it automatically tags a time onto the field, so when t...more >>

Add Raw DataRow Collection?
Posted by localhost at 11/30/2004 11:52:26 AM
I have a remote DataTable and I want to add 5 DataRows to it. My current code does a "remoteTable.Rows.Add( new object[] { .... } );". That results in 5 remote calls, which is bad. I already know the schema of the remote DataTable. Is it possible to create a DataRow collection, populate al...more >>

Removing rows from a DataTable is VERY slow
Posted by Markus Hjärne at 11/30/2004 9:27:25 AM
I'm using a DataTable to hold a selection of rows (100,000+) from a large database table (1,000,000+ rows). At times I want to remove rows that aren't used anymore from the DataTable to save memory. But my tests shows that it takes very long time to remove the rows. Running the code below on a Pe...more >>

mapping 2 datatable columns to one datagrid column
Posted by forceDev at 11/30/2004 8:43:03 AM
Is this possible? I want to concatenate two columns in my table and display them in one datagrid column. I have a TableStyle where I create DataGridColumnStyle's. I'd like to set the MappingName to two columns but I dont see how this can be done. Thanks....more >>

Use of undocumented sp_MSforeachtable and MStablespace
Posted by haberlandner NO[at]SPAM gmx.at at 11/30/2004 8:07:06 AM
What is wrong with the following code? What I want to do is to store the results of MStablespace for every table in a DataTable. The result contains the number of rows and the data space and the index space. This seems to be okay, because dataTable has three columns after executing the code. The...more >>

question for the minds
Posted by ae at 11/30/2004 7:51:03 AM
This is what should be an easy question, but I can't get it through my head. Can someone help me undestand the following? The way I see it, .DataSource is whatever you decide to refer back to thel the Datalist in my case it is an array: System.Collections.ArrayList al = new ArrayList(); ...more >>

ExecuteScalar intermittently returns "0"
Posted by mschaech NO[at]SPAM hotmail.com at 11/30/2004 4:47:15 AM
Hello all I have an interesting problem which is causing me to lose sleep. I have a vb.net app in use by approximately 100 people on a daily basis. This app is mission critical for the business. I'm using windows server 2003 for the web front end, SQL server 2k for the backend, and a mixture ...more >>

data adapter update using datatable that has MANY changes
Posted by Darklight at 11/30/2004 2:39:01 AM
Hi. I magine that I have a listbox that is bound to a data table. This means that there is the possiblity that the data table will have new rows, edited rows, and/or deleted rows. After everything is done, I would like, at the push of a button, to update the database with the change(s) made...more >>

How to refresh Currencymanager that is pointing to deleted rows.
Posted by Debi at 11/30/2004 12:09:02 AM
Hi, I get a RowNotInTableException while accesing a row that has been deleted and refetched from the database. How can I refresh the currencymanager to point to the correct row. Thanks, Debi....more >>

SQLDataReader
Posted by Michael Jackson at 11/29/2004 11:29:45 PM
My application is using the SQLDataReader to retreive and itereate thru rows of data from SQL Server, then for each row of that SQLDataReader, selects related rows from another table via yet another SQLDataReader. When I finish with a row, I do a SQLDataReader.Close and set it to nothing, but ...more >>

Specifying format of DateTime columns read from CSV files
Posted by Joel Gordon at 11/29/2004 7:54:51 PM
Hi, I am reading a CSV file into a DataTable with the following code : internal static DataTable ReadFromCSVFile( string csvFileName ) { if ( !File.Exists( csvFileName ) ) { throw new ApplicationException( " Cannot find CSV file : \"" + ...more >>

DataSet Memory Usage
Posted by howard39 NO[at]SPAM nospam.nospam at 11/29/2004 6:47:04 PM
I'm working with a large ADO.Net DataSet and my application uses quite a bit of memory. According to the memory profiler I am using, there are about 120,000 DataRows, and they take up about 5 Megabytes. These DataRows are contained in a total of about 70 tables. However in addition there ar...more >>

date cell in Excel is null
Posted by Darklight at 11/29/2004 6:33:12 PM
Hi. I hope somebody can help me. I am trying to read an excel file via ADO.NET. I have tried using a datareader and filled datatable (by oledbadapter). My problem is that some cells with date format are being returned as null. Can anybody offer some explanation and solution? I am t...more >>

I can't fill a required field in a record Add (before EndEdit)
Posted by Larry Woods at 11/29/2004 5:33:32 PM
I have a required field in my db table. I am filling a table with a NEW row via a form with bound textboxes. I get a particular required field ( a foreign key) from another source. When I get ready to update my table I do an "EndEdit" and it detects that I have not yet filled the required fie...more >>

How to write a custom data adapter
Posted by Vinay at 11/29/2004 5:11:12 PM
Hi, How to write a custom data adapter to retrieve value from legacy database(image database on HP Mainframe). Any help on this will be appriciated.. Thank you Vinay ...more >>

Evaluating Reporting Tools for .NET
Posted by mskhanis NO[at]SPAM hotmail.com at 11/29/2004 3:55:05 PM
I am currently doing some research on reporting features provided / compatible with dotnet features. Our current application has excel reprots that are emailed both with an without scheduling through a web front end that uses coldfusion as well as asp. There are custom vb compnents that generate...more >>

Problem copying datatable-long post
Posted by james at 11/29/2004 3:36:14 PM
Sorry for posting a long post, (the code) but, I am having a problem copying one data table to another new table in another Access database that has the same table schema. You will notice that I do not list exact column names etc. because this routine needs to be generic so I can use it to copy d...more >>

Storing passwords in database
Posted by VB Programmer at 11/29/2004 2:27:19 PM
I am using SQL Server as the database for my ASP.NET app. I have a users table with a password field. What is the best way to encrypt it before it goes into the table, then decrypt it to read the value? Any sample code or links would be helpful. Thanks! ...more >>

Encrypting/Decrypting Connection String
Posted by VB Programmer at 11/29/2004 2:23:30 PM
I have my SQL Server connectionstring in my web.config file. I'm scared that someone will open the file and get my username/password. How do I encrypt, then decrypt the connection string in the web.config file? ...more >>

Slow OleDbParameter
Posted by Tomislav Stilinoviæ at 11/29/2004 2:01:53 PM
Hi all, I have a question about performance of OleDbCommand with command parameters. I try to get records from table with 1500000 records in two ways, with command parameters (a) and without them (b). Field type is char and it also has index. Option (a) gives me result in 30 seconds and opt...more >>

Repopulating a DataGrid with a different Dataset
Posted by wenz at 11/29/2004 2:00:34 PM
Hi, I have a small application that reads data from a text, access or excel file and displays it in a DataGrid. I have a problem when a second request to display a file is made in that the columns in the datagrid display both the column headings from the original file and the new file. I h...more >>

DataUpdate passing wrong values to SqlServer?!?
Posted by Jens Weiermann at 11/29/2004 10:03:55 AM
Hi! I have a rather simple DataSet with two tables in it (parent / child). I've set the UpdateRule property of the relation to "Cascade", because this value is changed when the parent row is written to the sql server (an identity column); so after I call the Update method of the DataAdapter fo...more >>

populating dataset from excel range, error where no data.
Posted by winshent-google NO[at]SPAM yahoo.co.uk at 11/29/2004 7:41:05 AM
My web app allows users to upload an excel file and then ado.net loads the data (if there is any) into sql server. I have a problem when if there is no data in the excel spread (completed on a weekly basis), then the code fails when i try to fill the data adapter with the dataset. should th...more >>

Can't import .OCX assembly into Web Matrix Project.
Posted by Steve Gordon at 11/29/2004 2:28:27 AM
Hi, I am using Web Matrix Project as .NET programming environment. Can you show me detailed steps how to import the .ocx library into the Web Matrix Project. I can't seem to be able to import other assembly than .dll, .exe or ..mcl . I am pretty new to the .NET programming environment, and ma...more >>

Page Time out for huge database
Posted by Esref DURNA at 11/29/2004 1:59:05 AM
We have a huge database which can only turn the result in minimum 2 minutes. At out ASP.net Application we modify the ado object timeout secound but now we get the page time out from the System.Exeption what we should modify more? machine.config? web.config? ISS? Thanks ...more >>

create stored procedure dynamically
Posted by Hazira B at 11/29/2004 1:05:03 AM
Haiii!!!! Is it possible to create stored procedure dynamically in C#.NET. Because some of my requirements needs such a situation. -- Yours, Hazira B...more >>

Migrate SQL Server 7 to 2000
Posted by Sangeetha Nagaraj at 11/29/2004 12:57:02 AM
Hi All, I have a database in SQL Server 7.0. I want to migrate my database to SQL Server 2000. How to go about it. It is a heavy weight database. Can anyone give me few suggestions -- Rgds, Sang...more >>

.NET/Oracle8i - Inserting Null.
Posted by RajSB at 11/28/2004 10:01:05 PM
I have a numeric column in Oracle which is populated using a .NET Datagrid. The problem is whenever i try to fill it with empty value when the user clears the value that is filled already, I get an error. Iam pasting chunks of code : Private Sub DataGrid1_UpdateCommand(ByVal source As Obj...more >>

Trip to Disney
Posted by mickey NO[at]SPAM travelexpert2004.biz(mickey) at 11/28/2004 7:17:23 PM
GET YOUR TRIP TRIPS TO DESNEY TRIPS TO HAWAII http://travelexpert2004.us http://travelexpert2004.biz http://gotraveling85.us ...more >>

OleDB and Excel...
Posted by fahad at 11/28/2004 1:03:06 PM
Hi... I am trying to save data into an excel sheet. The application is working fine here on my local machine (FAT 32). But when I try to run the same application on server (I think NTFS), following error is generated. What you say? Permission problem or Rights issue? Please help !!.. .I...more >>

(.NET 2.0) Adding your own DataProvider to the DbProviderFactory model.
Posted by Sahil Malik at 11/28/2004 4:12:18 AM
I'm sorry for my incessant questions but I am architecting a Sql Server 2005/ADO.NET 2.0 project, and I just wanna be double sure of any architecture decisions I make. I found the following very interesting code in DbProviderFactories.Initialize() -- DbProviderFactories._configTable = ...more >>

Load table
Posted by SqlJunkies User at 11/28/2004 1:42:15 AM
Hi, I should be able to use the following code to load data from a datatable via ado.net into sql server. I want to keep the code generic so I can run it against any table. The error I get relates to primary key not being set. But I know it is because when the row is first inserted I get error ms...more >>

SQLDBType.Char for OUTPUT parameters
Posted by John A Grandy at 11/27/2004 9:12:23 PM
is there some problem with using SQLDBType.Char for SQLParameter.Direction = ParameterDirection.Output parameters ? ...more >>

must set .Size property for output SQLParameter
Posted by John A Grandy at 11/27/2004 8:51:17 PM
for ADO.NET SQLParameters with SQLParmaeter.Direction = ParmeterDirection.Output .... apparently , contrary to the documentation , you DO have to set the SQLParameter.Size property ... or you get errors like this : Message "Parameter 1: '@EntityTypeName' of type: String, the property Siz...more >>

asp.net database best practice
Posted by charlie at 11/27/2004 7:48:40 PM
Hi there, My asp.net application uses methods in classes to do database updates. So for example on any given page when a user clicks the submit button, my click event might call three different methods each of which opens a database connection, updates a table, and closes the connection. ...more >>


DevelopmentNow Blog