all groups > dotnet ado.net > june 2006
Filter by week: 1 2 3 4 5
Number of characters in "SELECT * from ExcelSheetName"
Posted by Gary at 6/30/2006 5:43:02 PM
I've got some perfectly fine code that works well for importing data from an
Excel spreadsheet into a .NET DataTable, except I discovered today that it's
cutting off any cell that contains more than 250 characters at that
250-character limit. Is that just the way it is, or is there some way a... more >>
Nested TransactionScopes
Posted by Steve B. at 6/30/2006 3:41:53 PM
Hi,
If I have something like this :
using(TransactionScope t1 = new TransactionScope())
{
using(TransactionScope t2 = new TransactionScope())
{
// Do something with SqlServer
t2.Complete();
}
// Do something else with SqlServer
throw new Exception(); // Just to make i... more >>
Setting column Width of new column
Posted by Sid Price at 6/30/2006 3:14:47 PM
I have an application that needs to add a column to one of its database
tables. I am doing this with the "ALTER TABLE" command and setting the new
column to have a width of 80. The query looks like this:
DBCommand.CommandText = "ALTER TABLE " & strTableName & " ADD "
& strColumn... more >>
GetSchemaTable not working correctly in SQL 2005/ADO.NET 2.0
Posted by Robert Bouillon at 6/30/2006 2:54:39 PM
I ran GetSchemaTable on every table in AdventureWorks, and a few tables
came back with bad meta-data.
For example, if you run GetSchemaTable on Production.BillOfMaterials,
BillOfMaterialsID has an IsKey value of false, which is not incorrect.
I know I can use catalog views to get the info I ... more >>
numeric field bound to a textbox control, wrong format
Posted by Fanor at 6/30/2006 11:02:56 AM
I have a textbox control bound to a integer field of a table.
Why when the value of the field is 0, the textbox. text show as "0.0000"
????
When I tried to cast this to a integer variable there is an error:
int j ;
j= int.Parse(textbox.text) //Error
which is correct because "0.0000" ... more >>
Probloaam with ODP.NET Bind Parameter in Oracle 8.16
Posted by mablao at 6/30/2006 10:50:20 AM
Hi,
I=B4m having a problem using Bind Parameter with Oracle 8.1.6
The same query runs ok on a Oracle 8.1.7 or later... but on Oracle
8=2E1.6 the first oracleReader.Read() statement takes a very long time
(10 minutes to fetch 440 registers).
The query is not too simple, it's use some joins and o... more >>
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
Posted by mark.norgate NO[at]SPAM gmail.com at 6/30/2006 7:48:06 AM
I'm using ASP.NET 2.0 and Windows Server 2003.
A common problem it seems, and I've followed all the advice on the
world wide interweb but I still get the following message:
Cannot open database requested in login 'verfiy'. Login fails.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
... more >>
What's wrong with this dataadapter update code?
Posted by Bmack500 at 6/30/2006 7:35:29 AM
This code never updates the underlying source database. What I'm trying
to do is iterate through a table, and make changes when I find the key
in another table (identical schemas). I would like to work with an in -
memory cache of the data to speed the performance; however, it's never
getting up... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Find Unique Values in a DataTable Column
Posted by Chris at 6/30/2006 6:52:02 AM
Hello,
I have a datatable with 330 rows of data. ColumnA has repeating values. I
would like to count the number of unique items in ColumnA. I looked into
using a dataview, but I'm not sure what to use for the rowfilter string.
Does anyone know how I can do this.
Thanks,
Chris... more >>
Using stored procedures in C# for postgreSQL using ODBC
Posted by nishi.hirve NO[at]SPAM gmail.com at 6/30/2006 3:36:55 AM
Hello,
I am writing one simple application in C# in which i m writing some
queries for retriving data from database. Database used is postgeSQL
which is used through ODBC.
I want to write queries using stored procedures, I don't know where to
write stored procedures for postgreSQL. I have... more >>
from Express to sql Server 2005
Posted by Dave Johnson at 6/30/2006 2:00:12 AM
how to transform a database from sql server express edition to SQL
Server 2005 !!??
thanks i am just new to this :)
Sharing makes All the Difference
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com... more >>
Your kidding me right?
Posted by Tony Van at 6/29/2006 5:26:01 PM
I'm a VB6 programmer trying to make the transition to .NET
I just spend many days learning about Datasets and
DataAdapters and
spend most of two days trying to code an UPDATE command for
the dataadapter along with the parameters for a large
rowset-- and a 1/2 day getting all
the typing ... more >>
Importing lots of rows :-)
Posted by Simon Harvey at 6/29/2006 3:50:29 PM
Hi All,
I'm not sure how to approach this problem so if anyone could advise me
how to do it I would be very grateful.
I have an app that calls a web service. The webservice returns an array
of business objects.
So I have a collections of objects that might be, say, 10000 objects in
si... more >>
Can't seem to speed up Rows.Add in DataTable
Posted by Bryan at 6/29/2006 3:40:15 PM
Hello,
I am trying to speed up the process for updating a datatable with new rows.
First of all I have 2 datatables, ServerTable and ClientTable, ServerTable
is from a remote datasource, it has new, and updated records in it.
ClientTable exists on the client. It needs the new/updated records... more >>
How to convert 'System.String' to 'System.Guid'
Posted by Arne Garvander at 6/29/2006 1:23:01 PM
prm = new SqlParameter("@passkey", SqlDbType.UniqueIdentifier);
prm.Value = stringvalue;
I got this exception
Invalid cast from 'System.String' to 'System.Guid'
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)... more >>
Using DataView.RowFilter with DateTimes including both date and time data
Posted by pnschofield NO[at]SPAM yahoo.com at 6/29/2006 12:44:07 PM
I've been scouring the Interwebs all day and can't find any
documentation on this. I have a DataTable with two DateTime columns
returned from an Oracle database. What I need to do is use a DataView
to filter the rows based on each of the DateTime columns matching two
DateTime values that I pro... more >>
little OT: DB design question
Posted by sklett at 6/29/2006 11:11:25 AM
I'm pretty new to DB design and wanted to run a question by you all.
I have normalized my schema to level 3 (I think) and I'm now finding that I
need to do many joins to bring all my different data together to model an
actual real world entity.
Here are some tables for example:
CREATE TAB... more >>
sql update slow
Posted by Chris at 6/29/2006 6:25:01 AM
I am having difficulty sending an update of 20,000 rows to an SQL server.
When I use sqlCommandBuiilder to create the update command the update takes
less than a minute. When I manually build the command and the parameters
the update is taking closer to 20 minutes. I have had the same ex... more >>
Querying through XML String
Posted by Baren at 6/29/2006 2:45:01 AM
Hi!
Throught code I will be generating a XMl like this "<ROOT><Employee
EmpID="137904" Name=""/></ROOT>". Now using this XML string as a parameter to
a store procedure, I want to retrieve the data matching the XML attributes.
Can anyone help me out in this regards
Baren... more >>
DataGrid in WinForm
Posted by Goh at 6/29/2006 12:00:00 AM
Hi,
How to make datagridview first row as a add new record row. result
only show in others row except first row.
any source to share?
Thanks in advance for any comment and tip.
With regards,
Goh
... more >>
How to specify the sort column of a GridView
Posted by ad at 6/29/2006 12:00:00 AM
I use a GridView to display data , the datasource of my GridView is from a
ObjectDataSource.
How can I specify the sort column?
... more >>
ExecuteNonQuery() returns -1
Posted by gallian NO[at]SPAM gmail.com at 6/28/2006 6:04:57 PM
I am trying to insert new records in table via stored proc
EMP_Calendar_SAVE_sp. There is no exception thorwn but RowsAffected is
-1. I have tested the store proc, it works fine. Any Help?
Code as below:=
Public Sub EMP_Calendar_SAVE_sp(ByVal EmployeeCode As String, ByVal
CalendarType As ... more >>
Problems with IDataRecord.IsDBNull
Posted by Chukkalove at 6/28/2006 2:41:31 PM
Visual Studio 2003. MySQL database.
The following code throws a "Unable to convert MySQL date/time value to
System.DateTime" when the column contains a null value
if (Reader.IsDBNull(nCount) == false) foo();
This has me stumped. I thought the function was there to test for this
conditio... more >>
SqlCommandBuilder not disposing of parameter list
Posted by Chris at 6/28/2006 12:41:03 PM
I am using SqlCommandBuilder to create an update command to update a table on
my DB of approx 20,000 rows and 10 columns. Unfortunately, I am detecting a
small memory leak using PerfMon to monitor Private Bytes and Working Set.
I am also using .NET Memory Profiler which is telling me that... more >>
transeferring data between databases
Posted by RZavulunov at 6/28/2006 10:03:18 AM
I'm trying to write a page in asp.net where i'll be able to do a mass
transfer of records from one table in the (Oracle) DB to another table
with a matching structure in a different db also in Oracle. Is there
any way i'd be able to do this by loading the records into a Dataset
and doing a mass... more >>
About VB.NET
Posted by harrypotter at 6/28/2006 9:32:49 AM
I'm a begginer in this field. So where do I start ? Can you help me to
find help tutorials ? I have downloaded VB Express 2005 package from
Microsoft . I want to go in a quickway.
... more >>
Layering in Windows Forms and Windows Forms for Heavy graphics
Posted by vikash NO[at]SPAM nagarro.com at 6/28/2006 7:47:05 AM
Hi,
I want to develop a windows based application using .Net 2.0
The application will have the heavy UI and it will have the lots of
drawing to do on the form.
So can any one give me the direction how can i handle the different
issues that will arise in the same due to paint event and due... more >>
unique Key constraint
Posted by Baren at 6/28/2006 6:17:02 AM
Hi! All,
I don't know whether this question fits into this forum or not> I just need
some help in regards to the below question.
I want to insert a unique key constraint on a column in an already existing
table which happens to have duplicate entries so that it doesn't check the
already ... more >>
Cannot connect to MSSQL2005 (Local) Server?
Posted by Asaf at 6/28/2006 5:24:03 AM
Hello,
I can't connect to MSSQL2005 Standard when providing (Local) for the "data
source=" property in the connection string.
When setting the computer name instead of (Local) it does connect!
Why I can't connect with (Local)?
Thanks in advanced,
Asaf
... more >>
Typed DataTable - NewRow() - Identity Field
Posted by TheMaxx at 6/28/2006 12:00:00 AM
ADO 2.0
When i do:
MyRow = MyDataTable.NewMyRow();
MyRow.IdentityField value equals last ID + 1
What if other user is doing the same thing and gets same ID
On DatatTableAdapter.Update both users will try to update with same ID.
I also did not expect IdentityField to have a value (or have... more >>
Grid view
Posted by sonali_aurangabadkar NO[at]SPAM yahoo.com at 6/27/2006 11:23:34 PM
I want edit whole grid on single button click
... more >>
Manage BLOB Data in SQL Server with UPDATETEXT during OnRowAdded event
Posted by Olivier Matrot at 6/27/2006 5:36:21 PM
Hello,
I would like to use UPDATETEXT in SQL Server to manage BLOB data the
efficient way. This topic is discribed in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconservingresourceswhenwritingblobvaluestosqlserver.asp
The problem with the sample is that, ... more >>
Group by on dataset tables
Posted by flavio at 6/27/2006 1:09:08 PM
can i group by data from a table in memory ,
like i filter or sort data by bindingsource object ?
thanks in advance
FLAVIO
... more >>
Move Column in Datatable?
Posted by Frank at 6/27/2006 11:54:01 AM
Is there a way to re-order datacolumns? Assume I do a "Select * from (insert
table here)" and insert the return rows into a datatable, so the exact
fieldnames and order of the fields are not known at runtime.
Assume I have to move a column called Duration to appear after the column
EmailAdd... more >>
Transaction Promotion problem
Posted by lestat.majere NO[at]SPAM gmail.com at 6/27/2006 11:02:02 AM
We are using SQL Server 2005 with Visual Studio 2005.
Both the server and client are 2003 Server SP1 with MSDTC enabled
(Allow Inbound and Allow Outbound, Mutual Authentication Required).
Windows Firewall is disabled on the client.
We are trying to use the System.Transaction.TransactionScope o... more >>
Parameterized Query
Posted by Nate at 6/27/2006 10:29:01 AM
I'm trying to use a SqlParameter for the IN operator in a T-SQL statement:
myCommand.CommandText = "SELECT CustomerID, CustomerName FROM Customers
WHERE AccountNumber IN (@accountNumbers)";
The problem I am having is that I can't figure out what to assign
@accountNumbers to:
SqlParame... more >>
UPDATE a XML file problem
Posted by Ina at 6/27/2006 6:14:12 AM
Good morning,
I have this code vbscript code for updata a xml file in to a database.
(sample) . I need to update a xml from a database1 to another
database2. As the results from the database1 generally changes a every
week, I need to export all the data to database2. I would like to
update th... more >>
ConnectionString in QueriesTableAdapter
Posted by Jan at 6/27/2006 5:43:01 AM
How can I change the ConnectionString in QueriesTableAdapter? I have some
queiries which returns scalar values in QueriesTableAdapter in DataSet, but I
am not able to change connectionString. How can I do that?
I know, I can create SqlCommand and set Connection manually, but after that
I ha... more >>
Thread safety of DataTable class - Filling on background thread OK?
Posted by Alan Cobb at 6/27/2006 3:35:47 AM
Hi,
The DataTable documentation says:
"This type is safe for multithreaded read operations.
You must synchronize any write operations."
So I should be able to do the following safely?
Create and fill a DataTable on a worker thread and then
pass that same DataTable object over to the ... more >>
SystemNullReferenceException using DataSet.Merge
Posted by Classgenerator at 6/27/2006 2:12:07 AM
Hi all,
i am using two typed datasets (based on the same Class) and get a
SystemNullReferenceException (Source: System.Data.dll / ResetIndexes())
when i try to merge like the following:
DS1.Merge( DS2.MyTable );
Then after handling the Exception DS2.MyTable is merged correctly into
DS1. Al... more >>
Multiple oracle homes - need to choose
Posted by bjansson NO[at]SPAM passagen.se at 6/27/2006 1:55:56 AM
I'm using the built in Oracle data provider and I am connecting to an
Oracle 9 database. The problem is that our customer has several oracle
homes and the default oracle home is an old version not working with
..Net. Since we can't change the default home I need a way to set what
Oracle home sho... more >>
Microsoft: Making a simple process impossible to use in .NET 2.0
Posted by Chester.West2 NO[at]SPAM Verizon.Net at 6/26/2006 6:18:15 PM
In previous versions of .NET (1.0/1.1), I was able to get the easily
able to get a count of items contained in a SQL table by creating a
dataadapter with a select command similar to the following:
SELECT COUNT(*) from <tablename here>
In .NET 2.0, when you run the wizard to you can generate ... more >>
DbDataAdapter.Update does nothing
Posted by Olivier Matrot at 6/26/2006 3:39:14 PM
Hello,
I'm having trouble inserting data in a table.
Basically, I'm adding a datarow to a datatable that was populated from the
datasource with an adapter.
Before calling the Update command, the datatable is added a new row
(RowState for this new row = Added).
After calling the Update Meth... more >>
Closing of data reader..............
Posted by Lowry Smith at 6/26/2006 3:29:28 PM
MyReader.ExecuteReader(CommandBehavior.CloseConnection)
I am using the above statement for the reader object. Closing of connection
object is taken care in the above statement. Do I have to close the 'Reader'
exclusively?
..Net 1.1.
Thank you,
Smith
... more >>
DataTable -> DataView -> Sort -> DataGrid : need related DataTable index
Posted by Diamonds at 6/26/2006 12:25:12 PM
Hello,
In my DataGrid for ASP.NET C#,
In the UI the user adds rows to the DataGrid and the values are saved
in a DataTable.
The DataTable is displayed by using a DataView. The DataView is sorted
then bound to the DataGrid.
The DataGrid allows editing. It knows which row to change based... more >>
GridView not showing inserted record
Posted by David at 6/26/2006 10:24:03 AM
I am using subroutine to add a record to a table that is bound to a GridView
via DataSourceID (SQL table). I have a link button to do this as I
sometimes need to do special processing. After the record is inserted, the
new record does not immediately show on the GridView and I'm not sure why... more >>
How can i change varchar to datetime
Posted by basulasz at 6/26/2006 6:38:02 AM
I have a datetime column in db that stores datetime in varchar format suct
that "20060616120621". I want to get this date in a datetime format to make
comparisions according to that. How can i do that with an SQL Query or c#
code?
Thanks... more >>
ExecuteReader question
Posted by Gary Howlett at 6/26/2006 12:00:00 AM
Hi,
Im using c# and sql 2005 to retrieve data.
What im trying to do is...
1) Connect to webservice
2) Open DB connection
3) Read & return 100 records
4) Do some process
5) Reconnect to webservcice
6) start now at record (currently 101)
7) Read & return 100 records
8) Loop 4
I dont... more >>
Simple Query Notification - Doesn't Work!!
Posted by דוד at 6/25/2006 2:16:02 PM
Hi,
I'll try to make it short, thing is - I'm trying to implement a query
notification (Sql Server 2005) in a C# Windows Application. I've been through
plenty samples and guides, I did everything and it still doesn't work.
The Service Broker is enabled (for the specific DB), the syntax is ... more >>
Can GridView bind to a standalone DataTable
Posted by ad at 6/25/2006 12:00:00 AM
I have a type DataTable, it does exist in a DataSet.
How could I bind this DataTable to a GridView?
... more >>
|