all groups > dotnet ado.net > october 2005
Filter by week: 1 2 3 4 5
How to explicit trap a Time Out exception?
Posted by Mario at 10/31/2005 2:26:26 PM
It seems to me that a "time out" exception is a fairly routine
exception that can occur either when I'm reading from or updating to a
database. That said, it's a bit curious that there is no built-in
exception for trapping a time out.
Presently, I simply trap a vanilla SqlException and then I... more >>
Checking the database has a password???
Posted by Jon S via DotNetMonster.com at 10/31/2005 10:25:38 AM
Hi all,
I'm producing a database connection string but I need a way to establish if
the database has a password or not. There are two versions of the database
I'm opening, the first doesn't have a password and the second does. So if
the database has a password then open it with a string that... more >>
newbie - get value of field from datatable syntax
Posted by Steve at 10/31/2005 7:38:20 AM
I have a datatable containing 1 row and a few columns.
I simply want to retrieve the value of the 'nameid' column and store it
as an integer in a variable.
Dim data As Data.DataTable
data = MyObject.MyMethod(parameter) 'Returns 1 row with several columns
including a 'nameid' column
Dim i... more >>
Master/Detail DataSet and DataBindigs - applying RowFilter
Posted by Andreiwid at 10/31/2005 5:08:01 AM
Hi friends!
I've a DataSet with 2 tables inside. The relation and mappings between both
are set and ok.
I need to create a Master/Detail datagrid based on DataBindings.
'DataGrid1 shows the Master view and TextBox1 shows one field's content, as
follow:
DataGrid1.SetDataBinding(DataSet1, ... more >>
Concurrency exception when calling a teradata storedproc
Posted by Ali at 10/31/2005 4:10:02 AM
Hi
I have a C# app that uses a dataadapter to update a table in a teradata
datawarhouse. It performs an update using a teradata stored procedure. In
teradata, stored procs dont actually return the number of rows updated but
instead return a 0 if successful. This results in a concurrency excep... more >>
Datarelation handling
Posted by Rob W via DotNetMonster.com at 10/31/2005 12:00:00 AM
Hi
I've created a datarelation between two tables in a dataset which works fine.
What I need to be able to handle is if there are entries in the child table
that don't match those in the parent then ignore them (the children).
In the code below if no records match in the custSQL query then... more >>
How to obtain the list of all tables?
Posted by Georges Bessis at 10/31/2005 12:00:00 AM
Easy in DAO but can't find a way with ADO.Net :
How to obtain the list of all tables (names) of an Access Database in
VB.Net?
Thanks in advance.
GB
... more >>
Conversion from type 'SqlInt32' to type 'Integer' is not valid
Posted by Greg Burns at 10/31/2005 12:00:00 AM
I have a lot of autogenerated code (created from LLBL Gen,
http://www.sd.nl/software/) that looks similiar to this:
Dim _errorCode As SqlInt32
....
_errorCode = New
SqlInt32(CType(cmdToExecute.Parameters.Item("@iErrorCode").Value, Integer))
I am upgrading my project to VS 2005. Now, wh... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
ADO.net and VC++.net 2005
Posted by Maileen at 10/30/2005 7:33:34 PM
Hi,
I'm writing a VC++.net 2005 application and i would like to use the ODBC
connector.
I would like to allow user to choose the DB he wants to have (MS SQL,
PostgreSQl, MySQL, Oracle,...) by choosing the write ODBC driver.
After that, i want to create a system DSN with information enter ... more >>
Writing ADO custom providers
Posted by Mark at 10/30/2005 11:56:20 AM
Hi,
We have a DOS based ISAM style database format and need to access this data
via ADO. Can anyone point me toward information that will help me write an
ADO data provider so that we can access this information using ADO.NET?
--
Best regards
Mark
... more >>
Get the 100 XXX first and after whait on background for other record?
Posted by mtcc at 10/30/2005 12:00:00 AM
in MSAccess run a query return very first record, and after continue
whaiting for other record on background.
have easy way to get it on ADO.NET 2 + SQL2005 ?
... more >>
Transactions and Referential Integrity
Posted by Roger Rabbit at 10/30/2005 12:00:00 AM
Hello,
I have a simple problem that involves an Order and OrderDetail
table.OrderDetail requires an Order Id to be present in Order i.e. ref
integrity prior to record insertion.
Using transactions to ensure that i dont end up with only order stubs and no
detail in case of an error I find ... more >>
Optimizing LIKE in SQL statements
Posted by michael at 10/29/2005 10:12:02 AM
What can be done on the SQLServer end of things to optimize the speed of Fill
methods that use LIKE within the SQL statement.
--
Michael Hockstein... more >>
Copy tables from Oracle to Access FAST?
Posted by Troy McLure at 10/29/2005 1:39:42 AM
I have used the code below to copy data from one Access file to another
Access file, and it's seems to be pretty fast. When the source tables
are in Oracle and using an OracleConnection as source, my insertstring
won't work anymore. Will I have to start filling datasets, traverse the
rows an... more >>
How to find in DataView if the primarykey more than one
Posted by ad at 10/29/2005 12:00:00 AM
We can use DataView.Find("PrimaryKey") to find a primaykey value a
DataView.
but How can we find if the Prmarykey is compound with more than one keys?
... more >>
How to compact an Access Database under VB.Net?
Posted by Georges Bessis at 10/28/2005 9:06:56 PM
Hi,
In VB6, and DO, I used to progam this simply by
Compactdatabase(SOurce, Destination)
And also I used : repairdatabase (MyDataBase)
These where standard DAO.DBEngine methods
How do I do that in pure VB.Net?
Thanks in advance
GB6
... more >>
Can't open Excel spreadsheet from within .Net web app on Windows XP
Posted by Bill Youngman at 10/28/2005 4:08:20 PM
I'm trying to write an import utility for a web app that I am developing =
and I'm using an Excel spreadsheet to hold the data to be imported.
I'm using ODBC and this is my connection string--
"Driver=3D{Microsoft Excel Driver (*.xls)};Dbq=3D" + =
HttpContext.Current.Server.MapPath(".//" + c... more >>
DataGrid page level delete all function
Posted by Pradeep at 10/28/2005 2:37:02 PM
Hi,
Here is my issue. I have a datagrid on my aspx page. I have paging enabled
for the datagrid. Suppose Suppose I have 3 pages in my datagrid. When I go to
the last page (which is the 3rd page here) and select all the messages and
delete, since the delete is on a page level, it deletes al... more >>
no primary key on union query
Posted by mharness at 10/28/2005 1:36:54 PM
Hello,
I need to find a string value in a dataset table which is the result of a
union query that does not have any primary keys.
Is there another method or approach other than find and contains that I
could use that does not require primary keys or is it possible to "supply" a
primary k... more >>
Create DataView or DataTable from DataSet
Posted by Christine Y. at 10/28/2005 12:47:45 PM
Hello,
I know the subject sounds sort of backwards, but I created a DataSet by
using three different DataAdapters with different queries (each query
joins two tables in my database) and filled individual DataSets for
each DataAdapter. Then I merged the three DataSets to one, and now I
have a ... more >>
newbie needs help with a web service for infopath
Posted by depova at 10/28/2005 12:28:04 PM
I've been trying to figure this out but can't seem to grasp it. I'm
very new to web services and am trying to create a simple one that can
receive and submit to a sql table to be used by Infopath. I have been
able to do this thanks to this microsoft article.
http://msdn.microsoft.com/library... more >>
Re: GetOleDbSchemaTable returns incorrect DATA_TYPEs?
Posted by dradon at 10/28/2005 9:53:50 AM
I finally found a solution to this problem, in case anyone else eve
runs into it.
Turns out you have to use the flags in the COLUMN_FLAGS field to mak
the determination about what the correct data type is for text fields.
The two specific flags that are relevant ar
DBCOLUMNFLAGS_ISFIXEDLEN... more >>
Newbie - Datagrid Binding Problem
Posted by Wizard at 10/28/2005 9:19:14 AM
Hi There Thanks for Everyones Help So Far,
I used the Database Form Wizard and i`ve looked at he code from that. Its
working Great Now. Now the Only Problem I have is i`ve added a Datagrid to
my App Aswell, Makes it easier then clicking next a few hundred times to get
to the record I want. ... more >>
"General Network Error" and Connection Pooling
Posted by Jeppe Jespersen at 10/28/2005 12:00:00 AM
I have a very simple WinForms app, that uses a sqlDataAdapter retrieve data
into a dataset.
The dataset is set to be the datasource of a DataGrid. If - while editing
rows in my grid - i lose my network connection (or stop + start my
sqlserver), i get a "General Network Error" when I call my d... more >>
There is no row at position x
Posted by MR at 10/28/2005 12:00:00 AM
I am getting the exception "There is no row at position 5" on a dataview
that has 10 rows (count = 10)
The original dataset, i.e. unfiltered, has 12 rows. when it is filtered,
there are 10. i can look in the dataview and see all ten rows. but when i am
in the foreach(DataRowViw pr in orderD... more >>
Dataset with large tables
Posted by drinkwater at 10/27/2005 8:34:02 PM
Please someone explain this to me ! From what I understand ADO.NET is
disconnected. Ok. I have Windows app with a student table with about 15000
students. In ADO I would open a server side cursor and page thru the table in
a custom grid I built. So at most I would retrieve about 20 records or ... more >>
Question about creating Access tables in VB.Net using ADOX
Posted by B. Chernick at 10/27/2005 8:15:02 PM
I'm writing a VB.Net program. At startup the program looks for a default
Access mdb and if it isn't there, creates it. At least that's the design.
My question is this: Using ADOX, is there anyway to declare an
AutoIncrement table field? I don't see anything in the DataTypeEnum that
seem... more >>
OLE DB Connect Help Needed
Posted by matt889988 at 10/27/2005 3:00:24 PM
Hi everyone,
I'm having a problem connecting to a mySQL database using OLEDB with
vb.net.
open3 = New OleDbConnection
open3.ConnectionString = "Provider=SQLOLEDB; Data Source=www.db.edu;
Initial Catalog=xxx; User Id=XXX; PWD=XXX;"
Doesn't work: "Access Denied or server doesn't exist"
... more >>
get DataColumn metadata
Posted by stanley at 10/27/2005 1:15:08 PM
hello all,
i am looking for a way to get metadata of a DataColumn (in c#).
i want to write a switch-case statement(if it possible) that check the
Column DataType as declared at the database (adChar, adVarChar,adDate,
adDBDate, adDBTimeStamp,adDecimal, adSingle, adDouble, adNumeric, ..., ....... more >>
DataColumn expression to create new Guid
Posted by Marc at 10/27/2005 11:08:41 AM
I would like to set up a DataColumn in my table of type Guid and a new
Guid(Guid.NewGuid) would be the expression that gets evaluated when ever a
new row was added. I have the DataSet bound to a grid so I would like to set
this up at compile time. The Guid DataColumn is also the primary key ... more >>
SqlDataReader
Posted by Justin Lazanowski at 10/27/2005 8:19:30 AM
Ok this one has me stumped. Everything looks right, but for whatever reason
the DataReader keeps telling me not set to an instance of an object. When I
step through the code, it runs the line
SqlDataReader mySqlReader;
However I can see in the watch value that the mySqlReader is set to... more >>
User Controls and ADO Connections
Posted by Paul at 10/27/2005 7:04:11 AM
I have 3 User Control .ascx files that are included in a base .aspx file.
In each ascx file, as well as the base aspx file, I make ADO.Net calls that
require a datatbase connection.
It appears that I have to open and close the connection in each file (i.e. I
can not reuse the open connecti... more >>
One or many DataSet
Posted by gjetthvemjeger NO[at]SPAM yahoo.no at 10/27/2005 5:35:44 AM
Hi,
I am working with WB.NET and SQL Server.
I have some trouble grasping what a DataSet in VB.NET is. Do the
DataSet mirror the whole database used as the data store for one
application or is it recommended to use multiple Dataset for this
database (one application).
Example:
My DataSet ha... more >>
Retrieving Excel Schema Information
Posted by Rohit at 10/27/2005 12:00:00 AM
Hello,
I am retreiving Excel Schema Information from a Excel Sheet.
I am using GetOleDBSchemaTable for it.
I see a strange behaviour sometimes that when I retrieve the Column names
from a
particular Excel file, It returns the column names which are there as well
as some extra columns l... more >>
ADO.Net Best Practices Validation Tool
Posted by news.microsoft.com at 10/26/2005 5:26:10 PM
Does anyone know of a tool that can look at C# code and make sure that all
open datareaders are closed as well as validate other ADO.Net best practice
principles?
I have a team of 10 developers and we recently had a bug in our code that
claims that an existing connection can't be used becau... more >>
How do I specify a 1 to many relationship?
Posted by Rod at 10/26/2005 4:06:26 PM
I want to specify a relationship between two data tables in a dataset.
(Both data tables come from executing stored procedures in SQL Server.)
When I tried to add the relationship through the Relations property of the
dataset, I got the following error message:
"The columns don't curren... more >>
DataTable.Select
Posted by Baren at 10/26/2005 12:51:16 PM
Hi!
I am using the following code in my vb.net application.. its working fine on
windows 2000 professional and XP Professional, but its not giving me
appropriate result when running on a Windows 2003 Server.
Dim tblFileList As DataTable
Dim drCORows As DataRow()
Dim strExFileName As Stri... more >>
How to know a column whether indexed or not in sql2k
Posted by joy.net at 10/26/2005 10:21:32 AM
When to use new DataSet? When to perform DataSet resident joins?
Posted by Siegfried Heintze at 10/26/2005 9:11:41 AM
Whenever I create a new database query, I have to answer a couple of
questions that are even harder to ignore if you are using visual studio:
(1) Should I create a new table in an existing dataset or a new dataset? Is
there peril in having one table per dataset and having lots of data sets?
(2... more >>
Perform JOIN in dataset?
Posted by Christine Y. at 10/26/2005 9:03:19 AM
I would like to pull data from two different databases into one dataset
(using a DataAdapter with different commands and connections, and
filling that one set with the different results). With this data, I
need to perform a JOIN to get the records from those two databases that
have a common id ... more >>
Using Diffgrams for multiple insert/update/delete
Posted by Samba at 10/26/2005 8:48:14 AM
Hi,
I want to do multiple insert/update/delete of multiple rows using a single
stored procedure using diffgram. Can I please get a small sample/link for
achieving this. I just need the the stucture of the stored proc as I have the
diffgram generated successfully.
Advanced thanks.
--
... more >>
ADO .NET ODP Equivalent of DBMS_SESSION.SET_CONTEXT
Posted by istccgd NO[at]SPAM omh.state.ny.us at 10/26/2005 7:36:54 AM
Is there a way using the ODP for .NET (Oracle 9i, .NET 1.1) to set the
context for calling a stored procedure, using .NET code?
For example, I want to do the equivalent of the following:
DBMS_SESSION.SET_CONTEXT('rowlevelaudit_ctx', 'userid', 'Chris');
in VB .NET so that during subsequent ... more >>
Relational Database Samples in C#
Posted by fischertm NO[at]SPAM hotmail.com at 10/26/2005 7:00:33 AM
Can anyone point me to samples of Relational Databases (MSAccess or SQL
Server) that show how to update and add records to relational tables?
Any help would be greatly appreciated.
Thanks.
... more >>
DataTable.Select method in .NET 2.0
Posted by maciu at 10/26/2005 4:14:53 AM
Hi,
I have a problem with DataTable.Select method in Microsoft .NET 2.0.
I have a ListBox control, with DataSource pointing to a DataTable
"RolePermissions". ListBox has SelectionMode property set to
"Multiple".
I would like to enable User to Delete Multiple items with just one
click.
I am al... more >>
Reading Excel using OLEDB
Posted by Rohit at 10/26/2005 12:00:00 AM
When I read excel file sheet as table through ADO.NET using OLEDB
it does not return all
data. I know that it scans 8 rows for deciding about datatype and it can be
changed to 16 rows. I changed it to 16 rows but still does not work. I know
what is happening, it finds the column name which obvi... more >>
Connect a TableAdapter to an already existing DataTable
Posted by O at 10/26/2005 12:00:00 AM
hejdig.
I have a DataTable from before and now want to connect it to a database.
I havn't found a way, through VS.Net2005rc1, to create a TableAdapter and
connect it to an already existing DataTable.
Is there a way (besides hacking the XML)?
TIA
/OF
... more >>
no value given for one or more required parameters - error
Posted by Jon S via DotNetMonster.com at 10/26/2005 12:00:00 AM
Hi all,
Why am I getting a 'no value given for one or more required parameters' error
when I try to fill the dataset. Below is the code I'm using and I'm getting
the error on the DASOURCE.FILL(DSSOURCE, "FIELDS"); part of the code.
objSourceConn is fine. Can anyone help?
Thank you.
strin... more >>
Odd Behavior Copying VarBinary Data
Posted by Eric at 10/25/2005 3:31:17 PM
I'm copying the content from one DataTable to another. Both tables have a
SQL column of type VarBinary.
The data is actually copied this way.
DataRow[Column] = DataRow[Column];
Would this method cause a problem with VarBinary data types?
The problem I'm seeing is that the data seems t... more >>
DataTable Adapters and Oracle Provider (2005)
Posted by Jim Katz at 10/25/2005 2:48:05 PM
Using the GUI tools to have a Table Adapter's Fill& GetData proc point to a
SPROC in the database (or a function) works well if the proc is a Function
that has no parameters, OR if it is a proc and you are using SQL Server.
In my case, I want to use functions inside Oracle, and want to pass
... more >>
using webrequest
Posted by andy at 10/25/2005 2:12:09 PM
Hi
I have a requirement to submit form data to a url after collecting the
data from the database.
For example I need to send firstname and lastname through a post method
I can call on the fly.
This is the traditional route below , I want to emulate this submit
action from a vb.class ... more >>
|