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

Filter by week: 1 2 3 4 5

How to contruct a ConnectionString to connect to dataset?
Posted by jzdeng NO[at]SPAM gmail.com at 7/31/2007 3:37:34 PM
Hi, We have bunch of DataObejcts/BusinessObjects those used against database. Now we fetch some data from database into a dataset. How can we contruct a ConnectionString to connect to this dataset so we can use those DataObejcts/BusinessObjects? Thanks ...more >>


LINQ to SQL: Opposite of SubmitChanges()
Posted by Ralf Ehlert at 7/31/2007 1:34:03 AM
I'm working with the new Beta 2 of VS2008 and LINQ is really great but i'm searching for an opposite construct of the SubmitChanges() method to discard changes. Background: I have a form for editing a single data row and only if the user clicks the OK button the changes are saved into the DB....more >>

Update and Select in the same statement?
Posted by Terry Olsen at 7/30/2007 8:36:08 PM
Is there any way to select a record and update a field in that record in the same statement? I have a table that several threads will be querying. Once the record has been selected by a thread, I don't want that record to be selected by any of the other threads. So my thought was to have a "bu...more >>

Typed Dataset: Add expression-based column?
Posted by benji at 7/30/2007 1:26:04 PM
Hi, I'm creating a typed dataset based off of a SQL Server 2005 DB. There are 2 fields from one table that I'd like to bind to on an ASP.NET dropdownlist. Since I can't specify two fields in the "Datatextfield" proprety of the control, I'm trying to create an expression-based column. One thing...more >>

Datatable Update method not updating
Posted by Flomo Togba Kwele at 7/30/2007 1:08:26 PM
I have a dataset containing a datatable. Everything was working OK. Then I changed the definition of one of the columns from not null to nullable. Now when I update the adapter, the change is not being written to the DB. Just before the update, I looked at the data in the datatable by walking t...more >>

what's the best approach to follow for sql execute
Posted by Ganesh at 7/29/2007 12:31:14 PM
Hi There, What's the better way to follow when we use sql string sql = "Inset into table(f1,f2) values (@f1, @f2)"; then add and passing parameters or in the first place itselef assign the values to the string string sql = "Inset into table(f1,f2) values (" + tbName.text + ", " + tbCity....more >>

Change connectionstring Typed dataset
Posted by Luc at 7/29/2007 3:38:02 AM
Hi, I've noticed that if I change my connectionstring in the app.config file, this isn't enough, a second change in the Global.System.Configuration is necesary!!! This means that after deployment and if the SQL server is changed, changing the code is necesary, ..............?.?? can I...more >>

bind variables oracle visual basic
Posted by cptkirkh at 7/27/2007 8:51:09 PM
I have a query that looks up the highest value for column a and then returns column a and column b. It uses a nested select in the from clause. I want to use bind variables for my parameters but have found out i can't use bind variables in the from clause. It keeps returning no records when i...more >>



What does DataSet.AcceptChanges do?
Posted by Ronald S. Cook at 7/27/2007 6:45:06 PM
If I delete rows in a DataTable and then do a DataSet.AcceptChanges, and then pass that DataSet to the client, will the client have any idea of rows that previously existed? I'm hoping not. If the client would still see those rows (but as deleted), I guess I will have to create a new DataT...more >>

