all groups > dotnet ado.net > february 2008
Filter by week: 1 2 3 4
Open file suddenly stops existing?!
Posted by Norman Diamond at 2/29/2008 7:10:12 PM
A file is successfully opened, partly read, and not closed, but suddenly it
stops existing? How does Ado.Net accomplish this result?
This seems to be a 100% repro on one file but 100% no problem on a different
file. Again how does Ado.Net do this?
// Sample dirName is C:\myDir and tableN... more >>
Is getting a column by name slower then ordinal?
Posted by Smokey Grindel at 2/29/2008 4:43:38 PM
If I am doing a very large loop in a data reader say 20,000 rows being read
in... now I need to read data so I am doing the
reader.Get[Type](reader.GetOrdinal("[columnname]"))... which seems like it'd
be slow doing that x number of times per row... is it better to use the
ordinal by itself? ... more >>
sqlBulkCopy
Posted by Beth at 2/29/2008 9:23:00 AM
Hi.
I have some VS 2005 VB.NET code that uses the writeToServer method of a
sqlBulkCopy object to write records in a dataTable to the SQL server.
The code works fine against our SQL Server 2000 database, but we get a
'login failed' error against 2005.
The DBA says the account on 2005 has ... more >>
2008 Express Edition missing Data drivers?
Posted by B. Chernick at 2/29/2008 8:41:03 AM
I just started doing some basic exercises with Visual Basic 2008 Express
Edition (Version 9.0.21022.8 RTM, Microsoft .NET Framework Version 3.5) and I
do not seem to have what I would call routine data drivers installed.
Initially, I only want to connect to a Northwinds db in my local SQL Ser... more >>
Returning the id of an inserted record
Posted by Nathan Sokalski at 2/29/2008 1:20:34 AM
I am writing an ASP.NET application, and am forced to use Access as my
database. I need a way to return the id (which is an AutoNumber field in the
table I am inserting into) of a record when I insert it. In SQL Server, I am
able to use a statement like the following:
INSERT INTO tablename ... more >>
How to solve DataSet Designer SQL errors?
Posted by David Carr at 2/28/2008 12:38:45 PM
Hi there,
I have writing easy to moderate SQL in the DataSet Designer and Query
Builder, using a Jet 4.0 connection to an Access 2003 DB. I am running
VB.NET 2005 sp1.
As soon as I try to do anything more than the most trivial SQL (e.g. simple
JOINs, more than 1 parameter other than in t... more >>
OleDbCommandBuilder insert query will not work? dataset to Access
Posted by gibbonas at 2/28/2008 7:38:05 AM
I am trying to take a very strangely delimited text file and put it into
access. So far I was able to get the text file into a dataset and figured
from there I could get it into access. I am trying to use the code below but
the insert query(oledbcommandbuilder) just will not work. I am work... more >>
timeout error
Posted by AVL at 2/28/2008 6:33:00 AM
Hi,
I've a method in my web service..which makes a call to db
and sends back a dataset..
the query takes 2 mins to fetch the results..by that time i'm seeing a
'operation has timed out error' on my screen..
is there any to get rid of this error?... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Problem with AdomdCommand with passing DataTable with DBNull in some cells
Posted by Nestor at 2/27/2008 7:57:16 PM
The following code would fail, with the error:
"The '' string cannot be converted to the double type."
when trainTable contains rows with DBNull in some of the columns.
How can I pass NULL to MSAS?
using (AdomdCommand comm = connAS.CreateCommand())
{
comm.CommandText = "INSE... more >>
Problem with AdomdCommand when Passing DataTable with DBNull's
Posted by Nestor at 2/27/2008 7:46:55 PM
The following code would fail, with the error:
"The '' string cannot be converted to the double type."
when trainTable contains rows with DBNull in some of the columns.
How can I pass NULL to MSAS?
using (AdomdCommand comm = connAS.CreateCommand())
{
comm.CommandText = "INSE... more >>
ORA-01406: fetched column value was truncated
Posted by onc at 2/27/2008 3:30:04 PM
Using data reader against one of my Oracle tables is crashing with following
error:
System.Data.OracleClient.OracleException: ORA-01406: fetched column value
was truncated.
This happens with Microsoft ADO driver to Oracle. Oracle ADO driver works
just fine.
Error happens only with some... more >>
Need some advice on my Deployment Pkg
Posted by Jim Richards at 2/27/2008 11:37:02 AM
Hello. Using XP Pro w/SP4 and VS 2003. I wrote my program with the
connection string and the path for loading the Maps as follows:
C:\MVB.NDbProJim\Ch7\ROE6AllRecords2\Maps. The Maps sub-directory containes
all 116 Maps of the Lots and also the ROE6.mdb database. But when I deplay
this app to... more >>
problem with excel
Posted by AVL at 2/27/2008 6:12:03 AM
hi,
i'm facing a strange problem..
In my requirement , I'm suppose to load the data from datagrid into excel
file.
make the required changes in the file and load the file back into the
datagrid.
i'm able to export to excel but after i make changes in the excel and load
it into
grid,... more >>
LINQ passing Array for a parameter
Posted by Chuck P at 2/26/2008 1:48:02 PM
I have a web page where a user can select multiple items for use in a select
statement. SELECT columns FROM table WHERE ID in (1,2,3). Since its a web
application I use a stored procedure to get the results.
Currently my sproc GetResults (@EventIdList varChar(@256))
uses a table value func... more >>
OracleDataReader Returns No Records With Nested SQL
Posted by b.pruitt@mindspring.com at 2/26/2008 7:34:07 AM
Hello All,
Can anyone tell why one sql statement works with the data reader but
not the other. To test, I uncomment the string I need.
Dim QueryString As String
***This string does not work
'QueryString = "SELECT * FROM print_server WHERE LS = (SELECT LS FROM
vw_turboinfo WHERE tsn = '08... more >>
IIS ASP.NET 2.0 Not creating a connection pool nor re-using connections
Posted by j.l.robinson@gmail.com at 2/26/2008 6:23:09 AM
I need some help!
I have a webapp in ASP.NET 2 running on 2003 R2 that doesn't seem to
want to bring up a connection pool.
When I run a trace on the DB server I can see Audit Logoff and Audit
Logon between query batches, which leads me to believe that this is
occurring.
This is a replace... more >>
datagrid to excel
Posted by AVL at 2/26/2008 12:48:01 AM
Hi,
I;ve a requirement wherein the need to export the data from grid to excel file
using .net 1.1..
While I do the export to file, sfew columns in teh excel file should be
locked,
in the sense..use shouldn't be able to edit the values in those columns...
is this possible thru C#? any samp... more >>
Can't add a new row to a database
Posted by walt@waltwhite.com at 2/25/2008 1:47:38 PM
Why won't this code add a row to my database? It runs as expected but
when I look in the SQL database using SQL Server Management Studio the
table is empty.
DataRow newRow =
this.dsHealthClub.NotInHouse.NewRow();
newRow["Name"] =
dsEmployees.Employees.... more >>
a problem about connect to access with ODBC
Posted by YEE at 2/25/2008 11:17:06 AM
System.Data.Odbc.OdbcConnection conn = new
System.Data.Odbc.OdbcConnection(@"Driver={Microsoft Access
Driver(*.mdb)};Dbq=C:\abc.mdb;Uid=Admin;Pwd=");
when invoke conn.Open(); the program throw an OdbcException
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and n... more >>
DataAdapter Solution with support for paging?
Posted by Frank Hauptlorenz at 2/24/2008 1:33:28 PM
Hello,
is there are ready component (maybe an data adapter) existing which has
advanced features like paging (with server cursors) but still allows
merging?
Thank you,
Frank... more >>
Must delcare the scalar variable
Posted by Tom Nowak at 2/24/2008 9:11:02 AM
I am running an Update routine that calls a function. It appears that the
function never executes because I receive:
Must Declare The Scalar Variable @Country.
Code:
Dim newCustomer As New Customer
newCustomer.CustomerID = customer.CustomerID
Me.PutCus... more >>
Incresase the Excution Time?
Posted by Husam at 2/24/2008 8:19:03 AM
Hi EveryBod:
I have an object cmd as SqlCommand object and and I face problem with safe
large data by using this object there is an errore appear tell me that the
excution time out.
Sombody can tell me how can I increase the Excution time?
I am using SQL server 2005
any help will be ... more >>
Attempt on SqlConnection.BeginOpen
Posted by steinmr@gmail.com at 2/23/2008 2:48:26 PM
I have a need for a SqlConnection.Open that times out in an
predictable matter (i.e. if the server does not answer, I do not have
to wait for TCP or NIC timeouts to find out). The "Connection Timeout"
in the connectionstring will not help, as this only applies to the
connection to the SQL Server... more >>
Disabling EnforceConstraints
Posted by John at 2/22/2008 9:59:40 PM
Hi
Is there a way to disable EnforceConstraints on a dataset? I have this
statement ds.EnforceConstraints = true in MyDataSet.Designer.vb but I am
reluctant to set it to false as the designer may overwrite the code.
I only wish to do it temporarily to speed up fill operations.
Thanks
... more >>
ADO.NET query execution much slower than SQL Management Studio
Posted by dustbort at 2/22/2008 1:25:33 PM
I have a stored procedure that when called from SQL 2005 Management Studio
takes less than one second to execute. The same SP, when called from .NET
code takes about 13 seconds. I am using a SqlCommand object with
CommandType set to StoredProcedure and I am passing arguments through the
parame... more >>
Populating data set on background thread
Posted by John at 2/22/2008 11:31:19 AM
Hi
I have a master data set. I need to populate a copy of this data set in the
background (via background thread?) and once filled to replace master data
set with the newly filled dataset. Is there a code example of this that can
see?
Thanks
Regards
... more >>
Filling a DataTable causing RowState to change in another table
Posted by michael at 2/22/2008 11:12:02 AM
I have 2 separate DataTables in a DataSet. These tables are in no way related
to one anohter with Relations.
When I Fill one table, it causes a row's RowState in the other table to
change from Unchanged to Modified. In the absence of editing the row! Can
anyone think of ways to figure out w... more >>
load flat file into datatable
Posted by georgejetson at 2/22/2008 9:03:02 AM
Anyone,
I'm looking for a way to load flat files into a datatable in vb.net (2005)
My flat files are tabbed delimited files with the field names on the first row
I could dump the data into a sqlserver via DTS and then query against a
table, but I'd like to figure out how to go directly fr... more >>
OleDB locks excel file
Posted by TB at 2/22/2008 6:21:27 AM
Greetings,
I use OleDB from my c# application to populate an excel sheet. I open
the connection in a using clause (which automatically close the
connection after exit) and the excel file is created.
However, I am not able to view excel file before I exit the
application. It seems that there i... more >>
How import data from SQL Server?
Posted by Bobby Edward at 2/21/2008 11:04:26 PM
What's the best way to import all the tables (w/data) from an SQL Server
database (in production) to my SQL Express database (on my local dev
machine)?
... more >>
Database access spped issue
Posted by John at 2/21/2008 10:04:58 PM
Hi
I have a terrible scenario. I had an ms access front end/back end app that
searched on partial strings. I have coded the app in .net (access backend)
and am using the below code to search on partial strings;.
daCompanyLocate.SelectCommand = selCompanyLocate
selCompanyLocate.CommandText... more >>
re-order a dataset
Posted by MattB at 2/21/2008 2:57:40 PM
Hi, I have a dataset (vb.Net 1.1) that I need to go through and re-order
based on the data. I'm wondering if there is a nice relatively automated
way to do this, but I kind of doubt it. There is not currently a single
field to use in a DataView's order by parameter.
The data has two fields th... more >>
Creation of table in database based upon ado.net database
Posted by Steven Paplanus at 2/21/2008 2:46:00 PM
Part of the application which I am building must support either Access or Sql
Server Databases. The code to generate the databases via sql scripts is
done. However, I have a set of tables (they will all have the same columns,
but have different results since they are doing seperate
calcula... more >>
Creating table in Access using C#
Posted by Johnny E Jensen at 2/21/2008 2:32:04 PM
Hello Group
I have made an application that can create Mail Merges with Word. The
application creates a WordTemplate and set the
Document.MailMerge.OpenDatasource's filename to a text (tab spe.) file.
Containing all fields and data to merge with.
I would like to change the MailMerge.Open... more >>
Using Access db for Membership provider
Posted by Bobby Edward at 2/21/2008 11:09:34 AM
Any step by steps (or web links) on how to easily use an Access db for being
the membership provider?
I am using VS 2008 and .net 3.5.
Thanks!
... more >>
Getting command from LINQ query
Posted by Chuck P at 2/21/2008 10:39:03 AM
I want to get a DataReader from a Linq Query so I wrote this Extension Method
public static IDataReader QueryToDataReader(this
System.Data.Linq.DataContext ctx, object query)
{
IDbCommand command = ctx.GetCommand(query as IQueryable);
command.Connection = ctx.Connecti... more >>
dbml error for Access database
Posted by Bobby Edward at 2/21/2008 10:12:10 AM
Created a new Access mdb file. Created a Data Connection in Server explorer
for it. Created a new "LINQ to SQL Class". When I try to drag/drop a table
into the designer I get this error:
THE SELECTED OBJECT(S) USE AN UNSUPPORTED DATA PROVIDED.
Any idea why? Thanks!
... more >>
What is Delphi dotnet
Posted by cosmos.magmt@gmail.com at 2/21/2008 2:29:29 AM
Dear Friends,
can somebody tell me what is delphi dot net.
Rgards
Sridhar... more >>
Tables and columns name can contain accented words?
Posted by Hornet77 at 2/20/2008 5:46:39 PM
In my language, Italian language, we have words with accent, for example
"città" or "perchè"; can I create tables or columns in sql server with
names that contain letters with the accent (i.e. "à" "è" "ì" "ò" "ù")?
Is this absolutely not recommended? Or is it an acceptable practice?
Thanks ... more >>
Getchunk & Appendchunk
Posted by Dan Reber at 2/20/2008 2:56:16 PM
When I used VB6 & ADO I used GetChunk & AppendChunk to get/save large image
data to SQL Server. In ADO.Net that is not available but I found the below
link and it describes what to use as an alternative. Looking at the code I
don't see how the data in saved/retrieved in "chunks", is it done ... more >>
Encrypting config files as part of a VS build event
Posted by DingoBoy at 2/20/2008 7:38:00 AM
Is it possible to create a post build event to encrypt my config file (which
holds my connection strings)? The reason I would like to do this is that
while we are developing I would like the developers to be able to see/modify
the connection strings appropriately, but when we do a release buil... more >>
Null Values eliminates the row?
Posted by jp2msft at 2/20/2008 6:26:02 AM
I have a TableAdapter linked to an SQL Server 2000 table. Some of the cells
have null string values.
In VS2005, I can preview the data linked by the TableAdapter in design mode,
and all fields are displayed - even the ones with cells containing null
values (they just show "null" in the cell... more >>
deleting rows with SQLCommandBuilder
Posted by David at 2/19/2008 8:08:02 AM
I have a task in an ASP.Net page that I think ought to work, but doesn't.
It's fairly straightforward. It's an event scheduling site, and I want a
user to be able to delete an event. When he clicks the delete button, it
posts back to the page with the event id for the deleted event in the q... more >>
DataRow problem please help
Posted by smtwtfs007@gmail.com at 2/19/2008 5:03:46 AM
Guys,
I have declared 2 dataRows and assigned New daraRows as below.
Dim aRow as DataRow
aRow = OutFormat.DataSet.Tables("demotbl").NewRow '*** Point 1
----
----
Dim bRow as DataRow
bRow = OutFormat.DataSet.Tables("demotbl").NewRow '***Point 2
---
---
bRow = OutFormat.Dat... more >>
setup/deployment is SLOW
Posted by doofy at 2/18/2008 1:01:44 PM
I've got a VB.net app that I'm loading up to a SSVR 2005 server. It was
created in Visual Studio 2008, calling upon 3.5 framework.
I created a setup file with the deployment wizard, and am trying to
install it on the server.
This thing is SLOOOOOOOOOOOOWWWWWWW. It's been a couple of hour... more >>
DataRow Issue Pls help
Posted by smtwtfs007@gmail.com at 2/18/2008 11:34:10 AM
Guys,
I have declared 2 dataRows and assigned New daraRows as below.
Dim aRow as DataRow
aRow = OutFormat.DataSet.Tables("demotbl").NewRow '*** Point 1
----
----
Dim bRow as DataRow
bRow = OutFormat.DataSet.Tables("demotbl").NewRow '***Point 2
---
---
bRow = OutFormat.Dat... more >>
oledb + access refresh problem
Posted by Vipper at 2/18/2008 4:00:02 AM
Hi,
I'm using ACCESS + oledb with ado.net 2 and I'm having this behaviour when I
execute the next sequence:
1. INSERT INTO customer ...
2. SELECT * FROM customer (I execute it inmediately)
But the change of step 1 doesn't refresh in step 2, . However if I execute
step 2 again after 1 o... more >>
DataView.FindRows out of range problem
Posted by Rami Prilutsky at 2/17/2008 8:31:36 PM
I'm binding the dataView to a dataset (~400000 rows) and sorting it by a key
(long type).
I'm retrieving values from the DataView with FindRows(object key) which
returns DataRowView[].
The problem is that rarely on Stress modes I get the following error:
Source: mscorlib
Message: Index ... more >>
SEHException on opening connection to Access database
Posted by David Hauser at 2/16/2008 6:11:44 PM
Hi
I moved an ASP.NET website to a new server an suddenly got the following
error when connection to my MS Access database:
"System.Runtime.InteropServices.SEHException: External component has thrown
an exception".
Searching the web and newsgroups for a solution I found several pages wit... more >>
Reuse of datareader
Posted by Vanny at 2/15/2008 9:13:52 AM
I tried to loop through the datareader to find some data elements one at the
time. The first time loop , it's fine. To avoid going to the database, I
reuse the same datareader to search for the next element. However, the 2nd
search starts from the place where I exit the loop, which causes t... more >>
|