Groups | Blog | Home


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 > august 2006 > threads for august 8 - 14, 2006

Filter by week: 1 2 3 4 5

OleDB Stored Procedure returns Data Rows
Posted by DaveR at 8/14/2006 5:19:01 PM
I'm trying to Exceute a Stored Procedure with OleDB in C# I've looked all over the net and can't seem to find how to do it and have had minimal sucess: here is the sniplet of code i'm using: #region Create TieWindow DataSet DataSet dsTieWindow = new DataSet(); DataTable tieWindowTable = new Da...more >>

creating a folder
Posted by kamal at 8/14/2006 5:10:56 PM
Hi , when we accessing some application from the server then a folder has to create on the client system . When accessing the application from server the folder has to created on the client system at any where. Any solution. Thanks in advance. Regards, Kamal. ...more >>

change the database password (Access)
Posted by JohnK at 8/14/2006 4:26:02 PM
ok, ya got me, how do I change the database password via code?...more >>

Retrieving schema for a stored procedure.
Posted by Kevin Burton at 8/14/2006 1:47:01 PM
I am able to retrieve the schema for a set of stored procedures by running each of the stored procedures and then calling GetSchemaTable but I don't want to run the stored procedure if it is going to modify the database. How can I get the output schema for a stored procedure either without hav...more >>

refresh from DataGridView to bound DataSet
Posted by roybrew NO[at]SPAM att.net at 8/14/2006 12:33:37 PM
I can easily programmatically add a new row to a DataSet, fill the columns with the appropriate data and the new row is in the corresponding DataGridView is conveniently updated when the DataSet changes. Is there any way to do this in the other direction? That is, if the DateGridView is enable...more >>

Retrieving primary key of newly added record
Posted by jeff.ranney NO[at]SPAM gmail.com at 8/14/2006 12:01:14 PM
Hi all. I have three burning ado.net questions about using the DataAdapter.Update technique of updating data (rather than calling a stored proc explicty). I can't figure them out and I'm hoping it won't be too hard for some of you ado.net gurus out there! 1. Getting the PK of a new reco...more >>

newbie - simple Master/Details question
Posted by James Vickers at 8/14/2006 9:05:02 AM
Hi all, I am a bit of "noob" when it comes to using c#.NET datagrids, and always look at them in terms of what i could have done in VB6. I have been reading around, and understand the ideas and logic of DataSets, DataRelations, and DataTables. I understand how to populate a dataset, data...more >>

