all groups > dotnet ado.net > january 2007
Filter by week: 1 2 3 4 5
Multiple table in dataset query
Posted by Microsoft at 1/31/2007 5:48:16 PM
Hi everyone,
Before I begin I should point out that I am quite new to programming and
VB.net and am using VS2003 with SQLExpress 2005.
I have two data tables a staff table and an office table, the linking field
is office_id. I have created a form and added a datagrid, when the form
loads... more >>
Writing data from a table to another
Posted by max at 1/31/2007 3:27:15 PM
Hello,
I'm working on an Access db in VS2005. I have a table, called tblPatients,
in which I have three columns: PatientID (primary key), PatientName and
DoctorName. This table is filled with more than 4.000 records. I load this
table on a form, I make queries, updates, deletion, it does w... more >>
Stored Proc results in DataGridView
Posted by BillyRogers at 1/31/2007 2:02:01 PM
I'm trying to get the results of a stored proc (with no input parameters)
into a datagridview. I'm able to get the results into a messagebox but i'm
nor sure how to get them into a DataGridView
Using cn As New SqlConnection(strConn)
Try
cn.Open()
Ca... more >>
Getting double count of updated records
Posted by David at 1/31/2007 12:36:28 PM
I have an SQL statement that uses the Command method ExecuteNonQuery and it
is returning twice the number of rows (24) actually updated. When I run the
same statement using SQL SELECT I get 12 rows. Below is my ASP.NET SQL
code:
strSQL = "UPDATE File_Mst" & _
" SET CheckedOut = 12345" ... more >>
Do I need a DataRelation?
Posted by hawbsys at 1/31/2007 11:05:04 AM
Dear all. I'm wondering why it's so hard to bind a lookup value from
a
related table into a textbox on my form.
Say I've got two tables, product and productcategory. I'm paging
through product information using the bindingnavigator, one product
per page. Everything on the form is bound to fie... more >>
How to update a dataset table row I have previously added ?
Posted by Bishman at 1/31/2007 10:41:10 AM
Hi,
C# App. VS2005
I have a detail table ordered descending on a field called DetailRowID
ie
ArrayIndex Detail RowID
0 3
1 2
2 1
I add a new row but it goes to the end of the dataset so does not
ArrayIndex ... more >>
One DataTable class in two datasets - design-time support
Posted by Jiøí Neu¾il at 1/31/2007 10:11:29 AM
Hi, I created two datasets in dataset designer in VS 2005. Both of them
contain the same datatable. I think, having two classes for one DB datatable
is stupid and badly maintaining. So I need manually add DataTable class from
first dataset to second. So I modified designer.cs of second dataset... more >>
VB.NET Master Detail DataGridView Control
Posted by Adnan Abbasi via DotNetMonster.com at 1/31/2007 9:19:16 AM
Hi,
I m a newbie to VB.NET. So, i have problem in doing some tasks like
Master/Detail working with DATAGRID VIEW object along with BindNavigator.
How can i implement Master / Detail that work with the BindingNavigator?
Your advice will be highly appreciated.
Adnan A.
--
Message poste... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
run commands before SqlDataSource select?
Posted by Sergei Shelukhin at 1/31/2007 7:10:25 AM
Hi. Is there any way to run sql commands on the same connection that
SqlDataSource uses to select data before the select? Apaprt from
trying to build a multi-command CommandText.
Overriding the class would be ok but I can't find the way to do it
... more >>
New row not shown in Access after INSERT
Posted by CZuhars at 1/30/2007 6:20:06 PM
Hi,
My .NET application writes to an Access 2003 db through OleDb. I'm
using a stored query in Access to insert a new row. The app's C# code
sample includes:
myCommand.CommandType = CommandType.StoreQuery;
myCommand.CommandText = "InsertName";
myCommand.Parameters.AddWithValue("@FIRST... more >>
DB connection problem in setup for Microsoft Course 2524
Posted by michael sorens at 1/30/2007 4:37:00 PM
I am working through the manual for course 2524 (Developing XML web services
using ASP.NET). It is at least 4 years old so hopeless outdated (:-) but I
think I can salvage it to still be useful. I actually tried this with just
the express editions of visual web developer, C#, and sql server 20... more >>
DataAdapter with Transaction (.net 1.1)
Posted by prof_martin at 1/30/2007 4:19:01 PM
Hi All,
I created the following code, it is working, simple update of DataTable,
populating data to datatable/dataset is outside/before.
Problem: when I tried to use the transaction it doesn't.
It prompt error message "Execute requires the command to have a transaction
object when the c... more >>
ADO .NET 1.1 issue with stored proc params missing but only if culture is Turkish.
Posted by gcxmuirhead NO[at]SPAM gmail.com at 1/30/2007 1:33:02 PM
I have an application that is localized into a number of cultures
(Turkish is one) and a number of stored proc calls are failling when
the site is run in Turkish but not in any other language, but not all
procs fail. I am using framework 1.1, standard datasets and table
using SQLDataAdapter ... more >>
How to use DataGridView in VBExpress and SQL Server 2000
Posted by BillyRogers at 1/30/2007 12:54:00 PM
I'm using VBExpress and SQL Server 2000 which means that I can't use the
wizards/database explorer to do this stuff. It has to be done in code.
I've figured out how to connect to the database and execute a query, but so
for I've Only been able to put the results into a messagebox. I want to... more >>
Custom ADO.NET Provider, question about DbCommand.ExecuteReader
Posted by Jed Ozone at 1/30/2007 9:54:14 AM
I'm converting over a ADO.NET provider I wrote in 1.1 .NET to 2.0. I don't
understand why the DbCommand.ExecuteReader methods (it's overloaded) is not
virtual or abstract. This method would most likely need to be modified by
any class inheriting DbCommand. On the other hand, DbCommand.ExecuteS... more >>
Implementing SELECT DISTINCT with DataTable.Select method
Posted by Andrea Caldarone at 1/30/2007 9:40:35 AM
Hi all,
I've a standard DataTable, is there a way to get an array of value like that
one I obtain in SQL Server suppying the SELECT DISTINCT [field] statement?
Have I to loop trough the datatable to build the array or is there a simpler
way?
... more >>
How to find out records number affected?
Posted by Ivan Abramov at 1/30/2007 1:34:00 AM
Which was updated by the sql UPDATE instruction.
Is there some objects returning the number
or I have to do explicit SELECT nevertheless?
Thanks in advance.... more >>
Setting Command Timeout globally in Asp.Net / windows applications...
Posted by tom.herz NO[at]SPAM gmail.com at 1/29/2007 6:10:39 PM
Hi,
I've been tasked with the following:
We need to add elements to app.config and web.config to be able to
specify the CommandTimeout for SQL Commands. Since there is no option
in the connection string to set this property globally, this means
that every time we execute an SQL command ... more >>
loadOption.upsert
Posted by Carly at 1/29/2007 3:19:15 PM
Hello,
Can somebody explain to me in plain language what is the meaning of
each value in the LoadOption enumeration?
Or some clear articles about DataTable.Load and DataRowVersion.
Thanks,
Carly
... more >>
Joining oracle and SQL Server data
Posted by Joel Zinn at 1/29/2007 1:56:38 PM
I am working on a project where we need to join data from a SQL Server db
with data from Oracle. I have searched and have not found any good method
to accomplish this.
Here is what I have to work with:
User table in SQL Server with Names, addresses, etc. The key is UserID
Asset table i... more >>
STRANGE PROBLEM
Posted by at 1/29/2007 1:04:27 PM
Im getting that error (It is strange. I Run my programme step by step
pressing f11. im looping SqlCommand in a while loop. The First step runs but
when a enter 2nd step in my loop it returns error ? )
any idea ?
System.Data.SqlClient.SqlException: Procedure or function sp_adduser has
too ... more >>
Concurreny violation on delete in dataset
Posted by Flomo Togba Kwele at 1/29/2007 12:57:40 PM
I received the following error:
Concurrency violation: the DeleteCommand affected 0 of the expected 1
records.
on the Update method of the adapter below:
Me.ClientBindingSource.RemoveCurrent()
Me.Validate()
Me.ClientBindingSource.EndEdit()
Try
Me.client... more >>
Constraint error on fill of dataset
Posted by Flomo Togba Kwele at 1/29/2007 12:09:42 PM
I've defined a dataset containing 3 tables via the DataSource
Configuration Wizard.
In the UserControl.Load event, I place:
Try
clientAdapter.Fill(DsClient.Client)
personAdapter.Fill(DsClient.Person)
addressAdapter.Fill(DsClient.Address)
Catch
... more >>
Close not closing...
Posted by theinvisibleGhost at 1/29/2007 9:25:02 AM
I've written a small app which has 2 buttons.
The 1st button goes away to a directory full of SQL Scripts, and then
runs them against the database.
The 2nd button has code to do some modifications to the database,
looking like the code below:
______________________________________________... more >>
SQL Server dataset read from database A and write to database B
Posted by RWC at 1/29/2007 8:24:35 AM
Hello,
What I want I fairly simple (I guess), but I can't work it out.
In one application I export data from a SQL Server database to an XML
file. I have used the DataSet.WriteXML method to do this. My XML file
looks like this (simplified):
<?xml version="1.0" standalone="yes"?>
<broke... more >>
DataGridView for several tabels in a DataSet
Posted by atally12 NO[at]SPAM hotmail.com at 1/29/2007 7:19:59 AM
I have a DataSet with two tables in it, with a relation between them.
I fill the tables with records programmatically with these commands:
System.Data.DataRow newRow = myTable.NewRow();
//give values to each column in the row
myTable.Rows.Add(newRow);
I want to create a DataGridView that is bo... more >>
Problem with ODP.NET on Windows 2000
Posted by tal.brown NO[at]SPAM gmail.com at 1/29/2007 12:49:08 AM
Hi,
I wrote a simple application that opens and closes connections to an
Oracle DB using the standard ODP.NET API. The ODP version is
2.102.2.20 and the DB version is 9.2.0.7
This application works fine on Windows XP, but when running on Windows
2000 (SP4) it takes about and hour and fin... more >>
BindingSource, DataSet and multiple tables not syncing
Posted by Flomo Togba Kwele at 1/28/2007 3:43:06 PM
I have defined a dataset using the DataSource Configuration Wizard. I
dropped 3 tables onto the design surface. It looks like this:
Tbl1 Tbl2 Tbl3
PK
FK========> PK
FK=========>PK
Table 1 is a Client, tbl2 is a Perso... more >>
Tableadapter.update not working
Posted by Chris at 1/28/2007 8:01:01 AM
Can anyone tell me why this code added automatically by C# does not work? I
can add a record on the form or modify a record, but hitting the save button
does not save changes back to the database table. I can see the chnages to
the dataset as long as the form is still loaded.
private void ... more >>
Any way to disable "lazy write" in Jet through ADO.NET?
Posted by DennisWelu NO[at]SPAM cartegraph.com at 1/27/2007 8:55:44 PM
I don't think there is a way. There seems to be a black hole of info
about this unless you are using the older ADO technology.
If you know, please share...!
Dennis
... more >>
Need help in accessing photoshop with c#.net
Posted by KAMAL at 1/27/2007 11:27:38 AM
Sir,
We need some help in photoshop Add-in.
Here i am sending the problem. Please do in favour in solving the problem.
Through the .Net application we are activating the photoshop and sending
the short cut keys to photoshop for activating the adjustment dialog boxes.
in C#.net
Inte... more >>
AutoIncrement Columns
Posted by Neil at 1/27/2007 1:36:00 AM
Hi,
I'm wondering if it's possible to regenerate the increment id's in an
AutoIncrement Column?
My situation is this...I have a client application that is recieving a
several DataTables from a service. The DataTables contain an auto increment
column which is guaranteed to be unique withi... more >>
Problems with no rows returning from Query and C#
Posted by Bill Gower at 1/26/2007 8:36:45 PM
I have code as follows
if((DataTable)read_union_database("retrieveSSN")).row[0][0] == DBNull.Value
{
orow[0] = ""
}
else{
orow[0] = ((Data
Table)read_union_database("retrieveSSN")).rows[0][0].ToString();
}
I keep getting the error "There is no row at position 0" and when I pl... more >>
How to insert row in typed dataset
Posted by Benson at 1/26/2007 4:45:35 PM
I create a typed dataset by drag'n'drop in VS2005 (VB). I can use FillBy or
GetDataBy methods to retrieve the record. The code is as follows:
dataTable = tableAdapter.GetDataByCode(KeyFieldValue)
MtrUnitBindingSource.DataSource = dataTable
'user edits the record
'press ok button to save
Mt... more >>
sqldataadapter, datacolumn rowstate
Posted by hharry at 1/26/2007 2:24:40 PM
Hello All,
I use a dataadapter to fill a datatable from a sql server table. The
datatable contains one column ROW_ID which is set as the PrimaryKey.
The sql server table contains a single row and no new rows are added
between refreshes.
I refresh the datatable every 3 minutes using the da... more >>
Update rows in dataset
Posted by Eric Effer at 1/26/2007 11:35:58 AM
Hi
I am a asp.net 2.0 newbie and I was thinking how to update rows in a
dataset? How to find rows and update these rows manually?
thanks
E
... more >>
Best practice mapping sql-tables to .net objects
Posted by aaapaul at 1/26/2007 3:01:36 AM
I am quite new in programming an I have to develop an application
(Project-Management-Software) with Visual Studio .NET 2005 and SQL
Server 2005 (ADO.NET).
My problem is how to map the sql-server table to the .NET Object/class!
Does it make sense to use typed datasets or is it better to crea... more >>
Recordset to DataTable
Posted by Giovanni at 1/25/2007 6:46:02 PM
Hi All,
I am having the strangest and most frustrating time trying to load a
recordset into a data table more than once. For some reason, when I execute
the following code, the first messagebox displays a record count of 2 and a
second call to it displays a count of 0. Why the incons... more >>
Open persisted ADODB recordset in ADO.Net DataSet
Posted by Dan Reber at 1/25/2007 3:15:26 PM
The below code is what I put together to open a XML persisted ADODB 2.8
recordset in an ADO.Net v2 DataSet. My question is if the below code the
best why to go about this.
Thanks
Dan Reber
ADODB.Recordset rs = new ADODB.Recordset();
rs.Open(fileName, Type.Missing, CursorTypeEnum.adOpe... more >>
DefaultView.RowFilter
Posted by Joe at 1/25/2007 12:53:24 PM
Hello all,
I'm having a performance problem using the DataTable.DefaultView.RowFilter.
When setting the filter to MyField = "Something" this takes about 12 seconds
(this isn't the issue). Next if I change the filter to MyField In
('SomethingElse') it takes about 1 second (still not the issu... more >>
Security ideas for n-tier?
Posted by shubtech NO[at]SPAM gmail.com at 1/25/2007 11:11:28 AM
We are working on a project where we are converting our client server
application to a n-tier model to make it more scalable. The question I
have here for the group is to see if I can get some ideas on how the
security should be implemented for this kind of architecture.
I am new to this n-tie... more >>
Simple ADO tasks
Posted by Not Me at 1/25/2007 10:27:31 AM
Hi there,
If someone could just run me through the tasks involved in this simple
example I would be grateful. (using asp.net 2.0 and vb.net, sql server
2000 database)
I start with an xml string, which I load into a dataset as a single
table. This is a single column of unique id's. So far... more >>
Clear unchanged rows in a data table
Posted by Ryan at 1/25/2007 9:39:42 AM
I have a unique situation and wondering if there's a different way of
doing it. I have a strongly typed dataset for a disconnected
environment. This dataset runs on a service so I want to clear the
rows every now and then to keep memory usage to a minimum. But if
dataset can't contact for the... more >>
A transport-level error has occurred when sending the request to the server
Posted by Robin van de Water at 1/25/2007 9:39:22 AM
Hi All,
We have a website build in ASP.NET 2.0 and we are receiving the following
error:
System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the ... more >>
Setting provider specific value - flushing MSAccess
Posted by DennisWelu NO[at]SPAM cartegraph.com at 1/24/2007 6:19:13 PM
I have searched far too long for an answer to this riddle...and I know
it's probably right in front of me.
I have found articles using older versions of ADO that set Jet specific
properties on the ADO connection object. In ADO.NET 2.0 the Connection
does not have a Properties collection where ... more >>
SqlDataSource with multiple data tables
Posted by scartin NO[at]SPAM gmail.com at 1/24/2007 2:59:08 PM
I'm attempting to work with SqlDataSource to pull values from a
database and populate a form, which by itself is no problem. However,
I'm trying to visualize how to also iterate through values on a joined
table.
My situation is that there is a form representing a Rule filled out
mostly from ... more >>
Call SqlCommand.ExecuteReader inside another SqlCommand.ExecuteRea
Posted by David Thielen at 1/24/2007 2:52:03 PM
Hi;
I need to call SqlCommand.ExecuteReader and then inside a while
(reader.Read()) I need to call another SqlCommand.ExecuteReader. I need to do
this because I have a FK:PK relationship and based on the FK read, then read
the row in that related table - if the FK is not null.
How can I ... more >>
Get deleted rows from a datatable
Posted by Andrea Caldarone at 1/24/2007 11:54:58 AM
Hi all,
I've a DataTable, and from my UI a such user deletes one or more rows from
it, I wish to get the deleted rows from the DataTable. I have to perform a
loop trough the deleted rows and invoke the Row.Accept changes method, but
if I try something like this:
dim rX as DataRow
For ... more >>
VB Executable Finding Access Database When Shipped
Posted by pooba53 at 1/24/2007 10:38:38 AM
I've seen several posts in the archives regarding making your VB .NET
application have a relative path connection string to an Access DB, but
do not see a definite resolution to the matter.
Here's what I'm trying to resolve:
My VB 2003 .NET application connects and works just fine with an Ac... more >>
Transaction
Posted by Leeor Chernov at 1/24/2007 10:29:50 AM
Hi,
I am using transaction object with this code:
connection.Open();
SqlCommand command = connection.CreateCommand();
SqlTransaction transaction;
// Start a local transaction.
transaction = connection.BeginTransaction("SampleTransaction");
// Must assign both transaction object... more >>
|