all groups > dotnet ado.net > july 2005
Filter by week: 1 2 3 4 5
Bulk insert
Posted by veera sekhar kota at 7/31/2005 10:43:01 PM
Hi,
I need to insert nearly more than 6000 records in a single shot.
For that I need to get the data from tree view (windows app) control,
Im reading through recursive mannner to get parent & childs and im forming
an xml file then sending to backend.
here to compose the xml file from tree... more >>
Incorrect syntax near the keyword 'DEFAULT'
Posted by Mark Findlay at 7/31/2005 7:51:04 PM
Hello Experts!
I am attempting to use the OleDbCommand.ExecuteScaler() function within my
ASP.NET C# web page to perform a simple validation, but receive the
following error:
"Incorrect syntax near the keyword 'DEFAULT'"
The form has 2 fields on it, called tb_username and tb_password. (... more >>
Distinct Values from a Datatable
Posted by (rbutch NO[at]SPAM coair.com) at 7/31/2005 12:08:35 PM
guys, Has anyone tried this before?
i have a dataset and rather than doing an addtional trip to the server with a DISTINCT sql query - i'd like to just loop thru the existing dataset in memory.
i assign that dataset (ds) to a datatable, declare a datarow and then use the select property to get the... more >>
Use datareader to get a value for UserNo
Posted by Assimalyst at 7/31/2005 9:05:25 AM
Hi,
I'm relatively new to ADO, so forgive me if I am going about this in
the wrong way.
I have a login.aspx page, with a textbox 'usernameTxtBx'
I would like to extract a value from a single table in an SQL database.
The database has two columns of interest usrNo and usrName, they are in
... more >>
Saving a dataview to a new dataset in C#
Posted by Dennis at 7/31/2005 12:00:00 AM
Hi, I am hoping I can get some help with a small problem I have run
into using C#. U have an XML file that I load into a Dataset and then
display this in a Datagrid. No problems doing this at all. I then use
a Dataview to filter this view using a keyword and I have no problems
with this either.
... more >>
Clearing dataset tables where they have relations
Posted by Earl at 7/30/2005 2:29:06 PM
I'm using a Public dataset in the module for all data throughout the
project. For most forms, this is great, no need to instantiate a new object,
just clear the datatables and reload as needed.
However, an issue arises where I have data relations in a form. Reloading
the data on those forms... more >>
Can rows be ordered in a datatable?
Posted by deko at 7/30/2005 10:09:02 AM
I have a DataTable that is bound to a DataGrid that displays a number of
selections from a product menu:
Item1 quantity price totalAmount
Item2 quantity price totalAmount
TAX - - - - - - - - - - totalAmount
TOTAL - - - - - - - - totalAmount
Each time the user makes a selection, the ... more >>
Check to ensure server and db available
Posted by Earl at 7/30/2005 3:07:28 AM
When I load the startup form, I want to make a check to ensure the named
server AND database (SQL2k) is available before trying to load any data. Any
recommendations?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to create and schedule full-text catalogue programatically
Posted by Dino Buljubasic at 7/29/2005 10:18:30 PM
Hi,
I have writen a database installation application that simply creates
tables inside a database. I also need to create and schedule
full-text indexing on some of my tables.
I am using SQL server 2000 and and VB.NET 2003.
Thank you,
_dino_... more >>
How do I connect to a FoxPro 6 .dbf file using OleDb?
Posted by Tony at 7/29/2005 4:38:06 PM
Does anyone know how to simply connect to a FoxPro 6 .dbf file using
ADO.NET's OleDb provider so I can query the data?
Mainly I need to know what the connection string is so I can execute a
query.
Thanks,
Tony
... more >>
Stupid bugs in ODP.NET 9.2.0.4.01
Posted by msnews.microsoft.com at 7/29/2005 4:10:32 PM
1. Execute this SQL
DELETE FROM ... WHERE ROWNUM=1 RETURNING a,b INTO :pa,:pb
with ExecuteNonQuery(), here a and b are number columns, and the two output
parameters' datatype is set to DbType.Int64, you are ok where there is row
in database, otherwise your app crashs.
2. Guess what th... more >>
Stupidly named field selection
Posted by Brad at 7/29/2005 11:16:03 AM
I am trying to work with and IBM AS400 OLE DB data provider and when using
the wizard, I am going along selecting my fields and setting a WHERE clause.
There is a field with a "#" at the end of it. As soon as I type this WHERE
clause, I have an error message about the syntax and I know that ... more >>
Interesting Problem regarding Parameters
Posted by Carlo Razzeto at 7/29/2005 10:20:55 AM
Backgroud:
My company is currently migrating to .Net from PHP for a number of reasons,
however we have one slight problem we would very much like to solve before
moving to .Net (ok, many but this one is a toughie).
Problem:
On our current PHP platform we have our own database abstraction clas... more >>
Interesting Problem regarding Parameters
Posted by Carlo Razzeto at 7/29/2005 10:07:00 AM
Backgroud:
My company is currently migrating to .Net from PHP for a number of reasons,
however we have one slight problem we would very much like to solve before
moving to .Net (ok, many but this one is a toughie).
Problem:
On our current PHP platform we have our own database abstraction cl... more >>
ado.net 2.0 and sql server 7
Posted by Juan M. Servera at 7/29/2005 9:38:05 AM
Hello, we are migrating our "old" .net 1.1 application to 2.0 and have
noticed that opening connections to a sql server 7 now is very very slow,
but this doesn't happen with sql server 2000.
Is there any workaround to speed up this a bit. Our application is now
unusable with sql 7.
... more >>
Capturing return value from SQL Server's stored procedure
Posted by Patrick at 7/29/2005 9:29:02 AM
Using Microsoft.Practices.EnterpriseLibrary.Data, how do I capture the return
value from executing a stored procedure on SQL Server 2000 (i.e., how could
I tell the Stored Procedure did not return 0 [indicating failure] or that a
transaction the stored procedure begun had been rolled back):
... more >>
Hoping some one here can help me, or at least point me in the right direction
Posted by Justin Lazanowski at 7/29/2005 8:25:56 AM
I know this dosen't really fit the category, but most of you ADO.NET guys do
some reporting at some point in time. If you know a better place for me to
put this let me know.
I have a Crystal Report that is external to my application. It uses an XML
file (also outside my application) a... more >>
Dataset constraints
Posted by Woody Splawn at 7/29/2005 8:05:51 AM
A question please.
Lets say I have a grid with its datasource as a dataset with three columns
in it; UserID (an auto generated ID), LastName and FirstName. Additionally,
lets say I want to restrict the user from entering two records with the same
last name and first name. I have created a c... more >>
CAPTION FOR UPLOAD CONTROL
Posted by gaetan NO[at]SPAM gmail.com at 7/29/2005 6:39:29 AM
Has anybody been able to figure out how to change the wording of the
word "Browse" in a file upload control?
It seems to be built in the browser and it doesn't seem like we can
change it.
anybody knows?
THANKS!
... more >>
= Null problem
Posted by Mahesh.V at 7/28/2005 9:21:53 PM
Hi
Am using ADO.NET connection from my ASP.NET application to connect to MS
SQL SERVER 2000. I have a Stored procedure which works fine when I directly
connect to the Database using Native drivers, the same is not working
properly when I use ADO.NET connection. When I debugged the Stored pro... more >>
Writing updates from a wide DataTable
Posted by Nigel Norris at 7/28/2005 6:40:27 PM
I have a DataTable with a large number of colums - 50 or more. I'm following
the recommendations to use stored procedures to apply updates to the
database, and using the Enterprise Llibrary. So I end up with a stored
procedure with 50+ parameters, and an Update statement that updates the same... more >>
Get the ID of the newly added row
Posted by Imran Aziz at 7/28/2005 2:00:53 PM
Hello All,
I am fairly new to ADO.net, I am using this simple command to add a new
row to the database, what I want now is to get the auto increment ID of the
row added, can anyone please help me with this?
strQuery = "insert into tblFeedChannels ....";
SqlCommand objCmd = new SqlCommand... more >>
ThreadAbortException at System.Data.SqlClient.SqlCommand.ExecuteRe (BIS)
Posted by Olivier BESSON at 7/28/2005 1:20:12 PM
Hello,
I resend the same question i previously sent because i did'nt used the good
reply-to address.
I'm having a ThreadAbortException and i don't know why.
When i launch the same code sometimes it never crash a the same place but
always in the proc. you find below.
If it can help, i'm us... more >>
newbie ado net questuon
Posted by Stephanie at 7/28/2005 9:23:51 AM
I am trying to get started with ado.net, coming from experience with ado. I
have a simple SQL Server stored procedure which inserts a row and returns
the value of the identity column for the inserted row (seel below).
I have a method in a C# project which is simply going to add a record and
re... more >>
Debug skips DataAdapter.Update code. Why??
Posted by Assimalyst at 7/28/2005 8:40:31 AM
Hi,
I'm attempting to input data into two related tables using stored
procedures. I found some good example code, which i have followed,
checked and double checked, but for some reason the update is not
happening.
Below is the code, it's pretty lengthy so to save you time i'll say now
that... more >>
Newbie help with relations
Posted by Nathan M at 7/28/2005 4:59:01 AM
Hi,
I have two tables in a dataset. I want to create a relation between the two
tables in which the child table can have foreign keys that do not match
primary key fields in the parent table. When the parent table is updated, I
want any related foreign key fields in the child table to be ... more >>
Newbie question about dataadapter parameter
Posted by Alphonse at 7/28/2005 2:17:38 AM
Hi,
I have a dataadapter that has 2 parameters. But sometimes I would like
to use only one of the parameters.
For example:
The dataadapter selectcommand would be like this:
SELECT CategoryID, CategoryName, Description, Picture
FROM Categories
WHERE (CategoryID = @CID) AND ... more >>
C# Prepared Statements
Posted by 5By5 at 7/27/2005 7:31:03 PM
Hi all,
Can someone point me to an example of prepared statements being used in C#
ado.net? the MSDN site has examples using VB and my documentation in VS 2005
says "to be filled in" or something equally useful.
thanks in advance,
Pat
... more >>
Passing Optional Parameter to Stored Procedure in VS VB.net
Posted by wk6pack at 7/27/2005 2:27:08 PM
Hi,
I'm trying to pass only the required parameters to a stored procedure using
the following code. I keep getting the following error now.
Running dbo."InsertEmployee" ( @pemployeeno = "888888", @S_I_N =
"123456789", @pfirstname = "Sam", @plastname = "Wise", @pmiddlename =
<DEFAULT>, @pprim... more >>
Validate a CSV file
Posted by J-T at 7/27/2005 2:04:28 PM
I have a CSV file which contains comma seperated data that I need to
validate against our database.I was thinking about loading that CSV file
into a Typed-Dataset which has our database schema in it and then try to
load the CSV file into that Typed-Dataset and automatically get all the
error... more >>
Filtering uncommited data ?
Posted by PL at 7/27/2005 11:49:53 AM
If I do a select query with the hint WITH (NOLOCK) are uncommited
reads marked somewhere in the dataset/datatable/datarow so I can filter them
out ?
I havent been able to find a flag to use for this.
Thank you
PL.
... more >>
SCOPE_IDENTITY won't return correct value, but @@IDENTITY does
Posted by Hardy Wang at 7/27/2005 10:35:30 AM
Hi all,
I have the following codes, but SCOPE_IDENTITY() just returns NULL to
me. If I comment out SCOPE_IDENTITY() line and run @@IDENTITY line, it works
fine!! Since I have a trigger on the table, I have to use SCOPE_IDENTITY().
Any ideas?
SqlConnection conn = new SqlConnection(co... more >>
Howto specify which DataTables of a DataSet will be stored with WriteXml?
Posted by Gordian at 7/27/2005 9:32:28 AM
Hello,
I would like to save a DataSet to xml-file.
But I only want to save some DataTables of the DataSet,
not all.
The DataSet.WriteXml(...) methods does not allow this.
Does anyone knows a workaround?
An additional requirement is, to store all DataTables in the same file.
Thanks
... more >>
Difference between DataTable.Clone ( ) and DataTable.Copy ( ) ?
Posted by Gordian at 7/27/2005 9:24:48 AM
Hello,
does anyone knows the difference between:
DataTable.Clone ( )
DataTable.Copy ( )
Thanks
Gordian... more >>
SqlParameter with ParameterName is not contained...
Posted by Phenom at 7/27/2005 9:12:01 AM
I'm receiving the following error when I try to use a stored proc in my
code:
SqlParameter with ParameterName '@unionRep' is not contained by this
SqlParameterCollection
I have searched several newsgroups and found similar situations, but so
far none of the solutions have worked for me.
*Not... more >>
Howto iterate over objects stored in one column of a DataTable ---- Or howto get an array, collection, ... of objects stored in one column of a DataTa
Posted by Gordian at 7/27/2005 8:25:19 AM
Hello,
I want to iterate over the objects stored in one column of a DataTable.
I can do it the following way:
---------------------------
foreach (DataRow dr in myDataTable)
{
// do something with the data in column 3
string s = dr[2].ToString();
}
---------------------------
... more >>
Unspecified error: E-Fail (0x80004005)
Posted by madxxx NO[at]SPAM irangate.net at 7/27/2005 1:44:18 AM
Hi All,
We connected with OLEDBConnect to oracle database in a asp.net and C#.
Database Server and WebServer is in a computer. This compputer is a Windows
2000 server with SP4 and installed Framework .Net 1.1 and IIS.
When i try to connect to database i get error:
System.Data.OleDB.OleDb... more >>
number of Columns in DataGrid (not DataSource!)
Posted by DraguVaso at 7/27/2005 12:00:00 AM
Hi,
I need a function that gives me the number of Columns shown in a DataGrid.
So I don't need to know the number of columns shown in tha DataSource,
because this number can be completely something else than the number of
columns defined in the currently active TableStyle!
I currently use D... more >>
SqlParameter error
Posted by tshad at 7/26/2005 11:51:07 PM
I keep getting this error when I am executing a Stored Procedure multiple
times.
The SqlParameter with ParameterName '@ApplicantID' is already contained by
another SqlParameterCollection.
Anyone know what causes this and how to fix it?
Thanks,
Tom
... more >>
Few Questions in C#
Posted by Silent Ocean at 7/26/2005 11:06:01 PM
Hi All
I have following questions regarding C# Assembly and Threading.
Let me know the precise answer or lead me to the proper materials.
1. Is memory leakeage possible in .Net Manager Code ?
2. Is memory leakage possible in .Net Unmanaged Code ?
3. How can I find the what % of memory i... more >>
Multiple Inserts and Identity problem
Posted by Jeronimo Bertran at 7/26/2005 4:43:13 PM
Hi,
I have created a data table using SQL Server 2000 which includes an
identity field
[CollectID] [bigint] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,
[Filename] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL
I am adding new rows to a typed dataset and ca... more >>
Comma delimited cells to lookup table
Posted by CyberBless at 7/26/2005 3:12:49 PM
I have a cell in a MSSQL database that has comma delimited values.
I.E. ( "1", "2", "3","4" ).
These values represent property types. I.E.
1 = 1-Unit
2 = 2-Unit
3 = 3-Unit
4 = 4-Unit
5 = Condo
etc...
Lets assume there is no "look-up" table (I've search some 50 tables so
far and could... more >>
business logic and data access
Posted by scottrm at 7/26/2005 3:51:02 AM
I am building an object oriented application asp.net application which is
accessing a relational database. I am a bit unclear as to the best place for
business logic to appear. My understanding (perhaps imperfect) of object
oriented methods is that the data and operations should be contained t... more >>
Select all DataRows of a DataColumn
Posted by Gordian at 7/26/2005 12:00:00 AM
Hello,
>> Context
VS2005 b2
DataTable.Select(string filterExpression)
>> Aim
I want to select all DataRows of a DataColumn.
>> What I tried
I tried the like-operator with wildcards* and %.
But the compiler misses the operand.
This behaviour is documented in msdn-docu:
"A wil... more >>
how to connect
Posted by Yoshitha at 7/26/2005 12:00:00 AM
hi
i want to connect to filemaker pro 6.0 through vb or vb.net applicationn can
anbody tell me how to connect .
i want connection string.
... more >>
Howto get the corresponding DataRow when clicking into a cell of a DataGridView
Posted by Gordian at 7/26/2005 12:00:00 AM
Hello,
I want to get the corresponding DataRow-object when I click into a
DataGridViewCell.
(The DataGridView is bound to a special DataTable in a DataSet)
Thanks a lot
Gordian
... more >>
PaintEventArgs becoming empty -> black screen
Posted by DraguVaso at 7/26/2005 12:00:00 AM
Hi,
To get faster performance of my DataGrid during scrolling I wanted to build
a timer in the Paint-event that waited some milli-seconds to Paint and
cancelled the method in case it received a new Paint (during scrolling).
But it doesn't seem to work :-(
The whole screen becomes empty, a... more >>
How to call a Stored Procedure in Oracle having Boolean IN paramet
Posted by JLo at 7/25/2005 11:14:01 PM
Hi Gurus,
I have a stored procedure which accepts boolean parameters as IN. In ado.net
the system.data.oracleclient does not have boolean data type when declaring
the parameter names.
Please advise what should be done and the possible workarounds.
I m in a tight position, and need a reply... more >>
RowFilter Question
Posted by Ron Ward at 7/25/2005 4:33:51 PM
In SQL Server, I can have the following statement:
select * from MyTable where (MyColumn & 0x0001) = 1
Basically any row with a 1 or a 3 in the MyColumn will return on this call.
If I load the entire table into a DataTable object and then attempt this
same filter by setting the RowFilter p... more >>
ado.net updatecommand
Posted by LC at 7/25/2005 4:11:27 PM
Ok...I give up.
I am coding my own ole data adapter. I have a table called "Savings"
which I am updating via a datagrid. I have the following code to set
up my update command:
-----------------------
// Setup Savings
//Update
uCmd =
new OleDbCommand("UPDATE Savings SET "
+... more >>
|