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 2005

Filter by week: 1 2 3 4 5

Dataset as a database - is it possible?
Posted by Mike Peretz at 1/31/2005 11:53:48 PM
I would like to use a dataset as a data file (like a database). However, I didn't find a way to use SQL on the Dataset (except on a DataView, but then Dataset is all loaded.). I also noted that I must flush the whole dataset to disk and load it all to read it. I wonder, if there is a better way t...more >>

Problem with Datareader.close
Posted by anandv81 NO[at]SPAM gmail.com at 1/31/2005 11:17:28 PM
Hi, I have an asp.net application and am facing a problem while closing my datareader object. I am using Active reports for dotnet for generating reports. I create a datareader object in my data access layer and then pass it to the calling function ( I know this isnt a good practice, but I ...more >>

Rollback timeout ???
Posted by Mike at 1/31/2005 8:18:07 PM
I have a vb.net application. Using ado.net, I create/open a connection, create a transaction object, and go through a loop. In each interation of the loop, I create a SqlClient.SqlCommand (using this transaction object) and perform a cmd.ExecuteNonQuery using a SQL Update statement. After everyt...more >>

Best practice to transfer data from Excel file to SQL Server 2000
Posted by GD at 1/31/2005 5:27:04 PM
Hi, I am trying write a web application using ASP.Net to load an Excel file from client site and save all the data in the file to a table in SQL Server 2000. My current assumption is: load Excel data to an ADO.Net dataset, or a datareader, then pull the data out from them and insert the data...more >>

Login failure...
Posted by Rob R. Ainscough at 1/31/2005 4:28:09 PM
I ran my code against my LOCAL SQL Server database -- all works. I run the code against a remote SQL Server providing the correct uid and password, and I get Login failure. What is more bizarre, if I step thru the code in VS.NET (exact same code with same connection values), I don't get th...more >>

RowFilter with Numeric Values
Posted by Extreme Datasets at 1/31/2005 3:53:04 PM
How to apply a DataView.RowFilter with numeric values. I always get exception from the System.Data.SyntaxErrorException: Syntax error: Missing operand after '=' operator. Any Ideas would be good Thanks...more >>

Connected vs disconnected application
Posted by Nicolae Fieraru at 1/31/2005 3:46:56 PM
Hi All, I read in a book that a program can connect to a database using two different types of connections to a database. In case the program can maintain a direct connection, classes such as OleDbConnection, OleDbCommand and OleDbDataReader can be used. The other option is to create a dis...more >>

Data Access Application Block location?
Posted by Mike at 1/31/2005 3:34:32 PM
Hello, Anybody know where the Data Access Application Block is located on the MSDN site? The Data Access and Storage Developer Center is located here: http://msdn.microsoft.com/data/default.aspx On that page is a link to the app block, but clicking it redirects to MSDN's 404 error page. ...more >>



Changes to MaxLength being ignored
Posted by Don at 1/31/2005 2:29:43 PM
I have a dataset with data retrieved from an Access2K database and I am trying to change the MaxLength property of one of the text fields. The code executes fine (e.g. myDataset.Tables(0).Columns(x).MaxLength = 50), but the value of MaxLength doesn't change! Can anyone explain why this is happe...more >>

DateTime fields and DBNull.Value
Posted by Wilker Shane Bruce at 1/31/2005 12:37:05 PM
I have a stored procedure that has a couple of DateTime parameters that are used to update nullable DateTime columns in one of my tables. When I call the stored procedure using ADO.NET in C# from an OdbcCommand object and attempt to set the DateTime parameters to null, I am getting the foll...more >>

Lookup table in separate database
Posted by Rob Richardson at 1/31/2005 10:51:32 AM
Greetings! My application uses a simple source control system implemented in SQL Server 2000. The file is contained in an image field in a table. When a user wants to edit the file, the a new file is created on the user's hard drive using data from the image, and a foreign key into the users...more >>

Inserting records into Multiple Tables in Dataset and Database (C#)
Posted by john at 1/31/2005 9:25:47 AM
Hi, I have a question about inserting records into Multiple tables in both a dataset and database. Currently I have a dataset created from a database with 3 tables. The Database (ClientName) generates the ClientID and the other two tables (Address, Misc) have ClientID as their primary k...more >>

ODP.NET Dispose bug
Posted by fuzzy333 NO[at]SPAM hotmail.com at 1/31/2005 6:16:19 AM
My app running under iis was experiencing crashes when I started using ODP.NET 9.2.0.4.01, with the Oracle client 9.2.0.1.0 to replace legacy ADO calls. (I also tried with the new 10 client and ODP.NET 10 with the same behavior). After a couple of weeks of painfully unfruitfull debugging and hel...more >>

Write Dataset contents to a file as a csv?
Posted by Chris at 1/31/2005 5:57:04 AM
I need to write the contents of a dataset to a comma delimited csv file that includes the field names? Does anyone have a sample of how to do this? Thanks...more >>

RowFilter:Missing operand after '=' operator
Posted by Extreme Datasets at 1/31/2005 5:07:01 AM
While using the DataView.RowFilter, if the RowFilter is set to an integer value, say: c# MyValue = 123; dataview.RowFilter = "MyField = " + MyValue; vb MyValue = 123 DV.RowFilter = "MyField = " + MyValue Any of the preceding code throws a Missing operand after '=' operator error. ...more >>

Re: ThreadAbortException thrown on certain machines...
Posted by Gary Joy at 1/31/2005 4:51:02 AM
My application uses ADO .NET to access SQL Server and when running on my development machine will throw a SqlException if I try to do something bad (e.g. SELECT from a table that does not exist). However, when running the same application on another machine, although a SqlException does see...more >>

Relation tables order --> order_detail
Posted by Jaime Jimenez at 1/31/2005 3:41:11 AM
Hi First of all, sorry for my english if is not very well, I am spanish. My problem is these: I have an DataSet1.xsd, contain two tables, one is "order" and the other is "order_detail" and between this tables exist one relation, one to many, if I want to import the information of one tabl...more >>

SqlCommandBuilder bug
Posted by Luke Painter at 1/31/2005 1:49:08 AM
When using SqlCommandBuilder, if one of the columns, of the subject table referenced in the SELECT query, has a column name that is an T-SQL reserved word, such as User, the T-SQL command text for the adapter will be incorrect and an SqlException will be thrown. This is because the comman...more >>

Call javascript function without using any event call
Posted by cschang at 1/30/2005 11:39:09 PM
In my vb.net module, I used the script to generate a client side javascript function. as Private Sub disablePostedFileInout(ByVal n As Integer) Dim jScript As String jScript = "<script language='javascript'>" jScript = jScript & " function disableInput(" & n & " ...more >>

How to add a datacolumn which points to another datacolumn
Posted by Programatix at 1/30/2005 10:57:08 PM
Hi, I need to add a datacolumn into a datatable which points to another datacolumn in another datatable. I have come across this article but forget from where. Anyone help would be very appreciated. Thanks in advance....more >>

counting records in select query
Posted by Konrad at 1/30/2005 8:34:48 PM
Hi I have complicated select query how to get prior number of records returned from this query. One number, to decide if records should be loaded. Thanks Konrad ...more >>

Workgroup file information file error: OleDB to Access file
Posted by Paul Keister at 1/30/2005 5:48:33 PM
I'm trying to open an Access database using OleDb. The database opens fine, but when I try to open the database using a workgroup file with a name and password, I always get the same error: "Cannot start your application. The workgroup information file is missing or opened exclusively ...more >>

"Data type mismatch in criteria expression" from C# app in French
Posted by Greg at 1/30/2005 3:53:02 PM
Hi, I get a "Data type mismatch in criteria expression" error when attempting to write to an Access database in my C#.NET Windows Forms application. This only occurs when the OS regional settings are set to French. When they are set to English, the write query works fine. I use System.Da...more >>

Recursive relationship in ADO .NET dataset
Posted by Dan at 1/30/2005 2:09:11 PM
Hi to all I have a data set "dsTest" with one table "Sample" having next fields: ID1 int (primary key) Name string ID2 int. I created a recursive relationship between ID1 and ID2, named "SampleRel". The problem is the depth of relationship. This relationship...more >>

Cannot get OUTPUT parameter after running Sql stored procedure
Posted by MS at 1/30/2005 11:57:39 AM
Here's my simple stored procedure: ALTER PROCEDURE GetMemberIDByEmail @Email EmailAddress, @ID int OUTPUT AS SELECT @ID = ID FROM tbl_Member WHERE Email=@Email RETURN Here's my C# code (using Microsoft Data public int GetMemberIdByEmail(string email) { SqlParameter[] ar...more >>

Update DB
Posted by ruthness at 1/30/2005 10:26:26 AM
Hi, I got a problem updating MDB file thru ASPX. error : "System.Data.OleDb.OleDbException: Operation must use an updateable query." I update it with this way : (when I updated data in datagrid everything is perfect) dbconn = New OleDbConnection(ConfigurationSettings.AppSettings("cn"...more >>

Cannot Update Records because of expression DataColumn
Posted by Hemang Shah at 1/30/2005 3:30:35 AM
I have an expression DataColumn which combines "First Name" + "Last Name" to display in the list box to select the name, who's record comes up. But when I use the daDataAdapter.Update(dsDataSet, tblTableName); It gives me an exception saying cannot update readonly expression type. How d...more >>

Newbie: Arbitrary list order in SQL?
Posted by David at 1/29/2005 10:41:01 PM
Hello all, I have an ASP.net page that uses an "asp:DataGrid" tag that is populated by a System.Data.DataSet object. Data is sorted via a "sort_value" field in the SQL table. Until now, this page has just been for the display of data. Data entry is handled via a separate system. Now...more >>

How to control another program that is running?
Posted by Tee at 1/29/2005 6:13:26 PM
Hi, Does anyone know how to control another program that is running? Eg: I would like to control the outlook express and tells it to minimize. Thanks. ...more >>

DataView vs. DataSet
Posted by Hemang Shah at 1/29/2005 3:40:38 PM
Hello Few things to remove the cloud: 1) Can a DataView be a subset of a DataSet ? 2) DataSet consists of tables, is that different from a DataTable object ? 3) In IDE, when you create a DataSet it also generates update, add, delete code, if you have controls bound to the DataView (whic...more >>

How to simple storage data about colors in database ?
Posted by £ukasz Margielewski at 1/29/2005 2:30:11 PM
I have column color, which describes color of something ..Ths paramete I use to set color of some windows forms, which willr epresents data in records... what is the simplest way to storare inforamations about colors in database ?? ...more >>

Sporadic Error: Cannot find table 0
Posted by POL8985 at 1/29/2005 8:39:55 AM
The application is developed in ASP.Net with a SQL Server database. Essentially, the application uses a single shared Connection object for all users logged into the system. The connection object is opened/closed for each transaction. The error - System.IndexOutOfRangeException: Cannot find...more >>

Why do I get an error message
Posted by dennist685 at 1/29/2005 12:35:06 AM
Why do I get the following error message. If I click on a datagrid after clicking addnew, an unhandled exception has occured in your application. If you click continue, the application will ignore this error and attempt to continue. If you click quit, the aplication will be shut down immed...more >>

Problem with ExecuteNonQuery() Result, Access, ASP.NET, C#, ADO, OleDB
Posted by vanvee NO[at]SPAM comcast.net at 1/28/2005 9:58:00 PM
Hi I have the block of code below which is supposed to determine the number of rows affected with an update statement (ASP.Net, Access, C#, ADO.Net, OleDB) to determine if the update was successful or if a concurrency error occurred. There is an enumeration defined called DBResult where 1 is...more >>

How to make an XSLT from one scheme to another?
Posted by Ruslan Popov at 1/28/2005 9:05:16 PM
Hello, Can you recommend a tool for making XSLT schemas. Let's say I have one XSD scheme, and I want to make another XSD scheme from the scheme 1, containing generally the same elements, but groupped in another way, omitting some fields, adding some others, making attributes from what was elem...more >>

date format in parameter
Posted by Paulb1us NO[at]SPAM newsgroup.nospam at 1/28/2005 2:07:04 PM
I have SQL parameter that looks like this: cmdUpdate.Parameters.Add ("@invoicedate", SqlDbType.NVarChar, 40).Value = dr["invoice date"].ToString(); IT is updating a field in a SQL2K database. The database field is of type char and not date. The data in dr["invoice date"] looks like th...more >>

SqlDataReader.GetChar(n) failed because of Specified method unsupp
Posted by DHuang at 1/28/2005 1:47:03 PM
Hi there, I just set up my VStudio 2003 and tried to run a test of reading a character from database by using SqlDataReader.GetChar, but it failed. I got the following error message: ----------------------------------------------------------------------------------------------- An unhandled ...more >>

Table.Rows.Add with expression on columns throwing error
Posted by Joe at 1/28/2005 1:33:09 PM
I'm adding a row to a table. The table has some columns with expressions. When I add the row I get an error: Additional information: Cannot perform '-' operation on System.String and System.String. Now the catch is I ONLY get this error when I call my server via remoting. If I call the same s...more >>

Can't add more than one row to table
Posted by dennist685 at 1/28/2005 1:29:05 PM
Can't add more than one row to table I am attaching a sample application The schema is based upon Chapter 13 of ADO.NET Core reference. It uses a currency manager for it's binding context. Here is the problem. The first form that opens includes a listbox of authors. There is a button...more >>

Data reader already open?
Posted by Brett at 1/28/2005 12:22:38 PM
I'm using this code in VS .NET 2003 [code] Me.SqlCmd_BlacklistUpdateStatus.CommandText = "dbo.[SpamUpdateReport_blacklist]" Me.SqlCmd_BlacklistUpdateStatus.CommandType = System.Data.CommandType.StoredProcedure Me.SqlCmd_BlacklistUpdateStatus.Connection = Me.cn2 Me.SqlCmd_BlacklistUpdate...more >>

OleDbParameter doesn't update value correctly
Posted by HungTrinh at 1/28/2005 11:33:54 AM
Hi, I use OleDbCommand to insert a new row to Access database. We reuse = instance of OleDbCommand more than one times.=20 =20 example: - The value of the first record is QueryID =3D 1 and = BooleanOperator =3D "And"; Add to database correctly; - The value of the...more >>

Cant get Stored Procedure connection string right??
Posted by hemant at 1/28/2005 11:15:02 AM
Hi, SqlCommand cmd = new SqlCommand("my_storedprocedure",con); cmd.CommandType = CommandType.StoredProcedure; The error is : type or namespace name 'CommandType' could not be found(are you missing a using directive or an assembly reference) I have included the following namespaces u...more >>

Question on how I can use ForeignKeyConstraint
Posted by Harry Keck at 1/28/2005 10:25:01 AM
I am using ForeignKeyConstraints so that when I change a parent row's key, the child rows are updated with the appropriate key. The problem that I am running into is that I would like to be able to add a row to a table with a value that would not fit a stated constraint. So, I could add a ...more >>

Confused about MissingSchemaAction.AddWithKey
Posted by Tony at 1/28/2005 9:29:02 AM
Hi! I am trying to improve the speed of the app. Can you tell me if i need to use AddWithKey or not? Thanks. if (base.OpenDB() != System.Data.ConnectionState.Open) { throw new Exception("Unable to open DB connection!"); } string sSQL = "SELECT * FROM PROCESSCONTROLVIEW WHERE GROUP_ID = '...more >>

What is the Best way to fetch the most recent updated row in a database
Posted by jagrat NO[at]SPAM gmail.com at 1/28/2005 8:59:50 AM
I am having an OleDBDataAdapter and a dataset. I fill the dataset with a row and execute Adapter.update(dataset,"Table Name"); Adapter.fill(dataset,"Table Name"); For the database table, my primary key is an auto number. Currently, I am fetching the key using: dataset.Tables["Table Nam...more >>

Dataset created in Code cannot be used in Crystal Reports designer
Posted by Chris at 1/28/2005 4:53:03 AM
Hello, I've created a Dataset in code on my form based on an OLEDB provider also created in code. I want to be able to use this dataset in a Crystal Report, but the dataset is not listed in the report designer? I'm not sure how to resolve this problem, any ideas are helpfull. Thank yo...more >>

Continue to develop a old project at a new web path
Posted by cschang at 1/27/2005 10:09:08 PM
I have developed my web module project at my test machine under a different web path ex. c:\inetput\wwwroot\myProject and tested it. After it work find there I coped it to my real web site under the d:\inetput\wwwroot\script\myProject. How can I continue the develop the project under the n...more >>

# of pooled connections seem too high
Posted by Bob at 1/27/2005 8:02:04 PM
We have a production web site that's data intensive (save user input to DB and query for displaying) with the ASP.NET app part on one W2K server and SQL 2000 DB on another W2K server. I have set up performance logs to log # of pooled database connections on the web server every 60 seconds (.NET ...more >>

infoMessage Truncated
Posted by Lachlan at 1/27/2005 5:47:03 PM
I have a large SP that has various print messages throughout. I want to view these print messages from .Net. As such I wire up an infoMessage event handler to the connection. If executed using executeNonQuery it will return all messages fine. Using executeScalar, I only ever get the first ...more >>

Domains
Posted by Charles A. Lackman at 1/27/2005 4:26:54 PM
Hello, I have a made client application that adds records to a database on a domain. Every now and then the database will create duplicate records. I have closely checked the code and have not seen anyreason for this to be. I am using parameters and using ExecuteNonQuery to update the da...more >>


DevelopmentNow Blog