all groups > dotnet ado.net > february 2008 > threads for february 1 - 7, 2008
Filter by week: 1 2 3 4
Which protocol is used if not specified in connection string?
Posted by Ira Gladnick at 2/7/2008 12:28:31 PM
Say you have a SQL Server connection string in the following format,
where MySqlServer is a server connected a local network
"data source=MySqlServer; Initial Catalog=MyDatabase; Integrated
Security=FALSE; User ID=MyUserName; Password=MyPassword; Pooling=True;
Connect Timeout=50"
I am wonde... more >>
Any way to make OleDb read an Excel file?
Posted by Norman Diamond at 2/6/2008 7:40:30 PM
With Visual Studio 2005 SP1 and DotNet Framework 2 SP1, Excel 2003 can read
a file that was saved by Excel 2003, but the OleDb driver can't.
Example: Excel row 2 maps to row 1 in OleDb, and Excel columns 1 to 24 (A
to X) map to columns 0 to 23 in OleDb. Counting these in OleDb, row 1
columns... more >>
varchar(max) - SqlParameter
Posted by zorba at 2/6/2008 4:13:10 PM
I'm wondering how should I set up SqlParameter
in order to pass varchar(max) type values.
http://msdn2.microsoft.com/en-us/library/bb399384.aspx
suggests using "-1" as value for SqlParameter's size.
so:
command.CommandText = "select len(@p)";
command.CommandType = CommandType.Text;
Sq... more >>
Code for ADO.NET: The Complete Reference
Posted by Jim Richards at 2/6/2008 1:30:17 PM
Hello All. I am trying to use ADO.NET: The Complete reference by Michael and
Denielle Otey . I wanted to download the code from the publisher's (Osborne)
website BUT when I go to the Osborne website and enter this title into the
"Search For" space, it says it cannot find that book. I suppose i... more >>
Code for ADO.NET: The Complete Reference
Posted by Jim Richards at 2/6/2008 11:41:27 AM
Hell All. I am trying to use ADO.NET: The Complete reference by Michael and
Denielle Otey . I wanted to download the code from the publisher's (Osborne)
website BUT when I go to the Osborne website and enter this title into the
"Search For" space, it says it cannot find that book. I suppose it... more >>
syntax problem
Posted by bill at 2/6/2008 9:06:35 AM
All,
I have a C# app that is accessing an Excel spreadsheet using the
following:
OleDbDataAdapter metricDataAdapter = new OleDbDataAdapter("SELECT
* FROM [ReqReviewsData]", Connection);
This works, and I can read the ReqReviewsData range into my dataset.
Now I am trying to write t... more >>
What is the fastest way to update all rows of a table in a dataset
Posted by Stren Assaf at 2/6/2008 6:02:02 AM
Hello and thanks for your help :)
I have uploaded an xml into a dataset so now it contains a single table
filled with the xml values. I need to update one of the fields in all the
rows with a constant value.
What is the fastest way of doing it
Btw: I don not have a database to which I ... more >>
Problem connecting to SQL
Posted by Scott at 2/5/2008 1:55:38 PM
Hello,
I have several ASP.NET 2.0 sites That connect to a SQL 7 database. Up
untill a few days ago they had been functioning just fine . For some reason
all my SQL connections are returning the following error sporaticly:
----------------------------------------------------------
An err... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Renaming Excel Worksheets via ADO.NET
Posted by kurious oranj at 2/5/2008 3:58:03 AM
I've written a program to extract information from Excel Worksheets
over ado.net and most of it's working fine.
Is there a way to change the sheetname via ado.net?... more >>
Accessing data adapter in a dataset
Posted by John at 2/5/2008 1:05:45 AM
Hi
I am trying to access the data adapter for a table in a dataset as below;
MyDataSet.MyTable.Clear()
MyDataSet.MyTableTableAdapter.Fill(MyDataSet.MyTable)
But I am getting a 'MyDataSet.MyTableTableAdapter' is not a member of
'MyDataSet'. What is the problem and how can I access the und... more >>
Which is more expensive?
Posted by Mike at 2/4/2008 8:23:05 PM
Which is more expensive? Trapping an Exception to prevent duplicate entries
in a database, or using IF EXISTS in T-SQL?
Also, how would I go about testing which is more expensive myself?
Thanks
... more >>
Performance implication of Parameters
Posted by greg at 2/4/2008 10:08:01 AM
Hi.
I was recently talking to a colleague who uses SQL Server as a backend to
his applications. He mentioned that adding parameters causes SQL Server to
determine the datatype and can cause performance issues, unless you
explicitly specify the datatype.
Does this also apply to Oracle, an... more >>
How can I update a an entire table in a dataset?
Posted by Stren Assaf at 2/4/2008 9:13:04 AM
Hello, any help will be appreciated :)
I have a dataset filled with data from a database table. Now I want to do an
update command that will effect all rows in a specified table in this dataset
(something like: "UPDATE TableName SET RowName = RowName + 10")
How can I do it without executin... more >>
TableAdapter and IN Statements
Posted by Terry Wahl at 2/4/2008 6:12:02 AM
Hi,
I'm trying to configure a TableAdapter with an SQL statement fo the form:
Select * from SomeTable where ID IN "1,2,3,4";
Can I do this with a tableadapter?
Thanks in advance for your help!
Terry
... more >>
insert many rows from tableadapter (vb2005)
Posted by alex at 2/4/2008 4:55:01 AM
I have to insert a lot of rows from a tableadapter to a sql table.
The operation is slow because table adptert send a single insert command for
each row.
Is there any way to have it with only one batch command? Or a faster
solution?
Thank you
Alessandro
... more >>
Adding New Row, Set Value
Posted by Joe at 2/3/2008 9:46:12 AM
Hi,
I am using the BindingNavigator control on my WindowsForm.
When I click the '+' button, it appears that the program automatically
adds another row to the datatable in the underlying typed dataset -
fine.
I need to set the value for one of the columns
programmatically. ... more >>
Getting connection information from vs 2008 generated code
Posted by John at 2/3/2008 1:56:02 AM
Hi
I have developed a winform db app by dragging fields onto a form in vs 2008
i.e. I have not written code to open db connection myself and instead have
let vs 2008 generate that code under the hood automatically. My question is,
is there a way to get a handle to the db connection created ... more >>
Opening Access db via DAO in vb.net
Posted by John at 2/2/2008 11:52:00 PM
Hi
In my vb.net app I am trying to open a db via DAO as below;
Imports dao
Dim dbSynch As dao.Database
dbSynch = DBEngine(0).OpenDatabase("C:\MYDB.MDB")
The problem is that on the last line I am getting the error 'DBEngine' is a
type and cannot be used as an expression. What am I ... more >>
Parameterised query with an ms access table
Posted by John at 2/1/2008 9:52:44 PM
Hi
When using sql server, I can use a sql like below in my data adapter to send
the sql a parameter value;
SELECT <field list>
FROM <table>
WHERE Fieldx = @Para1
My question is, can I do something similar with an access db ie can I send a
parameter to a data adaptor s... more >>
T-SQL Return row affected count in CLR proc?
Posted by Smokey Grindel at 2/1/2008 12:27:11 PM
Is there a way to say to the caller just like an Insert/update/delete
command would do from a T-SQL CLR Stored Procedure how many rows my
procedure affected? I know I can push text down the SqlContext's Pipe as
messages but how do you say here is my rows affected count? thanks!
... more >>
Problems on adding a new dataset using MySQL via ODBC
Posted by Vanessa at 2/1/2008 5:14:00 AM
Hi all!
I am using Visual Studio 2008 and I am having problems on creating a
dataset. I have a MySQL database accessing through ODBC. On adding a new data
source, when I try to select a table on the database it gives the following
error:
<`database`..`table`>
Could not get column inform... more >>
|