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 > january 2007 > threads for january 15 - 21, 2007

Filter by week: 1 2 3 4 5

Reader ordinal problem
Posted by John at 1/21/2007 8:22:07 PM
Hi I am getting the System.IndexOutOfRangeException was unhandled error on the last line of below code; Cmd = New OleDb.OleDbCommand("SELECT [Last Staff Update From Site] FROM [Update Control]", LocalConn) Reader = Cmd.ExecuteReader() Console.WriteLine("{0}", Reader.GetOrdinal("[Last Sta...more >>


Unicode and long data type
Posted by Tom_Foran NO[at]SPAM BigFoot.com at 1/21/2007 4:33:39 PM
I have an application where a limited amount of Unicode data is being inserted into a long data type field by an AIX program. I have written a dotnet program that copies the data from one domain to another with parameterized data. Everything works except for the Unicode data in the long field. ...more >>

Accessing sql server behind proxy
Posted by John at 1/21/2007 4:17:51 AM
Hi My app is running on a windows 2000 server with isa 2000 installed. How can it access an external sql server (using its ip) from within the isa 2000 firewall/proxy via code? Thanks Regards ...more >>

Have alternative to CommandDataBuilder?
Posted by mtczx232 NO[at]SPAM yahoo.com at 1/20/2007 11:30:57 PM
I realize that Microsoft not intend to fix problems of Commandbuilder: +not deal with SQL calculated fields +not deal with Identity field to retrieve it and also cannot be inherit! there someone wrote Alternative? ...more >>

SqlCommand Parameters with SqlDbType and VarChar(MAX)
Posted by Zeke Jones at 1/20/2007 11:06:01 PM
If I have a field in MS SQL 2005 called "data" with type VarChar(MAX), how do I add a parameter using the syntax below if SqlDbType doesn't have a VarChar(MAX) type. If I use SqlDbType.VarChar will the value get truncated or is that what I should use? SqlCommand cmd = new SqlCommand(query, con...more >>

HowTo Convert Array to Binary
Posted by Scott at 1/20/2007 4:52:01 PM
I have an array of an array of doubles and need to save this as a single byte array. Then save this byte array as a BLOB to an SQL 2005 database. Array allocation code shown below: Array myArray = Array.CreateInstance(System.Type.GetType("System.Double[]"), 3); Double[] dblArray1 = n...more >>

Add array of rows to datatable
Posted by Jirí Neuzil at 1/20/2007 3:39:01 PM
Hi, I need to add array of rows to datatable. Have I use for cycle? Because Datatable can add only one row into collection. Thanks. ...more >>

SQL Concatenation (||), Query builder in VS 2005
Posted by Jirí Neuzil at 1/20/2007 11:13:37 AM
Hi, I need concatenate values of two fields in select command, but if I use this select command in Query builder in VS I get error. I concatenate two string values using SQL concatenation operator (||). It's a bug in Query builder? I think.... ...more >>



TransactionScope Questions
Posted by Rick at 1/20/2007 11:05:24 AM
Hi! I have a couple of questions about TransactionScope... What exactly is the scope of a transaction? Is it only connections that are created in the actual code block where the TransactionScope is defined, or is it all connections created on the same thread as the TransactionScope? What i...more >>

ExecuteXMLReader
Posted by Coder_Rajiv at 1/20/2007 2:02:00 AM
I have a Sql2000 Stored Proc. that returns the result in the form of XML. I am calling this SP in my .NET application(webservice) using ADO.net. Can you please suggest me if I should be using the ExecuteReader or ExecureXMLreader method? Also, what are the advantages of using ExecureXMLreade...more >>

There is no Original data to access when updating a DataTable with computed columns
Posted by Andrea Caldarone at 1/19/2007 4:22:25 PM
Hi all, this was driving me crazy! I've a datatable its related sqlDataAdapter, if I call the .Update method of the adapter everything is ok, but if I add a compute column to the DataTable (a columns computed via a DataRelation) I receive the "There is no Original data to access" ...more >>

best practice for data display
Posted by Rick at 1/19/2007 5:20:59 AM
VS 2005 designing a WinForm. I have a typical CUSTOMER, ORDERS, ORDERDETAIL database. I want to show these related items on a winform with either textboxes or datagridview controls. If I use the dataset designer to create a strongly-typed DS it will bring into memory ALL the records in ...more >>

How to Insert the date function in asp.net to sql serevr database <1167812246.168644.119680@n51g2000cwc.googlegroups.com>
Posted by ramu at 1/19/2007 3:39:44 AM
i have 3 dropdown lists.from this dropdown list to { }{day[first dropdown list],month[second dropdown list],year [third dropdown list]. how insert the day,month,year to sql server databse EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com...more >>

DataTable. Foreign key does not works.
Posted by c4p at 1/19/2007 3:31:51 AM
Hello to all. I have simple form with DataGrid binded to DataTable. DataTable has foreign key to itself. When I'm deleting one row it's child rows stay in Table. (It deletes only parent row, not child). Here is code: DataTable TestTable = new DataTable("Test"); TestTable.Columns.Add("...more >>

dataset fill brings all records?
Posted by Rick at 1/18/2007 6:12:58 PM
VS 2005 pro. I have a strongly typed dataset which I generate using the designer. From the xsd file I set the relations between the CONTACTS table to the ORDERS table to the ORDERITEMS table. Then I put some DataGridViews on the form and open. In the Load event of the form the Fill met...more >>

More efficient way of getting this aggregate data?
Posted by sherifffruitfly at 1/18/2007 1:01:58 PM
Hi all, Our database contains daily data going back for years, which I need aggregated into weekly averages. I came up with the code below to get it, but I don't like it - mostly because hitting the the database with a couple thousand queries feels wrong somehow. Is there a way to somehow s...more >>

setup master-detail tables
Posted by Rick at 1/18/2007 12:56:14 PM
VS.NET 2005 I'm not having an intuative experience trying to get the hang of how to setup a strongly typed master/detail relationshipe between tables. I have two tables CONTACTS with PK=IDNUM and ORDERS with a field CUSTNUM. Both tables have CommandStrings like "Select <field list> from T...more >>

Gridview deletion problem
Posted by Flomo Togba Kwele at 1/18/2007 8:59:22 AM
I created a form, a datasource (Product table from AdventureWorks) from the Data Sources tab, and dragged the Product table from the Data Source tab to the form's designer surface. This created a dataset, bindingsource, tableadapter and bindingnavigator. I placed the following code in the c...more >>

DataRowVersion.Original and RowState quesions.
Posted by Jon in Canby Or. at 1/17/2007 11:04:00 PM
I'm fairly new to ado.net, using SQL Server stored procedures, asp.net, and all that entails, so I'm sure I'm missing something simple and fundamental. Hopefully you can point it out to me. Ultimately the problem is I am getting an error: "There is no Original data to access." when trying to ...more >>

OleDbException.ErrorCode lookup
Posted by WebSnozz at 1/17/2007 11:29:37 AM
The OleDbException.ErrorCode is supposed to be an HRESULT. What scope of errors this HRESULT maps to. I tried: catch (OleDbException ex) { string test = ex.Errors[ex.ErrorCode].Message; } However, ErrorCode is a negative int and the indexer expects a...more >>

Reading a single field from table
Posted by John at 1/17/2007 10:35:29 AM
Hi I need to run a simple select query like below; select field1 from mytable where id = 123 and assign the returned value of field1 to a variable. What is an easy way to do this? Thanks Regards ...more >>

ADO.net Orcas Samples Install Problem
Posted by csharp at 1/17/2007 8:49:50 AM
I installed the August CTP, after the LINQ Preview. Everything installs correctly. I opened the solution in VS2005 and built it, everything compiled. I mapped a virtual directory to the installation folder of the webapp sample (on my machine - 'C:\Program Files\Microsoft SDKs\ADO.NET vNext CT...more >>

Fill-Method changing DBNULL-values to other values
Posted by Christopher at 1/17/2007 1:25:58 AM
Hi, i am writing a small interface to import some data from one database to an other database. unfortunately is the data in the source not very "nice". you have boolean-columns and those boolean-columns have as a default value DBNULL. it wouldn't be a problem if there was one boolean field, i...more >>

Creating Multi-directory Sites Using Multiple Projects In A Solution
Posted by Nathan Sokalski at 1/16/2007 10:23:12 PM
I have a Visual Studio Solution that contains multiple ASP.NET Projects. I do not want to put all of the pages (*.aspx files) in the root directory of my site, because that would be very disorganized. However, I am having trouble getting any projects other than the one that I place in the root...more >>

How to get field size from DataSet
Posted by douglas at 1/16/2007 5:37:07 PM
Hi, I dont know how to get the orginal DB column size from the dataset. Can anyone please show me the code for this? Many thanks Doug. ...more >>

GridView timeout - how to raise it?
Posted by Dariusz Tomon at 1/16/2007 3:14:03 PM
I have GridView1 attached to a SqlDataSource1 (everything done automatically via VS2005). The problem occurs after launching the page because timeout is risen. The question is how to increase the timeout limit using properties of SqlDataSource1 or GridView1 objects? Best Regards Dariusz To...more >>

TableAdapter.Update not working but no exception thrown
Posted by J055 at 1/16/2007 12:14:45 PM
Hi I can't figure this one out. I'm using TableAdapters quite successfully with the rest of my app but I have one where the insert just doesn't work when the TableAdapter.Update(TypedDataTable) is called. When I set the break point on the method I can see that it initializes the adapter ...more >>

Creating a new dataprovider
Posted by Christopher Painter at 1/16/2007 11:26:44 AM
I'm fairly new to ADO.NET, I've written a couple client/server applications that use the factory pattern in ADO.NET to work with MSSQL and Oracle databases. Beyond that I'm fairly green. My quest is to create a new community opensource project that consists of an ADO.NET dataprovider to comm...more >>

Timeout problem with SS2K, VS03
Posted by DCraig at 1/16/2007 11:18:30 AM
I'm working with SS2000 on Server2003, Visual Studio 03 on XP and getting a timeout issue that I cannot identify the source of. The specific message is "General error getting subscriptions" (or other table) "Timeout expired. The timeout period elapsed prior to obtaining a connection f...more >>

Which are valid options for System.Data.DataColumn.DataType?
Posted by roel.schreurs NO[at]SPAM gmail.com at 1/16/2007 12:43:26 AM
Hello all, I am a bit puzzled about the data type of the type of a System.Data.DataColumn in ADO.NET. When I try to Add a column to a data table, there are 5 overloads and one of them has the following hint: 2 of 5 Add(ColumnName As String, type As System.Type, expression As String) As Sys...more >>

Problem running query in code
Posted by John at 1/15/2007 8:19:04 PM
Hi I am using the below code to run a sql on an underlying access table; insStr = "INSERT INTO [Web Site Action Queue] ( Action, [Client ID], [Operator], Request_Date ) " & _ "VALUES (""Modify Client"", 93, ""Administrator"", Now())" Dim insCmd As New OleDbCommand(insStr, dbConContacts)...more >>

DataAdapter Fill Method Query
Posted by landers at 1/15/2007 8:12:25 PM
Hi All, I have a SQL Server stored procedure that return the results of two select statements e.g. SELECT * FROM first_table SELECT * FROM second_table The first_table has lots and lots of rows, so I only want to return the first 100 from any start point. However, in the second ta...more >>

DefaultValue vs. NoNullAllowedException
Posted by Bragadiru at 1/15/2007 4:40:20 PM
Hi, I defined in my Sql Server db a table with 2 int columns that don't allow null values + their default values are set to 0. I'm using a DataAdapter to read data, but it doesn't bring the default setting : using (SqlConnection conn = new SqlConnection("MyConnectionString")) { ...more >>


DevelopmentNow Blog