all groups > dotnet ado.net > february 2008 > threads for february 8 - 14, 2008
Filter by week: 1 2 3 4
Fastest way to set a field value in a given table
Posted by Ralph Wiggum at 2/14/2008 11:39:37 PM
I have some vb6 ado code that needs to be upgraded to .Net:
Set rs = CreateObject("ADODB.Recordset")
rs.Open "SELECT fieldname FROM tablename WHERE id=" & anyId, oConnection
rs(fieldname).value = anyValue
rs.close
The operation will be repeated many times, so performance is crucial. I've he... more >>
Strongly-Typed DataSet Woes
Posted by Scott M. at 2/14/2008 11:04:34 PM
In ADO.NET 2.0, using VS 2005 Pro., I have visually made a strongly-typed
dataset by dragging a SQL Server 2005 table from my Server Explorer window
(where I've previously made a connection) onto a blank DataSet designer.
This works just fine, and a TableAdapter is generated as well. In code... more >>
wanna return the count(*) through SqlDataReader
Posted by John Naing at 2/13/2008 9:15:22 PM
Hi guys,
I'm writing a web service which return the count(*) from database.
pls guide me how to do that
with thanks in advance... more >>
Remove trailing spaces in string fields?
Posted by Philippe Requilé at 2/13/2008 4:03:40 PM
I use the ado.net IdxConnection to connect to an informix database.
Unfortunately every field of type String in the dataset has trailing
blanks.
How can I get rid of them?
(In DbExpress (Borland Delphi) I could put "trim char" in the
connectionstring.)
... more >>
ISNULL() to Integer?
Posted by Jonathan Wood at 2/13/2008 3:15:17 PM
Is there a SELECT syntax for returning 1 if a particular column is NULL, or
0 if the column is not NULL?
I found ISNULL(), but that returns the column if it is not NULL where I'd
want to return 1. I also found IS NULL but couldn't see a way to use that
either.
Thanks.
--
Jonathan Wo... more >>
DataTable Load Issue
Posted by Kurt at 2/12/2008 12:27:03 PM
Hi,
I am having some trouble with a custom IDataReader and the DataTable.Load
method when dealing with NULL data, specifically, if a data value is changed
in a loaded DataTable from say a double value of 56.23 to a NULL value, the
source is updated and the DataTable load is called again usi... more >>
SmallDateTime
Posted by Smokey Grindel at 2/12/2008 10:22:03 AM
I need to insert a date into sql server via a sproc the table has a
smalldatetime field... because we dont care about things before 1900 or
after 2079.... or the time for that matter... but when I instert a date into
the parameter like this
CmdAddRecord.Parameters.AddWithValue("@BillDate",
... more >>
Archiving data
Posted by Steve Kelley at 2/12/2008 8:20:41 AM
What is considered the correct way to archive a table from one database
to another i.e. myDataBase.mdb -> myArchiveDataBase.mdb. In the past I
have used "insert into myArchiveDataBase.Results select * from
myDataBase.Results where ..." This always worked in VB6 using Jet 4 but
database acces... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Concurrency violation errors
Posted by John at 2/12/2008 1:31:15 AM
Hi
During db development one of the most frustrating thing is the Concurrency
Violation error which seems to be a general error message for any error
during saving of record(s). How can one debug such an error and get more
specific information on the underlying reason for error and the
fi... more >>
Connecting - (local)\SQLEXPRESS
Posted by Miro at 2/12/2008 12:29:33 AM
Recently I had to switch out my XP machine with vb.2005 express and SQL
Express ( the computer died )
to vb.2008 Express with SQL Express and Vista.
The wierd part is, my microsoft book stopped working with the connection
strings from the chapters from the book.
By default this should wor... more >>
Operation must use an updateable query... while trying to write to Excel file
Posted by DAXU at 2/11/2008 9:35:01 AM
Hi,
I already searched old posts, but still confused.
I am a asp.net application and user "everyone" does have write and
read right to the excel file
public static readonly string sConnectionString1 =
"Provider=Microsoft.ACE.OLEDB.12.0;" + "Extended Properties=\"Excel
12.0;HDR=No; IMEX=1\"; ... more >>
Map datatable A to datatable B
Posted by moondaddy at 2/11/2008 9:26:28 AM
Using c# 3.5, I have a dataset (not strongly typed) where all the table
column names are a, b, c, etc. like the sample below. I need to rename the
table columns into something more user friendly such as ID, Name, StartDate,
etc... Also, this is something that will happen over and over with ... more >>
Connection Pooling nastiness
Posted by Nick at 2/11/2008 5:35:01 AM
Who can prove that the following cannot happen:
1. client A gets an ADO.Net/SqlClient connection from the connection pool
2. client A fires a TSQL batch (select a,b,c from x) at Sql Server 2K5
3. Sql Server goes to work but the are some locked resources
4. ADO.Net loses patience and times out ... more >>
Downgrading to vs2005
Posted by John at 2/11/2008 12:04:01 AM
Hi
Is there a way to downgraded a vs2008 project to vs2005?
Thanks
Regards
... more >>
'Repeating' a Stored procedure
Posted by Shane at 2/10/2008 4:35:17 PM
Hi all
Still trying to get my head around VB.Net/ADO.Net and have a question.
I can't work out how to 'process' a stored procedure multiple times.
In other words, in VB6/ADO I would do something like:
For i = 1 to 10
rs.Open "usp_Stored_Procedure '" & i & "'"
....process th... more >>
Incredibly slow writing by CSV driver
Posted by Norman Diamond at 2/8/2008 3:05:09 PM
Since my application uses the Excel driver to read some files, I used the
same Excel driver to write some CSV files. I also tried using the Text
driver to write CSV files. The results are correct but they take enormous
amounts of CPU time.
Of course I know how to write a CSV file using plain... more >>
Getting data as returned from SQL Server
Posted by Smokey Grindel at 2/8/2008 9:49:19 AM
is there anyway to get the data as it is returend from the sql server? I
have a command object that returns 100,000 records which I want to see as
they come back... kinda like how SQL Managment studio does when you execute
a query it shows the data as it comes in... any way to do that in ADO.N... more >>
How to put NULL into database column
Posted by Lubomir at 2/8/2008 9:43:03 AM
Hi,
I have a stored procedures that takes few parameters( lets say 2).
Parameters are value for particular columns.
A column of type "binary' can contain "null".
I want to update a row, so that first column will have some value and second
should contain null. How can I do it?
MyParam... more >>
Error connecting to Oracle
Posted by Robin9876 at 2/8/2008 8:37:17 AM
Using some .Net code to connect to Oracle the follow error message is
now being displayed
File or assembly name Oracle.DataAccess, or one of its dependencies,
was not found.
Exception Details: System.IO.FileNotFoundException: File or assembly
name Oracle.DataAccess, or one of its dependencies... more >>
Timeout in .NET but not in Management Studio
Posted by nok at 2/8/2008 1:02:04 AM
I have a SQL Server 2005 database which I use from ASP.NET 2.0.
I invoke stored procedures using SqlConnection, SqlCommand and SqlDataReader
from System.Data.SqlClient.
When I invoke a SP from SQL ServerManagement Studio it executes in 3 seconds
and returns 4000 rows.
When the same procedu... more >>
|