all groups > dotnet ado.net > may 2007
Filter by week: 1 2 3 4 5
Guid uniqueness and concurrency management.
Posted by BLUE at 5/31/2007 9:21:49 PM
A GUID is a 128-bit integer (16 bytes) that can be used across all computers
and networks wherever a unique identifier is required.
There is a very low probability that the value of a new Guid is all zeroes
or equal to any other Guid.
From MSDN we know that there is a possibility to have t... more >>
System.Transaction
Posted by Andrew Robinson at 5/31/2007 11:59:32 AM
I am receiving an exception while trying to use a TransactionScope. My code
is as follows:
using (TransactionScope scope = new TransactionScope()) {
equipment.Save();
status.Save();
scope.Complete();
}
This code is pretty basic and calls some dynamic sql updates using two
... more >>
What is the faster way to insert/buck insert rows into SQL Server
Posted by Hao at 5/31/2007 10:04:49 AM
I am developing a data center server in C#. We alaready have a legacy system
that worked with great performance. The old system was unmanaged code in C++
and used ODBC driver SQLBindParameter to bind the data in the memory before
dumping to the SQL Server. In the current C# version, I used the... more >>
SQL Injections and parameterized SQL
Posted by LtyChan at 5/30/2007 9:20:52 PM
This might be a stupid question - but can I be sure to avoid SQL injections
by using parameterized queries? Will SQL Server or ADO.NET kill any attempts
to drop or update data through sql injections (ei '; update ..... ;--), and
can see a log of any attempts somewhere (will SQL Server warn or ... more >>
DOWNLOAD CRACKED 2007's SOFTWARE: ARCHICAD 11,UNIGRAPHICS NX5,SOLIDWORKS 2008,XSTEEL 13,AUTOCAD 2008
Posted by William Eistenach at 5/30/2007 2:53:21 PM
Our team provide different types of services such as:
- proffessional cracking of any kind of software
(CAD,CAM,CAE,EDA,GIS,PCB,FEA,FEM,CNC,CFD,PDS,3D,Optics etc.) designed
for any kind of operating systems(Windows 95/98/ME/2000/XP, Linux,
FreeBSD, OS/2, MAC OS etc.)
- producing key... more >>
DataSet - Starting from scratch
Posted by Mark at 5/30/2007 10:04:00 AM
I have created a data entry form that will allow the user to enter in new
data. The form has a binding navigator control, a binding source control,
four label controls, four text box controls and one command button.
The first objective I’m trying to accomplish is the scenario where the
da... more >>
Selecting @@Identity from an Access Database
Posted by Marc at 5/30/2007 9:59:17 AM
Hi to the group.
I am at my wits end with this problem. I am working in Visual Web
Developer 2005, .NET 2, C#, MS-Access.
I have created a dataset (xsd) with some datatables in for interacting
with my database tables. I am attempting to create a new insert query
in a table adapter which wil... more >>
[.NET1.1] datarow and itemarray
Posted by Freddyboy at 5/30/2007 8:55:04 AM
hi,
I have an issue with datarow and itemarray.
In a datatable I have followong datas :
OPS 014E
OPS <NULL>
I perform a foreach on each datarow like this :
foreach(DataRow dr in aTable.Rows)
{
object[] o = dr.ItemArray
string s1 =
(o[0] != DBNull.Value) ? Convert.ToStri... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Connect to anothe database
Posted by Husam at 5/30/2007 1:40:01 AM
Hi EveryBody:
How can I connect to another database instaed of the default database
aspnetdb in the local SQL Server in the App_Data folder that exist in my web
site application ?
My database that I want to connect is in my local Machine and its name=Husam.
Any Help or redirection will ... more >>
DDL via ExecuteNonQuery()
Posted by timexsinclair2068 NO[at]SPAM hotmail.com at 5/29/2007 2:07:13 PM
I'm trying to run an ExecuteNonQuery("CREATE TABLE...") and I get a
-1. I'm using SQL Server 2000 and this has been happening since I
installed VS2005 (which also installed SQL Server 2005).
I'm starting to think it has to do with pemissions. Maybe SQL Server
2005 messed up with SQL Server 200... more >>
DataSet auto increment problem
Posted by Mark at 5/29/2007 11:02:01 AM
Hi Everyone:
I have set up a dataset that uses an auto increment field that is set to
start at minus one and step by minus one when I add a new record to the
dataset.
Example dataset:
1. Existing Record 1
2. Existing Record 2
3. Existing Record 3
4. Existing Record 4
5. Existing Record ... more >>
Lock confusion
Posted by shumaker NO[at]SPAM cs.fsu.edu at 5/29/2007 10:43:27 AM
I created a test case to exemplify an issue I'm having in a production
application. Below are the scripts. The confusion for me is that if
I run the statements with RepeatableRead isolation level in separate
transactions, then the select statement blocks waiting for the update
statement to com... more >>
Transaction problems
Posted by 4nd3r5 NO[at]SPAM gmail.com at 5/29/2007 1:35:32 AM
Hi All
I've got a problem with some transactionhandling. I have a dual server
setup: one webserver and one databaseserver. Because of the dual
server setup i have configured MSDTC (distributed transaction
coordinator) for the transactions. I have tested the setup with
DTCPing successfully:
h... more >>
Inserting rows into a Datatable fires two actions: Add and Change
Posted by Roger Tranchez at 5/28/2007 9:48:01 AM
Hello,
When I insert a new row into a datatable, the following event fires:
RowChanged, with the action DataRowAction.Add
So, within the sub that handles this event I call another sub to update the
datatable with its sqldataadapter (the update command only affects one
database table)
... more >>
Datareader to Datatable gets stuck...
Posted by jonefer at 5/28/2007 2:04:00 AM
The following Function used to return a DataSet.
After much reading regarding being able to use sorting within the table of
a gridview, I rewrote my function so that it returns a datatable.
All compiles well, but it always times out at the
'Dim reader As SqlDataReader = cmd.ExecuteRe... more >>
Results to textbox
Posted by backwards15 NO[at]SPAM gmail.com at 5/27/2007 8:41:17 PM
Hi all,
Just having a bit of trouble in returning the results of the SQL
SELECT statement to a textbox
This is only to return one row and i'm not sure how to get it to
display in the text box.
here is my code so far
Private Sub Btn_find_Click(ByVal sender As System.Object, ByVal e
... more >>
Failed to enable constraints
Posted by robert.ferkel NO[at]SPAM enterprise-computer.com at 5/27/2007 11:13:00 AM
Whenever I make a change to the definition of one of my SQL2000 tables
(just a length for instance) I have to run the data source
configuration wizard to remove the table and then rerun to add the
table back.
This of course always fixes the 'Failed to enable constraints' issue.
Is this the ... more >>
Connection pooling isn't happening?
Posted by Russ at 5/27/2007 6:59:57 AM
Hi there,
I've got a website that I'm trying to test using the MS Web
Application Stress tool, but performance seems to be really poor
(about 6 requests/second). I've done some testing, and it seems that
as soon as I drop any database requirement into the application,
performance instantly d... more >>
Dataview with calculate colums.
Posted by Nilkanth Desai at 5/26/2007 5:40:00 AM
Hi,
I am using a dataset with a table which contains following colums.
ccode barcode pcs weight
1 1 12 200
1 1 2 120
1 2 4 32
On above table I want to build a dataview which sums cols of PCs ... more >>
Finding the Text value of a column...
Posted by cc_crash at 5/25/2007 10:31:02 AM
Hello all, I creating a Temp DataSet and Adapter, populating it and then
doing an Insert to move data from this table back into the orginial table I
copied it from but with a new DATE. I have it all working fine so far but
when I get to trying to list the value of one of my columns (the most
... more >>
Connection string error Asynchronous Processing=true
Posted by staffan at 5/25/2007 12:00:00 AM
Hi
Maybe I have missed something easy but I cant get Async = true fo function,
I am getting the: "An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused
by the fact that under the default settings SQL Server does ... more >>
Timeout
Posted by Lubomir at 5/24/2007 11:59:00 AM
Hi,
My application sometimes conenct to database without any problems, sometimes
the next day I get frequently exception saying about timeout.
My connection string is:
Data Source=.\sqlexpress; Initial Catalog=MyMdfFile;Integrated
Security=True;Pooling=true;
1/
I think with this conen... more >>
Access FilterExpression problem
Posted by Scott Starker at 5/24/2007 11:44:55 AM
I am using MS Visual Web Developer 2005 Express Edition, MS Access DB, XP
Pro and IIS 5.1 on my local XP Pro.
What I want to know is how to set the FilterExpression which the parameter
is an integer (not ControlParameter). Right now I have:
AccessDataSource1.FilterParameters.Clear()
Dim p... more >>
Copy records, change date, save new...
Posted by cc_crash at 5/24/2007 8:40:03 AM
I am working with VB.Net 2005 going to an Access 2003 database.
I want to give my user the ability to copy a list of Orders (based on MR #
and PreviousVisitDate) to a new VisitDate when they are creating one. I have
everything ready but I am stuck on how to construct an SQL statement to do
... more >>
Carriage Return in DataColumn.Expression
Posted by JT at 5/23/2007 10:27:01 PM
Hi all,
When concatenating strings in a datacolumn.expression for a computed
datacolumn, is there a special character I can insert to specify that I want
a carriage return (Environment.NewLine) between two of the strings?
Thank you.
--
John... more >>
Non traditional database connections and datasets
Posted by Mike Mike at 5/23/2007 12:36:02 PM
I have an old COM Object that contains a link to a preparatory database. We
are using VS2005 VB.NET and are looking for ideas to work with it using the
new ADO data methods.
For example, our COM Object contains methods like, FirstRecord, NextRecord,
PriorRecord, etc. This COM object also c... more >>
Access 2007 Connection String
Posted by Alex Maghen at 5/23/2007 8:06:01 AM
Hi. I've been using Access 2003 (.mdb files) from ADO.NET for a while now.
I'd like to start connecting to the new .accdb files instead.
I've tried using the same connection string but changing the file name to
end with .ACCDB. It looks like:
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;... more >>
problem in using autosproc !!!
Posted by Nuzi at 5/23/2007 3:08:44 AM
i m using autosproc, which uses reflection to dynamically gernerate
wrapper classes.
i m getting exception when i m going to create instance of that class
which implements the interface(it is dynamically generated class)
"
sprocFactory.CreateInstance(typeof(interfaceName),DBprovider.sqlserver... more >>
unique string column on DataTable ?
Posted by Richard Chandler at 5/23/2007 1:59:00 AM
Hi All,
I'm trying to make the following code not throw an exception ... (C#, .Net
2.0)
System.Data.DataTable tab = new System.Data.DataTable();
System.Data.DataColumn col = new System.Data.DataColumn("one",
typeof( System.Data.SqlTypes.SqlString ) ) ;
... more >>
viewing datatble data in the watch window
Posted by Jerry J at 5/22/2007 1:11:00 PM
Is it possible to view the data contained within a datatable in the watch
window?
I have been finding it quite inconvenient that I haven't been able too.
--
Jerry J... more >>
Add table prefix programmatically
Posted by Lupus at 5/22/2007 8:09:22 AM
Hi!
I'm working on a webapplication which uses some SQL tables. In some
cases, we need to install different versions in one database. That's
why we add prefixes to all tables (iee. cl1_users and cl2_users).
At the moment we add %PRE% in the querystring. The DAL performs a
simple replace() t... more >>
Custom Software Development
Posted by VB at 5/22/2007 4:10:36 AM
iTechArt Group - Custom Software Development and Offshore outsourcing
Company
http://www.itechart.com/
Offshore custom software development company iTechArt - Web site and
Content Management Solutions development, CMS consulting: Ektron,
Drupal and DotNetNuke
iTechArt Group provides high... more >>
SqlConnection error handling
Posted by Ryan at 5/21/2007 11:32:52 AM
Using VS 2005, I created data adapters using the IDE. I store a
connection object in My.Settings (cool feature) collection. What I'd
like to do is seemlessly changed my connection on the fly. Say for
instance the production server is down due to network or server hang,
the applicaiton should ... more >>
Field data type in VB.net
Posted by Vanny at 5/21/2007 9:58:21 AM
How can we find a Field data types from DataReader/Dataset/Datatable in
VB.net ??? For example code in VB6 where rstRecName is a recordset and j is
a column index:
If rstRecName.Fields(j).type = adLongVarChar Then
(do something)
end if
Thanks for your help
Vanny
... more >>
TreeView
Posted by Gerhard at 5/21/2007 8:30:00 AM
I have a table that I would like to display in a tree view. The table has
parent/child relationships (there is a primary key, and another field that
points to the parent's primary key). This table is in an SQL Server database
(2005). The table is essentially an organization structure (CEO w... more >>
DBConcurrencyException Not Thrown For INSERT Command
Posted by Simon at 5/21/2007 6:03:53 AM
In ADO.NET 2.0, it seems that when the TableAdapter (or its underlying
DataAdapter even) doesn't throw a DBConcurrencyException when the
InsertCommand SPROC returns Zero Rows Affected.
The MSDN Documentation Says:
"The DataAdapter examines the number of rows affected by the execution
of eac... more >>
SqlDataAdapter, SqlConnection, SqlCommand - Thread Safety
Posted by rfw68 at 5/21/2007 5:58:00 AM
Hello,
I'm using a lot of threads, each one using it's own instance of my
TableAdapter, Connection and DataTables. But all of them will access the same
table at the same sql server maybe at the same time (optimistic concurrency,
etc.)
I found the following in the Documentation:
Any publ... more >>
SqlCommandBuilder and optimistic concurrency
Posted by KShvats at 5/21/2007 12:00:00 AM
Hey ya,
Using .NET 2.0 and SqlCommandBuilder, say I have a customer row, with an
address and name fields. I need 2 different clients to be able to change
1 field each and not get ConcurencyExeption on 2nd Update(). Is it
possible to do?
Thanks... more >>
How do I tell if the Oracle client is installed
Posted by David Thielen at 5/19/2007 4:36:00 PM
Hi;
The class OracleConnection is part of .NET and so is always available.
However, it does not work if the Oracle client software is not installed on a
user's system. How can I test for that being installed so I don't offer
Oracle as a choice if it can't be used?
--
thanks - dave
dav... more >>
AccessDataSource not working
Posted by Scott Starker at 5/19/2007 2:37:18 PM
I am using MS Visual Web Developer 2005 Express Edition, MS Access DB, XP
Pro and IIS 5.1 on my local XP Pro.
Why does this work:
<asp:DropDownList ID="cmbcboFiltLanguageID" Style="z-index: 201; left:
640px; position: absolute;
top: 155px" runat="server" Width="377px" Height="20px" BackColo... more >>
"DataSet.Merge()" simple problem
Posted by Mark Chambers at 5/19/2007 10:29:55 AM
Hi there,
Can anyone explain the following (very) simple scenario.
1) I make an exact copy of my "DataSet" and delete one record from a given
table (in the copy)
2) I invoke "DataSet.GetChanges()" on the above copy and pass the results to
"DataSet.Merge()" on the original copy
3) If I no... more >>
Getting next autoincremented id from typed DataTable
Posted by RipT at 5/18/2007 1:41:01 PM
What's the alternative to the following?
void m_BindingSource_AddingNew(object sender, AddingNewEventArgs e)
{
MyTypedDataSet.TypedTableRow newRow = this.m_DataTable.NewTypedTableRow();
this.m_DataTable = new MyTypedDataSet.VendorsDataTable();
DataRow[] existingRows = this.m_DataTable.Select(... more >>
DB Design
Posted by AMDRIT at 5/18/2007 11:46:16 AM
Got a puzzler for anyone wanting to take on a challenge.
I have some data, which represents something like an insurance policy. The
customer may call up and change the level of coverage at any time. These
changes may or may not produce a change in premium but may produce a change
in legal ob... more >>
DSN Connection for Microsoft Access in ASP.NET
Posted by Sandeep Gupta at 5/17/2007 9:45:54 PM
Hi,
I want to use a DSN connection to connect to MS Access Database. The
ODBC DSN has been configured as MIT.
I use the following connection string to connect (using VB.NET):
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
DSN=MIT")
This throws up an error: Could not fi... more >>
create a data provider
Posted by Klemens at 5/16/2007 5:03:03 PM
I would like to create my own data provider in .NET which is able to
deliver data to all apps supporting oledb or odbc. Information about
this is very rare in the Web. Are there any code samples around or
books from which I could learn how to do this? Important, again, is
the part which makes th... more >>
Once more - Pessimistic Locking ADO.NET 2.0 SQL Server 2005
Posted by aaapaul at 5/16/2007 11:55:17 AM
Hello !
I read any articles about locking so far, but I am not able to make a
solution for my project.
(I really want pessimistic locking - no such optimistic/pessimistic
discussion please)
This is my idea: (I made some experiencies with a new field "locked"
in the orders-table - read comm... more >>
DataView filter bug?
Posted by Jim Rand at 5/16/2007 11:05:00 AM
Simple problem. If the company is null, replace it with last name and first
name:
/* Replace null companies with last and first names */
DataView dv = new DataView((DataTable)this.Invoice, "Company = ''",
"InvoiceID", DataViewRowState.CurrentRows);
foreach (DataRowView drv in dv)
{
drv.... more >>
MS Access DB, XP Pro and IIS 5.1...
Posted by Scott Starker at 5/16/2007 10:52:20 AM
I am using MS Visual Web Developer 2005 Express Edition, MS Access DB, XP
Pro and IIS 5.1 on my local XP Pro.
This is a Newbie question with a very simple answer (I think). When I run
the page it loads up just fine (with all of DB fields in the dropdown boxes,
etc.). The problem is when I g... more >>
Typed DataSets in MS Access with Stored Procedures
Posted by JJT at 5/16/2007 6:38:01 AM
I am using VS 2005 and a MS Access 2003 DB. In VS I use the server explorer
to drag and drop tables and existing queries into the dataset designer
window. I am having several problems.
1. In the Server Explorer tables are under the Tables folder but queries are
under the Views folder or i... more >>
Problem with Expression in DataColumn
Posted by Carl at 5/16/2007 12:00:00 AM
Hi,
I get errors when I try the following expression in my strongly typed
dataset:
"Sum(Parent.Child(Relation1).Value)"
The error I get is:
"Syntax error in aggregate argument: Expecting a single column argument with
possible 'Child' qualifier."
What I want to do is to navigate fr... more >>
|