all groups > dotnet ado.net > october 2004
Filter by week: 1 2 3 4 5
Get id from inserted row?
Posted by Torben Philippsen at 10/31/2004 1:31:38 PM
Hello!
When inserting a new row into a database I was wondering if it is possible
to retrieve the id (key-field) for the new row - after insert ofcourse?
Thank You
Torben
... more >>
Enumerate all Oracle databases on the net
Posted by David Thielen at 10/31/2004 10:37:01 AM
Hi;
SQLDMO gives you a way to enumerate all SqlServer databases on the network
and for a given server, all databases on that server.
Is there a way to do this for Oracle?
--
thanks - dave... more >>
Data Access Application Block bug
Posted by amidanr NO[at]SPAM yahoo.com at 10/31/2004 5:19:07 AM
We're using the above mentioned Application Block in our project, in
order to execute stored procedure (SQL-Server). One of the stored
procedures executes a list of simple "select" commands, e.g. select *
from tableX, select * from tableY etc.
I used a string array in order to name the tables th... more >>
Sharing an OLE DB connection between MDI Parent and Children
Posted by Peter Hawkins via .NET 247 at 10/31/2004 3:57:28 AM
G'day all,
Being a fairly inexperienced programmer, I've never worked with=
MDI Forms before=2E What I'm trying to do is open a Jet OLE DB=
connection on my MDI Parent form (which is used to log in and=
out with user name and password), and access this same=
connection from the MDI Child ... more >>
C# SQL SERVER LAST INSERT ID EXAMPLES
Posted by Sheraz Khan via .NET 247 at 10/31/2004 3:55:55 AM
does anyone have sample code of data being inserted to a table, then the last insert id is retrived and inserted into another table.
The Code is c# and the database is SQL SERVER, NO Access examples or vb...
Thanks for this... i just cant find a simple example on this identity problem, people... more >>
insert multiple rows using loop
Posted by vrush desh via .NET 247 at 10/31/2004 3:54:03 AM
(Type your message here)
Hi,
I am trying to insert multiple rows using 'for' loop.
It inserts first row but while inserting second row it gives error like
"The variable name @name already declared. Variable names must be unique within a query batch or
stored procedure"
Please help me...my em... more >>
Problems putting decimal values in a datagrid
Posted by Joachim Carrein via .NET 247 at 10/31/2004 3:53:26 AM
Hi, i make a connection to Navision via C/ODBC in ASP.NET
First of all it didn't work with datasets, i had to use odbcCommands and a datareader
this works fine as long as the valuetypes are string or code(special navision type)
I have 1 field(Amount) that is type decimal, then i get the error whe... more >>
ExecuteReader requires an open and available Connection. The connection's current state is Closed.
Posted by renu renu via .NET 247 at 10/31/2004 3:49:33 AM
(Type your message here)
--------------------------------
From: renu
Friends,
when I am trying to create a login page and connecting to the sqlserver database I am getting the following error
ExecuteReader requires an open and available Connection. The connection's current state is ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Fire query on DataSet
Posted by Arun Gupta via .NET 247 at 10/31/2004 3:46:45 AM
DataSet is supposed to be an in-memory database=2E So is it=
possible to fire a query on it=2E I want to fire a "Select" query=
(with alises in it) and also a "Transform" (Crosstab) query=2E In=
the current scenario I am putting things in an Access table but=
for performance reasons want to ... more >>
Can't get record to insert into Access
Posted by Drew Burlingame via .NET 247 at 10/31/2004 3:46:36 AM
I have a windows service that will insert records into an Access=
database=2E Or at least that's the idea=2E The insert isn't=
happening, but the code runs without raising any errors=2E When I=
run the generated sql statement from a query window in Access,=
the record inserts just fine=2E... more >>
No of records effected
Posted by John at 10/31/2004 2:55:46 AM
Hi
I am executing a query as below;
Dim insStr As String = "INSERT INTO MyTable1 ( field1, field2, ...) ) " & _
"SELECT MyTable.f1, MyTable.f2, " & _
"FROM MyTable "
Dim insCmd As New OleDbCommand(insStr, Conn)
insCmd.E... more >>
XML data saving schema and data together
Posted by Masa Ito at 10/30/2004 11:25:30 PM
I am creating datasets that I use to creat reports (using Crystal). I have
been creating a dataset, then do the writexml, which I then use as the
basis for report creation.
If I use the xml file, I can preview the data in Crystal, but it does not
see which data types (ie: integers/decima... more >>
Advantages of the ADO.NET connection?
Posted by Manuel at 10/30/2004 3:27:25 PM
I've read all over the web how hot and sexy ADO.NET is, but when it's coding
time I just don't see the benefit (at least for me as a programmer).
The biggest complains I have are:
1) I cannot open 2 simultaneous streamreaders with a single connection. When
I stumbled upon this I couldn't b... more >>
Windows 98/ME and MS Access
Posted by Sascha Koenig at 10/30/2004 12:21:30 PM
Hi,
I have an application using the OLE DB driver to connect to an MS Access
database. AFAIK it uses MDAC 2.7 to accomplish this. This works fine under
2000 and XP, but not under 98 or ME.
The download site of MDAC 2.6 or later says the following:
This release does not include Microsoft J... more >>
combobox filling in vb.net and mydatabase is access gets redundant
Posted by Guest at 10/30/2004 6:24:10 AM
combobox filling in vb.net and mydatabase is access gets redundantn what may be the problem
User submitted from AEWNET (http://www.aewnet.com/)... more >>
newbie question (can't connect from asp.net 2.0 to SQL Express)
Posted by kostyantyn_salimov at 10/30/2004 5:29:02 AM
I've the following simple page:
===
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e)
{
SqlConnec... more >>
OleDbCommandBuilder
Posted by Dave Prouten at 10/30/2004 5:28:04 AM
Dear all
I hope some one can help me with this.
I have been trying for ages to update a disconnected dataset and then write
the changes back to the SQL database. However when I make changes to the
relivant fields it updates the datagrid but does not write the edits back to
the main SQL ... more >>
Typed DataSet returned from Web Service missing DataRows
Posted by Nathan Phelps at 10/29/2004 11:46:05 PM
I have a typed DataSet that contains approximately eight DataTables with
foreign key relationships that I am returning from a ASMX web service to a
Winforms application. The rows of a few particular tables don't seem to be
making it across the wire.
* I can verify that these particular Dat... more >>
Select and Update together
Posted by ALI-R at 10/29/2004 2:04:28 PM
I am going to select buch of rows from database and update a field in them
,is there a good way of doing that ?
thanks for your help.
Ali-R
... more >>
"Unknown ProviderConnection string is not valid" exception
Posted by Tory Eneboe at 10/29/2004 11:50:01 AM
Hi,
I'm trying to open a connection to a SQL Server DB in C# (so that I can
later execute a stored procedure). The code I have included below produces
the following exception when "connection.Open()" is executed:
Unknown ProviderConnection string is not valid
In reading some of the o... more >>
Cannot update DataTable containing a Column expression
Posted by Andrea Biagini at 10/29/2004 11:46:30 AM
Hi all,
I have a DataTable Column which expression Property
is valorized like this:
Tbl.Columns["Elimina"].Expression =
"'<INPUT type=\"button\" value=\"Elimina\" class=\"Testo\"
onclick=\"CallDeleteDialogBox(' + " +
"CONVERT(" + Tbl.PrimaryKey[0].ColumnName + ",System.String)" +
"+ ')\">'... more >>
A severe error occurred on the current command when running stored
Posted by Macromullet at 10/29/2004 11:43:03 AM
I am trying to execute the following stored procedure:
sp_help_job on msdb on a SQL Server 2000 installation under the context of a
user that is just a standard sql server login. Not a sysadmin.
If i run it under the context of a sysadmin i get results. However, if i run
it under a basic u... more >>
where to download the Oracle driver?
Posted by Jason Shohet at 10/29/2004 11:29:58 AM
I want to use the parameters call like this:
cmd.Parameters.Add(new OracleParameter("arg_username"), OracleType.VarChar,
strName, ParameterDirection.Input ));
but the Microsoft OracleClient driver does not allow the above syntax, I
have to provide a ton of other parameters. I see people u... more >>
How to disable sorting feature of DataGrid?
Posted by Andrew at 10/29/2004 9:17:33 AM
Hi, friends,
In a VC# app, I have a DataGrid with DataTable as its SourceData. This
DataTable has a ColumnStyle collection for each field. In Form_Load event, I
set
myDataGrid.AllowSorting = false;
However, when the form shows up, I can still sort each column.
Any ideas? Tha... more >>
Connecting to an Access database (MDB)
Posted by Dacuna at 10/29/2004 7:37:02 AM
Can I use ADO.NET to connect to a mdb database? I have not been able to find
anything on this.
Also, I am trying to use ADO in VB.NET and for some reason I can't seem to
get a command to work.
The code is below
Imports System.Data.Odbc
Imports System.Data
Imports System.Data.OleDb
... more >>
Synching information to/from Windows Mobile 2003 Device
Posted by John at 10/29/2004 6:56:14 AM
Hi
We have an access db which records daily orders. We would like the orders to
be downloaded to a windows mobile 2003 device via usb cradle. Drivers then
take along the device and get signatures from customers when items
delivered. Once drivers are back, the information to be synched back to ... more >>
Error 1918 Error installing ODBC driver Microsoft Visual FoxPro:
Posted by GPBSOFT at 10/29/2004 6:44:06 AM
I am Italian developer, escuse me for my bad English
I have a problem with ODBC.
I must link to a database from Visual FoxPro, I have installed Windows XP
Professional with service pack 2. When I try to install driver for Visual
FoxPro i see the message:
“Error 1918. Error installing ODBC ... more >>
Multithread select/update
Posted by Pablo Ricco at 10/29/2004 3:38:16 AM
Hello
I am developing a multi-thread app.
In this, each thread must take a number from a table and then update
table with the number + 1. This number is to insert in other table by
primary key. My problem is while I select number and update number,
because other thread may be read this numbe... more >>
when does webformdatagrid reflect changes to dataset???
Posted by Lore Leuneog at 10/29/2004 2:25:52 AM
Hello
I' want to build a fully editable webformdatagrid. The cells have to be
textboxes all the time (this I already realised with columntemplates) and
the update for all changes has to be done by one Update-button which uses
the DataAdapter.Update Method.
Problem is: The DataSet does not see... more >>
SQLTransaction Timeout
Posted by Mel Grubb II at 10/28/2004 10:57:21 PM
To keep this as general as possible, I'll start with the following
assumptions.
1) I have a piece of code "A", which does not have any support for
transactions because it only ever does a simple read from the database.
2) I have another piece of code "B", which requires and supports
transa... more >>
retrieve datarelation?
Posted by Lore Leuneog at 10/28/2004 10:06:56 PM
Hello.
Is there any way to retrieve the DataRelation from the Database or do I
always have to build it manually after retrieving the tables structures?
Thank you
Sincerely
Lore
... more >>
DataSet and charset coding.
Posted by Mad One at 10/28/2004 5:57:24 PM
Hello,
I have the following problem. I'm using data set to recive data from
Informix_SE database engine on SCO and there are data in it coded using
codepage CP-1250, but whole database is using NLS en_US.819 settings. When I
use WinSQL, to view data all strings seems to be OK, they have correct
... more >>
Hi,
Posted by Adam Maltby at 10/28/2004 5:48:50 PM
--____LPHMXLZMXOMRLFKSEJCW____
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hi,
I am trying to run an update using:
Try
da.InsertCommand =3D New OleDbCommand
With da.InsertCommand
.CommandTe... more >>
DataBase Timestamp question
Posted by Mika M at 10/28/2004 3:59:11 PM
Hi!
My VB.NET 2003 Windows Forms application has components on the form bound to
the dataset datatable. Editing and saving is working fine, but data source
SQL Server's table has column named as "SaveTime", Data Type = datetime, and
Default Value is (getdate()). It's bound to TextBox, and T... more >>
weird error
Posted by Param R. at 10/28/2004 3:40:46 PM
Hi all, I have a web service that opens a sqlconnection to the db and does
some work. The other day for the first time for about 30 mins I started
getting the following error message:
Timeout expired.The timeout period elapsed prior to obtaining a connection
from the pool.This may have occu... more >>
AdoMd.Net Retrieving MemberProperties
Posted by sa_ro at 10/28/2004 1:44:20 PM
Hallo,
I'm using AdoMd.Connection to retrieve Olap-MetaData. Now I want to get all
MemberProperties for a specific level, but there is no property at all. The
MemberProperty - property of the member-object always is empty.
Can anybody tell me how to get the memberproperties ???
Thankx,
R... more >>
Mapping Table to Grid
Posted by Levon Levonian at 10/28/2004 12:01:32 PM
Hi All,
I have a datatable with following items:
ID | City
23 | London
29 | Paris
45 | Roma
it is binded to a grid. Grid rows' ids are 0, 1, and 2, as well as table's
rows are 0, 1, and 2. When I sort a table or a grid, how can I access a
record whose ID=23. I need a si... more >>
Master Detail filter problem...
Posted by Jan Nielsen at 10/28/2004 11:01:01 AM
Hi all
I have a problem with a master detail form that I can't find any solution to
(and I have already searched both the help files and the Internet)
I use Visual Studio 2002 and VB.Net
I have created a typed dataset with two tables (Person and Remarks) and a
master-detail relationship (... more >>
DataView's RowStateFilter
Posted by Marina at 10/28/2004 10:43:35 AM
Is there any way to have a DataView, that only shows rows that have been
changed? So no deleted or added rows - just rows that already existed and
are now marked as modified.
Wanted to set the RowStateFilter property, but DataViewRowState enumeration
doesn't seem to have a member to describe thi... more >>
loosing transaction with sqltransaction and sqlcommandbuilder
Posted by silenius at 10/28/2004 10:37:52 AM
I got trouble using transaction and sqlCommandbuilder, it work 99% of time
and from time to time it crash telling that the command doesn't have a
transaction for the selected connection. here is what i do if anybody got an
idea.
protected SqlDataAdapter[] m_sqlAdapters = null;
static SqlConne... more >>
Help Troubleshooting Code (ADO.NET)
Posted by joshfeingold at 10/28/2004 9:10:42 AM
I am trying to get data from a MySQL database which I will then
populate a listbox with. Here is my current code:
'get data from database
Dim strConn As String
strConn = "Provider=MySqlProv.3.0;Data
Source=allstaffcontact;Location=localhost;User
ID=whatever;Password=whatever;Persist Securit... more >>
Propagating Datagrid Changes to a Database
Posted by Dennis Jelavic at 10/28/2004 7:41:12 AM
As a newbie to ADO.NET I am trying to set up a two tiered application (UI
and Data Access Layer) defining a data layer (Class: PortfolioCRUD)that has
two methods - getSectors and updateSectors to retrieve a single table
(Sector) from a database and to update a modified Sector table. getSectors... more >>
Sever Application Unavailable
Posted by Questioner at 10/28/2004 6:53:04 AM
Hi,
I have received an error message "Server Application Unavailable" when I
tried to use the DataGrid's DataBind method on web page.
The database connection had been successfully connected, however, the web
page failed when the line of code below was running.
DataGrid1.DataBind()
Pl... more >>
Reading XML with DataSet
Posted by Peter Schmitz at 10/28/2004 5:49:13 AM
Hi
I' m quite new to this, so this will be a very common problem:
How can I read the contents of a XML file into a DataSet? Is there a
function for this? Can anyone provide source code?
Thanks a lot
Peter... more >>
How to extract table definition
Posted by Nathan at 10/28/2004 2:13:07 AM
Hi
I'm attempting to connect to my SQL Server DB get a dataset containing all
tables in the database, then for each table get the columns and access the
column definitions.
The reason I need to do this is to try and automate creation of skeleton
stored procedures for insert, updata and ... more >>
Transactions & Identity Field Questions
Posted by at 10/28/2004 1:25:31 AM
Hello All,
I have the following situation.
I have a parent table and a child table.
The parent table has an identity field which
is the primary key. This primary key is also a
field in the child table for relationship purposes.
I am doing a transaction "INSERT" on "BOTH" the parent and ... more >>
How to create access database with vb.net program!
Posted by yonggangwang at 10/27/2004 9:31:03 PM
Hello:
I use system.io.filestream to create example.mdb, but the file size is
0, access 2000 can not recognize it.How to create access database with
vb.net automatically!
thanks a lot!!!
... more >>
last visible row of datagrid?
Posted by Lore Leuneog at 10/27/2004 8:57:31 PM
Hello
How can I get the rownumber and the first column value of the last visible
row in the Windows.Forms.DataGrid?
Thank you
Sincerely
Lore
... more >>
More columns than I asked for in columns collection
Posted by dbuchanan52 NO[at]SPAM hotmail.com at 10/27/2004 7:51:45 PM
I created an untyped dataset using the tables collection editor and
the columns collection editor.
The table was the employee table from the pubs database which has the
following eight (8) fields
emp_id
fname
minit
lname
job_id
job_lvl
pub_id
hire_date
For the table collection I su... more >>
Modify StoredProcedure.
Posted by Jose Ines at 10/27/2004 6:40:08 PM
Hello,
Is there a way to modify an SqlServer Stored Procedure using ado?
Thanks.
... more >>
|