all groups > dotnet ado.net > february 2006 > threads for february 15 - 21, 2006
Filter by week: 1 2 3 4
Access 97 Provider for ADO.NET 2.0
Posted by R. Ian Lee at 2/21/2006 8:45:07 PM
I'm building a .NET 2.0 app (C#) that needs to connect to an Access 97
database. I'm planning to use the Enterprise Library 2.0 Data classes to
make things easier. I can't figure out the correct configuration to use to
allow ADO.NET to connect to an Access database. This is my connection st... more >>
Bulk inserts into SQL Server 2000 from Flat Files
Posted by Jason Allred at 2/21/2006 3:23:12 PM
This is my first post, so if this has been addressed before, please excuse
my ignorance...
I'm writing a Window's Service in VB.NET to take information from flat files
that contain GPS information and subsequently save them to a SQL Server
(2000) database. I have created classes / collecti... more >>
Possible memory leak in SQLDataReader().
Posted by Ken Varn at 2/21/2006 2:31:28 PM
I have a managed C++ application that is exhibiting a memory leak. I
isolated the leak down to a section of code that basically uses a managed
ADO.NET SQLDataReader object. The leak seems to occur on the
ExecuteReader() call. I am calling this method over and over again at
fairly rapid interv... more >>
Need Help with the Next Step
Posted by Bernie Hunt at 2/21/2006 1:29:55 PM
I'm working on the learning curve between ADO and ADO.net. I'm stuck at how
to work with unbound data, vs data bound to a grid. All the start up
references I've found show how to connect data to a grid. I need to process
individual rows, row by row.
I have this working as my sample;
Pr... more >>
Datatable Merge query
Posted by Campbell Wild at 2/21/2006 1:08:13 PM
Hi,
I am trying a simple approach to updating a datatable.
I have a set query that I run on the database. This populates a
datatable, 'dtMyData'.
Every X seconds, I re-run the query and store in a separate datatable
'dtUpdated'. I then call dtUpdated.Merge(dtMyData). This successfully
... more >>
Generated update obviously fails on readonly field
Posted by chaprot at 2/21/2006 12:37:29 PM
Hi,
With VS 2005/NET 2.0, I add a datasource in my project, and the Dataset
Designer creates automaticaly the SELECT, INSERT, UPDATE and DELETE
functions/clauses.
BUT the UPDATE include all the fields of the table, included some read-only
or calculated fields. And thus, obviously, any a... more >>
Self Referencing Result Not Clean
Posted by Marty Cruise at 2/21/2006 12:19:29 PM
I am trying to load a table with a self relation, but can't seem to figure
out how to load only top-level parent rows at the top of the data hierarchy.
Instead, all rows are coming across to the top level of the hierarchy, as
well as their children (per the relation--this part is good). I fo... more >>
working with ascii character set in oracle
Posted by Dror at 2/21/2006 6:51:26 AM
Hello,
I have an Oracle 9i Database that work with WE8MSWIN1252 charset.
lately I'd migrate from VB6 to .NET and I Understood that the CLR is working
in Unicode.
Now I've got a situation when I retriving data (in hebrew) of the database
and I'm getting Jibrish instead of hebrew!
I do... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to use bind variables effectively for Sql performance?
Posted by Sunil Menon at 2/21/2006 6:25:55 AM
Dear All,
We are evaluating a few techniques to optimise our Sql statements
being executed at the database.
Scenario:
1. We have a WinForm application that creates Sql statements to be
executed.
2. We have an Oracle database 10g.
3. We plan to use either .net provided provider (NDP) or use... more >>
HELP!! - Data type mismatch in criteria expression
Posted by Bantha at 2/21/2006 12:24:09 AM
Hi i keep getting a "Data type mismatch in criteria expression. " error
with my asp page in thei sectionof code and i cant seem to find the
cause? can any one help
*******************************************CODE********************************************************
Sub Updatedatabase ()... more >>
HELP!! - Data type mismatch in criteria expression
Posted by Bantha at 2/21/2006 12:15:06 AM
Hi i keep getting a "Data type mismatch in criteria expression. " error
with my asp page in thei sectionof code and i cant seem to find the
cause? can any one help
*******************************************CODE********************************************************
Sub Updatedatabase ()... more >>
HELP!! - Data type mismatch in criteria expression
Posted by Bantha at 2/21/2006 12:14:37 AM
Hi i keep getting a "Data type mismatch in criteria expression. " error
with my asp page in thei sectionof code and i cant seem to find the
cause? can any one help
*******************************************CODE********************************************************
Sub Updatedatabase ()... more >>
Regarding Connection object behaviour
Posted by Mrinal Kamboj at 2/21/2006 12:00:00 AM
Hi ,
I am using OracleConnection object from Oracle ODP.net provider and
following is the behaviour which i am finding bit strange :
To start with , my argument is based on following facts :
1. Connection object is a reference type object .
2. All reference types are passed by reference ... more >>
Exposing Northwind on a Web Site
Posted by Oriane at 2/21/2006 12:00:00 AM
Hi,
what would be the simplest way to expose a database like Northwind on a Web
site ? I mean, give the Web user a way to display the provider of a region
knowing the region code... This would be a read-only web site. I would like
to take into account the authentication/authorization pb...
... more >>
Pivot can be use when creating TableAdapter
Posted by ad at 2/21/2006 12:00:00 AM
I use the new feature of TableAdapter of VS2005.
I want to use PIVOT in ths SQL when I create a TableAdapter, but it fail.
The system told me the PIVOT is not supported.
How can I do?
... more >>
InvalidCastException when fill dataset
Posted by infmpv00 NO[at]SPAM gmail.com at 2/20/2006 11:37:35 PM
Someone can help me to solve this problem in my code?=BF
This is the code:
private static DataSet executeQuery(string strConnectionString, string
strQuery)
{
try
{
DataSet dsResult =3D new DataSet();
OleDbConnection conn =3D new OleDbConnection(strConnectionString);
OleDbDataAdapte... more >>
TimeStamp field, help needed
Posted by Jim H at 2/20/2006 10:35:51 PM
I am attempting to update a Database Table thru a DataAdapter using a DataSet.
I get this error:
"Cannot insert a non-null value into a timestamp column. Use INSERT with a column list or with
a default of NULL for the timestamp column."
This is my table definition:
CREATE TABLE [dbo].[F... more >>
How to remove resource?
Posted by deko at 2/20/2006 8:47:55 PM
I'm getting a warning on build (VS05):
The file 'Resources\myGif.gif' could not be added to the project. A file
with the same path already exists in the project.
I've searched the entire project (including the Resources.Designer.cs)
looking for myGif.gif, but can't find it - at least not ... more >>
Parse, ToString, and "Null"
Posted by Chris at 2/20/2006 4:30:37 PM
I was thinking that these two methods should be inverses of each other,
but that doesn't appear to be consistently the case in MS code. Also,
I kind of think that Parse should not be case sensitive; 1e10 == 1E10.
For example:
try
{
on = OracleNumber.Parse("Null... more >>
Saving DataTable as XML
Posted by Praveen at 2/20/2006 4:16:38 PM
Hi All,
I was looking for a way to save the Different DataTables in a dataset as
differnt XML files. The WriteXML function is for Dataset and it saves all
the dataTables into one file. Is there any thing ready made.
Thanks in advance,
Praveen
... more >>
Losing Database Connectivity
Posted by Neal at 2/20/2006 3:35:50 PM
All,
I have a windows service which polls the database every 10 seconds
(10000 ms). When I change the frequency to 100 ms. After a few hours,
the Windows Service does not even connect to the database anymore, nor
does it throw any errors.
I'm closing my connections properly and I noticed ... more >>
Newbie: Can I save objects in a DataTable?
Posted by deko at 2/20/2006 1:49:47 PM
Can I save Array objects in a DataTable? If I can, I assume the Framework
has methods to serialize this out to XML. What I am trying to do is create
an in-memory database when a form opens, and persist it out to XML when the
form closes. The joker in the pack is that I need to save objects ... more >>
SqlCacheDependency Strongly Typed Dataset
Posted by chris at 2/20/2006 12:52:55 PM
Hello all,
Background: Using .NET 2.0, Sql Server 2005, SqlCacheDependency is
utilized successfully against SqlCommand objects elsewhere in the code
(in other words I have successful instances of using
SqlCacheDependency). ASP.NET website built in 3 separate tiers:
Presentation, Business Log... more >>
Generated Strongly Typed Dataset and AutoNumber
Posted by Remi NO[at]SPAM newsgroups.nospam at 2/20/2006 11:19:27 AM
Ive been struggling for hours on a very simple problem. How can I use the
VS2005 Dataset Designer generated strongly type dataset to insert many rows
into 2 two table linked together by a simple Parent/Child relationship?
I am using SQL server 2000.
The "Prime" table as an ID primary key, ... more >>
OleDBProNet 1.5.0.1 released for managing large rowset of records
Posted by Yuancai (Charlie) Ye at 2/20/2006 10:00:05 AM
Hi, All:
OleDBProNet version 1.5.0.1 is released at www.udaparts.com.
OleDBProNet is integrated with DataGridView with OleDBProNet. Binding
OleDBProNet with a DataGridView control becomes extremely easy. This is
great for navigating a large rowset using server cursor, and is much faste... more >>
Issue with returning Identity Number
Posted by Charles at 2/20/2006 9:11:09 AM
I have a procedure in vb.net that needs to insert records into one
table and use the new key value to is link with a transaction in
another. I have a stored procedure which inserts records in the first
table and returns the @@IDENTITY. I have a class which runs the stored
procedure and returns... more >>
Setting default Command Timeout
Posted by Olav at 2/20/2006 7:36:27 AM
Is there a way to set the the deault value of the command timeout instead of
setting the SqlCommand.CommandTimeout for every call to the database?
Either in my program or in SQL Server.... more >>
ADO.NET 2.0 & MSDE & Win98
Posted by Mircea Pleteriu at 2/20/2006 12:00:00 AM
Hi all,
I've implemented a .NET Windows Forms application with VS 2005 and .NET
Framework 2.0 which must be deployed on Windows 98 platform. The MSDE will
be installed on Win98 as the SQL Server to which the app will connect.
On the Win98 platform I've installed .NET Framework redistributabl... more >>
Fatal error 682 and SqlDependency
Posted by Efran Cobisi at 2/20/2006 12:00:00 AM
Hi,
In the web application my company is developing, we are trying to use the
SqlServer 2005 Notification Services feature to get notified about changes
in recordsets we query. Since our application server is asp.net, we
partially use its embedded support for that feature; in short, when our
... more >>
Fill Dataset with Multiple Tables
Posted by Robert Bevington at 2/19/2006 11:14:55 PM
Is it possible to fill a predefined dataset with all the tables of a
database without knowing what the table names are. The SQL string would be
something like this: SELECT * FROM *. I want write this in code and not
using the Visual Studio UI.
Just doesn't work for me.
Thanx for any help,
... more >>
Inserting large number of records are too slow
Posted by Yin He at 2/19/2006 9:20:27 PM
I am developing a tool to upload huge log files into SQL Server 2005.
The method I use is DbDataAdapter.Update() and I also set the
UpdateBatchSize property to 5000.
Wen I upload a 2M bytes log file, which contains about 30000+ records, to
the SQL server 2005, it costs about 50 seconds.
The s... more >>
Type 'ADODB.Connection' is not defined.
Posted by Joe Befumo at 2/19/2006 10:03:21 AM
I'm getting the following error in my application:
Compiler Error Message: BC30002: Type 'ADODB.Connection' is not defined.
Source Error:
Line 112: if(Request.Form("HdnQuestionCount") = 0) thenLine 113:Line 114:
Dim objDataConn as ADODB.ConnectionLine 115: Dim objRSList as
A... more >>
DataSet as argument for Sql server stored procedure
Posted by henk gijsbert at 2/19/2006 8:08:26 AM
Can I use a dataset as an argument for a SQL server stored procedure
that I want to call from ADO.NET?
... more >>
How to get meta data info in ADO.NET
Posted by CECIDer at 2/19/2006 12:59:27 AM
Hi,
We are developing a Windows Form application that try to retrieve the
Database Schema from MS SQL Server and Oracle. The application is developing
under Visual Studio .NET 2005 with the use of Schema API from ADO.NET 2.0.
With the use GetSchema() method of SQLConnection and OracleConnec... more >>
Readonly Connection
Posted by Bojan Kuhar at 2/19/2006 12:54:37 AM
Can one open a read-only connection or have a read-only command?
My application creates a SQL query depending on choice that user makes on
the form. I am afraid that somwhere down the line somebody will try some sort
of SQL injection and be able to manipulate data. I would like to make the
... more >>
Using Typed Dataset with Winform vs ASP.NET
Posted by David R at 2/18/2006 3:09:27 PM
Something doesn't make sense here.
I create a class library containing a typed dataset containing a single
simple SQLServer table. When I build it, and reference this in a new ASP.NET
project, I can use the ObjectDataSource to find the right object, link to my
DataSet1, and using the Table... more >>
SQL 2K5 AND VS.NET 2K3
Posted by Chris at 2/18/2006 12:39:28 PM
Is it possible to use VS.NET 2k3 to access SQL Server 2k5? Do you need any
special data access provider or will the built in provider work?
Thanks... more >>
Read only copy of DataSet
Posted by Praveen at 2/18/2006 9:27:19 AM
Hi All,
I wanted to get readonly copy of a Dataset instance. Dataset has a Copy
Function which can give me a give me a copy of the dataset but I did not
find a way to make it readonly.
I found a workaround like below is there a better way to do this ?
Thanks in advance,
Praveen
foreach(... more >>
Parent <-> Child Updates
Posted by Radi Radichev at 2/17/2006 6:29:55 PM
Hi!
I'm having trouble updating a dataset. So this ist my situation: I insert a
new data source in my application and it is a table from Access mdb
database. This table is related to another table in the database that i do
not include in my new dataset. When i update the dataset with:
this.V... more >>
Timeout expired - on a simple SqlDataReader:Read() call
Posted by CuriousGeorge at 2/17/2006 5:15:10 PM
I have a very simple .Net 1.1 app that I'm writing to upgrade our
applications database for a new version. This app has a pretty tight loop
where I'm using a SqlDataReader to walk through all records in a fairly
large table, manipulate the data, then write one of the columns back out.
The p... more >>
Strongly typed Datasets and DataView
Posted by Vayse at 2/17/2006 4:27:26 PM
I have two questions on this. I'll show my code first
'**********************************************************
Dim taEvents As New AssetsDataSetTableAdapters.HTEventsTableAdapter
Dim dtEvents As New AssetsDataSet.HTEventsDataTable
taEvents.Fill(dtEvents)
Dim viewEvents As New DataView(... more >>
Persist a dataset
Posted by Paul Ilacqua at 2/17/2006 4:21:56 PM
How do I persist a dataset to another procedure in a form IE
'Code
Public ds as Dataset
'Fill and use Dataset in LoadProjects but I want to use this dataset from
another sub in the same form class.
Private Sub LoadProjects()
Using objData As New OLEDBBase
ds = New DataSet
Try
... more >>
ExecuteNonQuery
Posted by Lorenz Ingold at 2/17/2006 1:41:08 PM
In .NET 2.0 I have the instruction
mySqlCommand.ExecuteNonQuery()
This throws an error, not the first time since object creation, but only
from the second time on. The error is (first in German, as our system is
German):
"-2146232060 .Net SqlClient Data Provider Die vorbereitete Anweisung mit
... more >>
Discover parameters using DAAB
Posted by Ravi Ambros Wallau at 2/17/2006 11:21:59 AM
Hi,
I am using Enterprise Library (June 2005) and, in the older version, we
could discover a stored procedure parameters set without calling it. It
seems to me that it's not possible to discover a stored procedure parameters
in this new version. I didn't want to use the ADO.NET DerivePara... more >>
DAAB Slowness issues in production
Posted by kevin.c NO[at]SPAM cox.net at 2/17/2006 11:17:25 AM
This is somewhat of an odd situation...but to make a long story short:
I built a test web application which inserts X number of records into a
table. It does this via a stored proc, shown here:
CREATE PROCEDURE dbo.spInsertTestData
(
@TestID uniqueidentifier,
@TextData nvarchar(100)
)... more >>
2.0 : DataColumn.DataType
Posted by John A Grandy at 2/17/2006 11:13:48 AM
I took this code right out of the VS05 docs , placed it in a method in a
separate class , from the page instantiate that class and call the method
..... error thrown:
using System.Data;
DataColumn dc = new DataColumn("Int32Col");
dc.DataType = System.Type.GetType("System.Int32 ");
Th... more >>
ImportRow() doesn't save changes to database table
Posted by mikus at 2/17/2006 7:42:26 AM
Can anybody help me please.
I'm new to VB.NET and I'm trying to import some data from SQL Server to MS
Access but cannot make it to work (note: I don't want to use DTS)
.....goes like this...
Dim daSql As New SqlDataAdapter("select * from table1", SqlConnection)
Dim dsSql As New DataSet() ... more >>
Creating menu in asp.net
Posted by Alok yadav at 2/17/2006 1:31:28 AM
Hi,
How can i create drop down menu in asp.net.
please help me is there any component freely available for it... more >>
Can't use DbProviderFactory in compact framework?
Posted by enantiomer at 2/17/2006 12:08:10 AM
I am using the DbProviderFactory in my services project (a class
library) to do all of my database interactions. I use this because
people may want to use a variety of different databases. I have been
using this for my windows forms project and it seems to be working
fine.
I am now looking ... more >>
Not able to configure Enterprise Library - January 2006
Posted by Deepson Thomas at 2/16/2006 11:00:27 PM
Hi,
Let me describe my environment. I am using Visual Web Developer 2005
Express with SQL-Server 2005 Express. OS is windows 2000 professional. IIS
which iam using is the inbuild one of "Visual Web Developer 2005 Express".
Now the issue......
I am trying to use the Enterprise Library - ... more >>
save a file in database
Posted by RbanBph at 2/16/2006 10:06:27 PM
Hello,
I want to save a file in database. How can I do this in vb.net? Which
datatype for the table I should specify for storing the whole file in it.
Thanks ,
RbanBPH... more >>
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Posted by googler at 2/16/2006 4:08:19 PM
Hi,
I get the message "Failed to enable constraints. One or more rows
contain values violating non-null, unique, or foreign-key constraints."
All the keys are intact and this problem pops up when there is a
dataset.merge(dataset).
The has errors gives false and the geterrors returns nothing... more >>
Using Ent Lib DAAB (1.1) with an SSL site
Posted by Alec MacLean at 2/16/2006 3:47:25 PM
Hi all,
Can anyone tell me if there are any extra configuration steps to using the
Ent Lib DAAB
in an asp.net app that's being run through an SSL connection?
(Framework 1.1, EntLib June 2005, VS2003)
Thanks.
Al
... more >>
Filling Dataset With a predefined XSD
Posted by Praveen at 2/16/2006 12:51:49 PM
Hello All,
I wanted to query database and make an XML using WriteXML function in the
dataset. When I use WriteXML function the XML structure is according to some
default schema. I wanted the schema to be defined by me (given below).
I tried using ReadSchema function before calling the fill fun... more >>
Join tables in DataSet
Posted by rh.krish NO[at]SPAM gmail.com at 2/16/2006 12:13:41 PM
Hi,
I have to join two table in a DataSet. I cannot do the join in
stored procedure as the data for the tables come from different
database servers. Data for table 1 comes from Sql Server, while data
for table2 comes from Oracle. Both the tables will have common column
to link with. Here is... more >>
What is the quickest/most efficient way to insert 100,000 Rows
Posted by Fiddelm3742 at 2/16/2006 10:50:29 AM
Well here is what I want to do. I'm writting an aplication that will run
through a data file, and either insert the records if they do not exist in
the database, or update them if they do exist. I'm inserting/updating over
100,000 records. The way I'm currently doing this is creating a temp... more >>
SqlDataSource: how to access internal data via code
Posted by Glenn Maples at 2/16/2006 6:10:27 AM
Guys- I hope this is a quck question but I've been playing with this for
several hours and getting no love. Thanks!!!
Assume I have a SqlDataSource after databind -- that is populated with data.
Is there any accessor to the internal state?
I presume that the state is in a DataSet or some... more >>
Advatages of Stored Procedures?
Posted by Sean at 2/16/2006 5:28:20 AM
Currently we are building SQL statements using strings and string variables
depending on users selections and then passing the SQL statement into the
command or connection object. I have been taught to use stored procedures
however I am unclear as to the specific advantages of using stored pro... more >>
Autogenerated dataset from a mdb access database
Posted by Alvaro Enriquez de Luna at 2/16/2006 4:05:15 AM
Hello everybody.
I have included an Access mdb database in my c# project. Visual Studio
2005 has autogenerated a xsd dataset (cs, xsc and xss files). My
problem is that, after making modifications in the mdb file directly
from access, the dataset doesn=B4t refresh in my program (in this case,
... more >>
Design query - inherited data structures
Posted by Toby Groves at 2/15/2006 11:11:33 PM
Hi, after a bit of advice here if possible.
I have an application which needs to store several different types of
"document". Each of these documents have many properties in common but
in addition will have some properties peculiar to themselves. In normal
class parlance, I'd have a base ... more >>
Sql Server SCOPE_IDENTITY()
Posted by Carlo Razzeto at 2/15/2006 8:35:57 PM
Hello, I'm currenly in the process of writing a Database abstraction class
that will support MySql, MS-SQL and OLEDB. In the abstract base class, I
have a public read only property LastAutoID UInt64 deffined. The field
behind this property is updated every time the end program calls the
Exec... more >>
Refreshing sqldatareader after read method [vb.Net]
Posted by Hardik Shah at 2/15/2006 5:06:34 PM
Hi,
I want to refresh (get first record) again after calling .read method once.
I give following command but second loop doesn't give any output.
While myreader.read ' myreader is a sqldatareader
console (myreader.item("field_nm")
end while
While myreader.read ' myreader is a s... more >>
Moving data from one dataset to another
Posted by SH at 2/15/2006 4:01:49 PM
What is the easiest way to move data from one dataset to another?
I have a web service that returns a dataset from a datasource. I then
want to move all the data in one datatable in that dataset to another
datatable in another dataset. (For instance, a table of Employees is
returned in the ... more >>
SQL syntax question
Posted by VB Programmer at 2/15/2006 3:32:14 PM
In SQL how do you combine several fields AS 'xxxxx'.
This type of syntax doesn't work
SELECT MyPhone & "-" & MyCity AS 'MyInfo' FROM XXXXX WHERE....
... more >>
"Business Objects" and the DAL
Posted by Steve at 2/15/2006 2:42:55 PM
I *still* can't get my head around this.
In designing a basic n-tier application, what exactly is the relationship
between the "Business Objects" and the "Data Access Layer"?
In the past when I have attempted to make an n-tier application, business
objects end up basically being a represen... more >>
DataAdapter: Maximum length SQL statement?
Posted by DjMark at 2/15/2006 12:47:29 PM
Hi,
I am trying to configure a dataAdapter in Visual Studio 2003, using the
wizard.
I tried using the SQL statement, "SELECT * FROM table"
When i preview the output in de Query builder everything seems to work fine.
But when i finish the wizard, i get an error: "There were errors generating ... more >>
An event was unable to invoke any of the subscribers
Posted by ss at 2/15/2006 12:20:02 PM
I am working with distributed transactions. When I open and close the
database
multiple times within one single distributed transaction, then the 11th
time
fails when the database is closed. I receive "An event was unable to
invoke any of the subscribers". Any help is greatly appreciated.
... more >>
Dynamically Adding Controls
Posted by micah at 2/15/2006 9:50:54 AM
I am somewhat new to the .net framework, and I am completely stumped on
something that I feel should be relatively simple.
1. I need to dynamically create controls on a web page
This is not a problem.
2. In order to format these dynamic controls how I want them, I first
decided to put the... more >>
What is the secure way to share data between Intranet and Extranet?
Posted by asdf at 2/15/2006 7:29:20 AM
Hi,
I have the scenario where I have one database and need to allow to see the
information accessible from Intranet and (future)Extranet. I wonder what is
the most feasible and secure way of doing it without buying second license
for MS SQL and duplicating data. So far I am leaning towards ... more >>
ADO \ ADO.Net
Posted by DylanM at 2/15/2006 5:51:06 AM
Hi,
We have an old web service that's written in VB6. It expects an XML document
that it can load into an ADODB recordset as follows...
set objADORst = Server.CreateObject("ADODB.Recordset.2.7")
set objXML = Server.CreateObject("Msxml2.DOMDocument.3.0")
Set objEDIMain = Server.CreateObjec... more >>
|