DBnull in dataTable.Columns.Add()
Posted by Adrian at 8/14/2006 12:00:00 AM
Re the code line: dataTable.Columns.Add("columnName",System.Type.GetType("System.[whatever]")) ; (I am working in c#) Can one add that null is / is not allowed? And, if so. what is the syntax? Adrian. ...more >>



HowTo: Updating Data in tables with an 1:n Relation
Posted by Caroline König at 8/13/2006 2:56:01 PM
Hi, I have a problem updating data in two tables which are related to each other. The parent table is called "Owners" and each owner can have multiple animals, standing in a table "Animals". "Owners" has a column "ID", which is it's primary key. In "Animals" there is a column "owner" wich is ...more >>

Cannot pass NULL to SelectParameters?
Posted by John at 8/12/2006 8:38:08 PM
Hi, I just cannot manage to perform a SELECT query with NULL parameter... My TCATEGORY table does have one row where TCATEGORYPARENTID is null (real DB null value). TCATEGORYID and TCATEGORYPARENTID are uniqueidentifier columns. My questions: - is Type="Object", below, necessary? - w...more >>

Oracle ODP.NET stored procedure help needed (PLEASE)
Posted by dave at 8/12/2006 7:50:01 AM
I am using asp.net 2.0 and the latest 10.x odp.net driver to execute an update stored procedure in Oracle 9.x. I have been getting the following intermittent error ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 1 It seems to run sometimes and not other times. I have been thi...more >>

Using queries in a table adaptor?
Posted by Michael D. Reed at 8/11/2006 4:16:01 PM
I have a data set called “ProductDataSet.xsd” that include several tables one called [Drive Packages] with 14 columns and several rows of data. The table adaptor attached to this is a table adapter called “Drive Package TableAdapter”. To this table adapter I have added several querie...more >>

Executing query with group by and aggregate on a dataset
Posted by sudarsan1980 NO[at]SPAM gmail.com at 8/11/2006 2:18:23 PM
i have a dataset which pull all the info into a table , now i want to use queries based on that table. as an example in the following query it has both aggregate and group by . is there a way i can execute such a statement on the dataset and retrieve data. if sample code is given will appreciat...more >>

Assign Null to textbox after deleting its content
Posted by Arend Jan at 8/11/2006 12:19:37 PM
Hi, I have a form in which the tableadapter gets its data from an access table. Suppose I want to delete a clients phone number. I select the text in the phone number field, and press delete. The field is now empty. When I try to call the update method of the table adapter, I get an OleDb ...more >>

Using Strongly Typed Datasets
Posted by ctilly NO[at]SPAM gmail.com at 8/11/2006 11:23:49 AM
I am interested in using strong typed datasets, but I am having some difficulty with some things and was hoping for a little clarification. I am using VS 2005 (.net 2) and I start off by creating a Dataset to my project called MyDataset.xsd. In my Dataset I added a TableAdapter called Prod...more >>

DataBind() Causes Connection Pool to overflow?
Posted by dwhalen at 8/11/2006 9:49:00 AM
Hello all. I have been debugging with a Connection pool overflow issue, and I'm seeing something very unusual. Using performance monitor, I am tracking the number of Current Pooled Connections. The number stays fairly low as I connect to the database, execute my query, and fill my DataTabl...more >>

Cannot remove Unique key from Typed DataTable.
Posted by arthernan NO[at]SPAM hotmail.com at 8/11/2006 9:24:42 AM
For some strange reason, which has the hairs of a bug. I created a new column on a DataTable which I first had placed in my dataset from the server explorer table. After I finished I realized that unknowingly I had added a unique key with it (maybe a UI problem in .NET) So I took out the key. ...more >>

The ConnectionString property has not been initialized.
Posted by archuleta37 at 8/11/2006 9:13:02 AM
My debugger is saying that the ConnectionString property has not been initialized. when I try to open the connection. My goal is to loop through an arraylist of objects (OrderModel) and insert a record each time. What am I missing here? using (SqlConnection conn = new SqlConne...more >>

SQL SERVER 2005 Data Type convertion to VB.NET 2.0
Posted by Flavio at 8/11/2006 1:22:24 AM
Hi guys, what i'm trying to do is to create a Dynamic class generator based on tables from a sql2005 database. To get the list of Colums from a specific table i Use: "select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'TableName'" and that query returns for a datatable all basic...more >>

Auto number generator
Posted by Rino at 8/10/2006 11:28:42 PM
Greetings, I am having problem with the following codes for some reason and I cannot figure it out where the problem is. However, what I'm trying to achive is to have a auto number generator for my quote form, so basically this generator would create a quote number that will change as new rec...more >>

Get modified colums only
Posted by Chris Karcher at 8/10/2006 4:46:36 PM
Is there a way to get only the modified columns of the rows in a DataSet? When calling DataSet.GetChanges() I'm getting the entire row, whereas I just want the columns that have been changed. Is this possible?...more >>

DBHelper.GetConnection
Posted by mc at 8/10/2006 4:39:38 PM
I have a class (shown below) used to save me retyping the Connection initialization code and other handy things, the Code Review tool in Ms Visual Studio is telling me that the I should "Change 'GetConnection' to a property if appropriate" Is it "appropriate"? TIA Mike public sea...more >>

BindingNavigatorDeleteItem
Posted by kvenkatu NO[at]SPAM yahoo.com at 8/10/2006 4:10:22 PM
Hello, I am trying to delete a row from a datagrid using BindingNavigator delete iterm. I added the following code in BindingNavigatorDeleteItem_Click(). This code only deletes the record from the datagrid, it does not delete from the database table. Private Sub BindingNavigatorDeleteIt...more >>

Database Design
Posted by MasterChief at 8/10/2006 2:22:31 PM
I am trying to make a document/training website. What I would like is for somebody to click on a job on the left, have it display all the programs/software that are available for that job and then once the program/software is selected it will display all the documents for that particular job/pro...more >>

ASP.NET with Datasets
Posted by nashak NO[at]SPAM hotmail.com at 8/10/2006 1:17:15 PM
Hello, ASP.NET pages are disconnected html pages i.e once page is sent to the browser, that is it. Let's say that I have a datagrid on my page and I have used a dataset to fill this grid only during the first visit to the page. My page loads displaying the data in datagrid. What is the stat...more >>

SqlDataAdapter.Fill exception in Release but not Debug Mode
Posted by TLentine at 8/10/2006 12:40:02 PM
I apologize in advance for the lengthy post, but any help or insight would be greatly appreciated! I've been having a problem with the SqlDataAdapter's Fill method while attempting to fill a dataset with the results of a query I execute against a SQL Server 2005 database. The exception only...more >>

Simple design Question
Posted by sklett at 8/10/2006 12:07:55 PM
I'm redesigning my application to use ADO.net and this is also resulting in a schema redesign - FUN! I have a fairly newbie design question; I have a table called Tbl_ProductInfo and it has fields like this: ProductTypeID ProductSN DateManufactured I have another table called...more >>

HowTo Delete related rows
Posted by sjoshi at 8/10/2006 9:28:46 AM
Hello All I have a DataSet with tables Customers, Orders related by CustomerID coln. Now Orders has a field "FixIt", if this is set to true, I need to delete that row. The possible scenarios are: 1. Customer_1 Order_1 false Order_2 true 2.Customer_1 Order_1 true ...more >>

Debugging SP's
Posted by Ant at 8/10/2006 5:30:02 AM
Hi, I'm using VS2003 I'd like to step into a stored proc by setting a breakpoint on a line in the SP design page. I have enabled SQL debugging in the configuration properties, but it still won't break at the break point. Do I need to do anything else? I have set the break point on a SELECT ...more >>

This sure is cornfusing ... connection woes
Posted by Earl at 8/9/2006 9:36:10 PM
SQL2005. New installation as a named instance on a local machine. Attached a database previously designed in SQL2000. My app calls for this database using integrated security. With SQL2000, no problems connecting and executing code against the db, including stored procedures. But with 2005...more >>

DataTable and Select
Posted by Thomas Kehl at 8/9/2006 8:48:29 PM
Hello. I have a DataTable which contains two columns (BEZEICH and PERSON_L). BEZEICH is of the type string and PERSON_L of the type byte[] (Property DataType of the columns). Now, I have to do a select on this Table. I try it on the fallowing way: oTable:Select("BEZEICH='test' and PERSON...more >>

System.Transaction performance with non SQL 2005
Posted by Peter Meinl at 8/9/2006 7:56:12 PM
Our customer will use transactions against single SQL Server 2000, 2005 and AS400 databases (no distributed transactions). I am evaluating using TransactionScope vs. SqlTransaction. Some internet posts say that with non SQL Server 2005 databases TransactionScope will always use the slower di...more >>

Change FormView.ChangeMode to Edit after Insert
Posted by J055 at 8/9/2006 4:31:13 PM
Hi I'd like to do the following with the FormView/ObjectDataSource but not sure of the best approach. 1. Change the FormView mode to Edit if a valid QueryString ID exists or Insert mode if it doesn't 2. If in Insert mode then when the form is posted it should get the new ID from the ins...more >>

Transactions with configured TableAdapters
Posted by Shimon Sim at 8/9/2006 3:49:46 PM
Hi I followed some walkthrough for creating Typed Dataset and TableAdapters. One thing I can't figure out is how to use transactions with generated Table Adapters. Any ideas? Thanks, Shimon ...more >>

2.0: ExecuteScalar returns null
Posted by RAM at 8/9/2006 1:09:43 PM
Hello, I am learning .NET 2.0. I am trying to call a stored procedure: SqlCommand cmd = new SqlCommand(); cmd.CommandText = "NextDocumentNumber"; cmd.Transaction = t; cmd.Connection = c; int n = (int)cmd.ExecuteScalar(); // here problem The problem is that ExecuteScalar returns null al...more >>

Sql injection and data adapters
Posted by jeff.ranney NO[at]SPAM gmail.com at 8/9/2006 11:59:25 AM
Hi all. My question, basically, is: if I do this, am I open to a sql injection attack? DataAdapter.SelectCommand = new SqlCommand("SELECT * FROM Users WHERE UserId = 1",ConnectionObject) //Let's assume for a moment that that sql string is not dynamically constructed and not susceptibl...more >>

DB2 - OLEDB
Posted by Jim Heavey at 8/9/2006 11:48:01 AM
I create a ".UDL" file on my desktop. I double click the ICON and supplied the connection information so that I could connect to DB2, I test the connectiion and I get a message that the connection was successful. Now when I take the connection string that this generates and paste that into ...more >>

DataSet en MS Access
Posted by Foef at 8/9/2006 9:19:02 AM
Hi, I'm using Visual Studio .NET 2005 and .Net framework 2.0 I have a DataSet with data from an MS Access database table. In the MS Access database is a tablefield with a Display Control. This Display Control is set as Combo Box. But when I look at the DataType in my DataTable it returns Sy...more >>

Cannot close OleDBdatareader/Connection on Sybase
Posted by Fassa at 8/9/2006 9:10:57 AM
Hi All, I've written this simple bit of code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sybaseconn As OleDbConnection Dim sybasecmd As OleDbCommand Dim sybaseReader As OleDbDataReader ...more >>

select performance, datatables or mssql2000 ?
Posted by Danny M at 8/9/2006 1:47:18 AM
I am making a pre- cluster tool. At the moment i am using a datatable to read the databases. With help of some rules i find the records that could be double records. I am using datatable.select to find the records a rules find and i add them to a new datatable with some point value to know wh...more >>

ado.net / execute reader / sp question
Posted by Gary Howlett at 8/9/2006 12:00:00 AM
Hi, I have a stored procedure which has a couple of input parameters and out parameters as below... If in C# .Net2.0 using SQL ADO.NET if I use ExecuteReader I get the results of the user table but if in the code i use cmdTest.Parameters["@Token"].Value; its always null. Basically can I ...more >>

NamedPipes error
Posted by Earl at 8/8/2006 11:53:11 PM
I have an app that connects fine to a SQL Server 2000 install using TCP/IP only. When I tried to connect my app to the same database on a new SQL 2005 installation today on a client's laptop, I got a "Named Pipes provider" error message. While I think I can resolve the SQL2005 setup on this ...more >>

Strongly DataSet with multiple DataTables filled?
Posted by Erik Funkenbusch at 8/8/2006 8:12:05 PM
..NET 2.0 VS 2005 I've got a remote database behind a firewall, I need to create a web service that returns a dataset populated with multiple DataTables (so I don't have to make several expensive soap calls). I have no control over the database schema, so I have to work with it as is. ...more >>

Adding ENUM column into a table (C#.NET)
Posted by John Carret at 8/8/2006 6:44:59 PM
I need users to be able to edit the database file created by my application in MS Access and I need to ensure they will enter suitable data only to prevent possible future errors. That's why I need to use ENUM typed columns. I don't know where the problem might be but I'm not able to add them int...more >>

Update DataSet definiton from Server Explorer
Posted by TheMaxx at 8/8/2006 5:15:52 PM
I use typed DataSet (drag'n drop from server Explorer from SQL Server 2000). Each time i modify a table i need to update the Dataset. I do it by deleting and adding a table again from Server Explorer. As project got bigger, and having many tables around this has become a very anoying task. ...more >>

Transform DataTables
Posted by Alex at 8/8/2006 2:44:02 PM
I need to transform a data table that would eventually be exported, E.g. The original table is as follows: ID fName lName 1 Alex Smith 2 Joe May I ...more >>

no value given for one or more parameters
Posted by cashdeskmac at 8/8/2006 9:18:02 AM
Hi, I know there are a couple of other posts regarding this matter, but I am using the simplest of statements, yet the get the above error. My code looks like this: OleDbCommand cmd = new OleDbCommand ("SELECT Name FROM Employees", Conn); conn.Open(); OleDbDataReader dr = cmd.ExecuteRea...more >>

Requesting SqlBulkCopy Advice
Posted by myusenetaccount NO[at]SPAM gmail.com at 8/8/2006 8:42:40 AM
Hello all, I'm looking for a bit of SqlBulkCopy advice for a web application that appends large amounts of data into an existing SQL Server table. SqlBulkCopy seems to be an excellent API for the task and it would replace existing code that basicly iterated over a DataTable, calling a SQL inser...more >>

web.config appSettings Store value with & character
Posted by Max at 8/8/2006 6:22:38 AM
hi i have stored my connction string in web.config as we do usually. code of web.confing is given below. check the password field contain "&" character. now when i run my application it gives error because value of ConnectionString is breaked at "&". So how to store value in web.config t...more >>

Multiple Values To Oracle Parametter Object (IN)
Posted by timburda NO[at]SPAM hotmail.com at 8/8/2006 6:18:10 AM
Here is the scenario: I am looking to execute the following query: SELECT * FROM TBL_USER WHERE USER_ID IN ( 1,2,3,4) Now, since in-line SQL is rightfully frowed upon, I am attempting to use parameterized SQL, but I don't know how to create an OracleParameter which can be used in ...more >>

How to fomat table columns as attributes rather than elements
Posted by moondaddy at 8/8/2006 1:32:49 AM
I'm new to .net 2.0 and I want to create a dataset using the designer where the table columns are attributes rather than elements. I could do this before in 1.1 but I dont see how in 2.0. Please advise. Thanks. -- moondaddy@noemail.noemail ...more >>

How to get cursor as return value of oracle function back with ole
Posted by Kent Liu at 8/8/2006 12:04:02 AM
I am using System.Data.Oledb, I have oracle function that return the result as REF Cursor: CREATE OR REPLACE PACKAGE GET_EMPLOYEES AS TYPE T_CURSOR IS REF CURSOR; FUNCTION GetEmployees (userID_in IN VARCHAR2 := NULL) RETURN T_CURSOR; ....... How to get the result back ? I've tried: Oledbc...more >>

Creating Access DB without ADOX
Posted by John Carret at 8/8/2006 12:00:00 AM
Is it possible to create a new Access database file without ADOX? I have to store an empty MDB file for further use now and I'd like to get rid of it. It would be great to create new database files when I need them. I do not like the fact I have to store the new MDB file somewhere. ADOX is not an ...more >>

Dates get rounded when passed to Sql Server with time component
Posted by Stanley Omega at 8/8/2006 12:00:00 AM
Hello, I needed to get the last day in the month. I used a very basic formula which essentially subtracted 3 seconds from the 1st day of the following month. This gave me a string like "#7/31/2006 11:59:57PM". I then passed this to an sql server parameter as its value for a query. ..Ite...more >>


DevelopmentNow Blog