Updated Primary Key (Identity) Value
Posted by Lucas Bussey at 7/27/2007 4:05:24 PM
To start, I'm using VB 2005 and SQL Server Express 2005. This almost appears to be a bug, but I've yet to find an actual bug and generally narrow my issues down to user-error on my part. I have the following code snippet (LogFile is a class I've created simply to output to a textfile): --- ...more >>

Compare two DataSets?
Posted by Ronald S. Cook at 7/27/2007 3:06:01 PM
Is there a way I can compare two DataSets to see if they are identical? Thanks, Ron ...more >>

It's back - the timeout problem
Posted by David Thielen at 7/27/2007 10:52:04 AM
Hi; One of our testers is getting this now - and he is not running under a debugger. The error is: Exception(s):DataSourceException: executeQuery select=select CategoryName from Categories Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not...more >>

Help - why does SqlException not list Procedure name on timeout?
Posted by at 7/27/2007 8:31:07 AM
When I have a timeout on invoking a stored procedure against SQL Server, I have an exception returned that looks like the following: {System.Data.SqlClient.SqlException} System.SystemException: {"Timeout expired. The timeout period elapsed prior to completion of the operation or the serve...more >>

Command parameters, DBNull and SQL Server image field
Posted by Heinrich Moser at 7/27/2007 12:13:32 AM
Hi! This code (using the System.Data.SqlClient namespace)... SqlCommand c = myConnection.CreateCommand(); c.CommandText = "INSERT INTO myTable (myField) VALUES (@myParameter)"; c.Parameters.Add("@myParameter", myValue); c.ExecuteNonQuery(); ....usually works perfectly fine for all kinds ...more >>

update db ?
Posted by Stupid1 at 7/26/2007 4:52:07 AM
I am having an issue with getting my ds to update my db. I am pulling info from the NW db on my Default.aspx page. I then click the edit btn and pass the data to my Details.aspx page. That works fine. The issue is getting the ds to actually update the db. I know this is simple, but I can't see...more >>

Indexing usefull or not??
Posted by Luc at 7/26/2007 4:50:02 AM
Maybe a stupid one,...... is it still usefull to make indexes on the SQL server since in ADO.NET we work with complete datasets which contain complete or parts of tables??? -- Best regards Luc N...more >>

Problems in loading data from an access database into an array
Posted by Fabiyi Olawale at 7/26/2007 12:00:00 AM
Please i'm new in VB.net and i'm designing a Cinema booking and purchase system..I need to load the seat ID from the database into an array.please how do i go about it.. or can anyone give me an idea of how i can show seats are availabele,booked or bought..i'll really appreciate input.... reg...more >>

Merge DataRow Items?
Posted by lucius at 7/25/2007 3:52:51 PM
I have a DataTable with one row and I did a Merge() from another DataTable and now I have two rows. How can I get the rows to be a single row (assuming row 0 is the "dominant" one). Thanks. ...more >>

Null value Check in DataTable?
Posted by lucius at 7/25/2007 3:00:00 PM
I have a DataRow in a DataTable. I want to know if there is a value. I do this if ( this.Rows[0]["Col_A"] == null ) { throw new Exception ( "no" ); } However this condition is never hit. Why? Thanks....more >>

How to get the last created or modified dataset
Posted by thalion77 NO[at]SPAM graffiti.net at 7/25/2007 12:38:23 AM
Hello, is there a possibility to get the ID of the last created or modified dataset of a table via ADO.NET? Is there a database independent way? In SQL Server you can call the scope_identity() function, but this won't work in Oracle, MySQL, Access a.s.o. Thanks in advance, Norbert ...more >>

TransactionScope promotion & isolation levels
Posted by clrudolphi at 7/24/2007 6:28:03 PM
Our project is using the System.Transactions.TransactionScope class to provide an ambient transaction which our DAL classes can leverage. I'm looking for some information about the TransactionScope class to answer a few questions about how it behaves when a transaction is promoted to a d...more >>

DataReader values and .ToString
Posted by Michel Vanderbeke at 7/24/2007 5:03:02 PM
Hello, In order to avoid errors, I have all my DataReader-fields converted with a ..ToString. This in case some record could have Null-fields and an error would be thrown. This works fine, except for "money" fields in SQL-Server. When I enter e.g. ? 2,50 and I read it back with a DataRea...more >>

GridView databinding
Posted by Gerhard at 7/23/2007 11:36:06 AM
I have a GridView which is bound to a table. The user has the ability to change some defaults and then run a process from this. This all worked fine until I added in an auto postback to one of the controls to tie in some other functionality. After the post back, and at the end of page loa...more >>

Database Persistance
Posted by steve.a.bennett NO[at]SPAM gmail.com at 7/23/2007 8:55:59 AM
Hi I'm not sure whether I've given this post the correct title, but I'm a bit unsure of where to put it. I have a database that holds information about several of our users. This database is stored on a central server, with an application that periodically performs some processing, which ma...more >>

Detach database from SQL Server
Posted by Michel at 7/23/2007 8:02:03 AM
Hello, When I have closed my appliciation in VB.NET, and I try to detach my database from SQL SERVER, I often get a message that the database cannot be detachted, because it is still in use. So I think there is some code missing in my application (in the MDI_FormClosing?) to make my da...more >>

ExecuteNonQuery within the loop of a datareader
Posted by Michel at 7/23/2007 3:54:26 AM
Hello, How can I use an ExecuteNonQuery within the loop of a datareader? My code is as follows: Dim cmdToProcess As New SqlClient.SqlCommand Dim rdToProcess As SqlClient.SqlDataReader With cmdToProcess .CommandText = " SELECT * FROM tblDetails " .Connection = cn End With rdToP...more >>

encrypt/decrypt function in asp.net 2
Posted by pelegk1 at 7/20/2007 3:08:01 PM
i am looking for code sampe in aso.net 2 for encrypt/decrypt of paswr d withought using any external DLL (judt to use existing net2 tools) thnaks i nadvance peleg ...more >>

Internal .Net Framework Data Provider error 6.
Posted by monkeyboydan NO[at]SPAM gmail.com at 7/19/2007 10:04:31 AM
Hi I'm getting very occasional exceptions in an application when trying to open a SQLConnection. Does anyone know what this error means, or what I can do about it? The error has only occurred a couple of times, each time with a gap of more than a day, so I cannot replicate or even find a patt...more >>

Automatic filling fields
Posted by mroks via DotNetMonster.com at 7/19/2007 2:29:33 AM
Hi guys, could you please help me on my problem. >>>> --------------- <<<<<<<<< Datasource: MS Access 2003 Table1: Tbl_Employee Field1: Emp_name Field2: Position Field3: Contact# Field4: Address Table2: Tbl_Salary >>>>...more >>

BackgroundWorkers and ADO.Net
Posted by Bill Gower at 7/19/2007 2:27:54 AM
I have an app that allows the user to build a query and then click on a button to execute the query and the results are then used to fill a grid. Can I have the retrieval run in a backgroundworker and have a button that would allow the user to cancel the query if it is running for too long of ...more >>

DataAdapter with Parameter problem
Posted by DesCF at 7/18/2007 7:32:14 PM
When I run the following code everything works fine (which proves the = stored procedure and the parameter: Dim cmdSQL As New SqlCommand cmdSQL.CommandType =3D CommandType.StoredProcedure cmdSQL.CommandText =3D "bdl_CustomerOrders_SELECT" cmdSQL.Connection =3D...more >>

ObjectDataSource a little help
Posted by Yankee Imperialist Dog at 7/18/2007 2:50:02 PM
I have something that works, but it only returns one row of data when i create an ObjectDataSource with it and bind it to a gridview so i need a little help with this (thanks) as simple as it gets 1. my class: Imports Microsoft.VisualBasic Public Class radioShowFiles Private _szFileN...more >>

Question about TransactionScope
Posted by Max2006 at 7/18/2007 2:10:49 PM
Hi, Does TransactionScope need DTC in situations that the transaction is not distributed? I have a set of non-distributed transactions and I am not sure that TransactionScope is the best option for best practice perspective. Thank you, Max ...more >>

combining datasets
Posted by soni2926 NO[at]SPAM yahoo.com at 7/18/2007 1:33:17 PM
Hi, I have 2 datasets right now, say with the following structure: DataSet 1 has a row called ItemCode, index 1 DataSet 2 has a row called ItemCode, index 1 both are similar, but i need to merge them to make one dataset, which needs to have everything in DataSet1 plus anything from DataSet2 ...more >>

Strongly Typed DataSet -> Preview Data -> How to preview stored procedures with GUID parameter?
Posted by Max2006 at 7/18/2007 11:50:06 AM
Hi, In Strongly typed datasets, when we preview a table adapter query, we cannot preview a stored procedure query that has GUID parameter. The error complains that cannot convert a string to GUID. What is the proper format for GUID parameters? Of course I tried {.} format. Thanks, Max...more >>

Typed DataSets ADO.NET 2.0
Posted by ngb at 7/18/2007 7:33:38 AM
For a project I have a typed dataset created ( by dragging tables/ views and configuring the appropriate queries ). If the database schema for these tables is changed (e.g. few columns get added), is it possible to automatically refresh the DataSet. Right now, I see that the Fill query only ha...more >>

Flummoxed by Connection Problem
Posted by DesCF at 7/17/2007 12:28:33 PM
Everything was working fine until suddenly this problem appeared from nowhere: Boot up the pc and go into SQL Server Management Studio. The database is present and the data can be accessed. Go into VB2005 Express and run the project. Everything works fine. Open Database Explorer and c...more >>

What are the pros and cons in using Enterprise Library?
Posted by Peter at 7/17/2007 12:24:10 PM
I'm new to .net. It seems that those application blocks in Enterprise Library are very useful especially when one tries to build a new application. I want to know the pros and cons in using those blocks. Is MS going to release new Enterprise Library for future .net version/build? If I use ...more >>

NULL GUID fields in a Nested Query
Posted by David Whitchurch-Bennett at 7/17/2007 7:58:12 AM
Hi there, Firstly, I hope this is in the right place! I have a problem with a nested query I am generating at runtime. My table (tblIndexValue) has values in every cell in all rows including the createdUserID column. The createdUserID's datatype is a GUID, and the table is in Access usi...more >>

Syntax error in INSERT INTO statement. vb.net
Posted by Ben at 7/16/2007 10:56:58 AM
I am using VB.net The Error message is :Syntax error in INSERT INTO statement. vb.net Could this be casused by my primary Key? if my primary key is "ID" and it is (autonumber). I tried inseting a blank field, number in a field, and the example is with out the field at all. INSERT INTO E...more >>

Ado.net and SQl view ???
Posted by calderara at 7/16/2007 10:52:03 AM
Dear all, I would like to bind a datgrid control to an SQL view. How set SQL command type for a view ? Is it Text ? IN which form the sql view is returned, data set ? When I get my view bind to my grid, if new data is inserted in my database, does my view will be automatically refreshed ...more >>

Sending a set of data to a stored procedure
Posted by Amir Tohidi at 7/16/2007 8:36:09 AM
Hello I need to write a stored procedure that executes a bunch of bulked and related(stock) trades. For example, the customer may have requested four trades to be placed. The trades are related because the money from selling one stock say needs to fund a new stock purchase. What is the r...more >>

How to insert data row and reading out the ID of the new dataset
Posted by thalion77 NO[at]SPAM graffiti.net at 7/16/2007 4:57:15 AM
Hello there, what is the best way to add an dataset and, then, to read out the ID value of the created dataset? ExecuteNonQuery() does not retrieve informations about the new ID of the dataset. Of course I can execute a statement like this: SELECT MAX(ID) from TableName, but this would not ...more >>

System.Transactions.Diagnostics.DiagnosticTrace throws an exception of initialization
Posted by Wavounet at 7/16/2007 12:00:00 AM
I use .Net 2.0 and connect to a database access, on the connection.open() I've this message "The type initializer for 'System.Transactions.Diagnotics.DiagnosticTrace' threw an exception" Code : public DataSet GetData(string SqlQuery) { using (OleDbConnection c...more >>

From ADO.NET 1.1 to SQL 2005 and SQL 2008
Posted by Irakli Lomidze at 7/15/2007 8:12:00 AM
Dear Sirs. I have Client Server Application on Client Side i have .NET 1.1 WinForm Application on Server Side i have SQL Server 2000 I'm using "OLE DB PROVIDER FOR SQL SERVER" for the Data Access 1) I'd like to upgrade Server Side to SQL Server 2005 (I will copy same databa...more >>

Strongly Typed DataSets and "Refresh the data table" Option
Posted by Max2006 at 7/14/2007 10:57:09 PM
Hi, Using Visual Studio 2005 and SQL Server 2005: I am trying to understand the stored procedures that Strongly Typed Datasets wizard generates for me. When we create a new strongly typed Datasets, and choose the following path: Choose connection-> Create new stored procedures -> Enter...more >>

How save DataSet back to database?
Posted by Ronald S. Cook at 7/14/2007 3:24:14 PM
In my client Windows application, I am receiving a DataSet containing one DataTable. This comes to my client via the business tier on a different physical machine (we're using WCF if that matters). After I make changes to the data in the underlying DataTable, I send the DataSet back to the...more >>

probleum in running asp
Posted by veeru at 7/13/2007 10:34:01 PM
i am facing the probleum in running asp onmy machine. i am using window xp 2000 and also i have installed iis on my machine but the asp does't work plese guide me how can i remove this probleum...more >>

EnterpriseLibrary. Return Recordset from oracle stored procedure
Posted by Oleg at 7/13/2007 1:12:04 PM
Hi, I'm trying to use an EnterpriseLibrary 3.1 and return recordset from oracle database using stored procedure. As you may know, oracle stored procedures have out parameter of type cursor in order to return a dataset. It seems like I need to add a paramenter of type cursor to execute this ...more >>

Copying Rows from a DataSet
Posted by Brad at 7/12/2007 5:29:55 PM
Is there an easy way to copy rows from one data set to another other than field by field copy? Thanks Brad ...more >>


DevelopmentNow Blog