all groups > dotnet ado.net > september 2005
Filter by week: 1 2 3 4 5
Where is SqlCommand.ExecutePageReader?
Posted by ABC at 9/30/2005 5:41:04 PM
Why I cannot find SqlCommand.ExecutePageReader?
What happen?
If it function cut, how to make page by page feature for large amount data?
... more >>
Updating database rows usign OracleClient - .NET Framework 1.1
Posted by JAW at 9/30/2005 4:19:04 PM
I have the following code......
private ReturnValue ProcessNonQuery (string sql)
{
ReturnValue status = ReturnValue.SUCCESS;
OracleTransaction myTrans = con.BeginTransaction ();
OracleCommand myUpdate = new OracleCommand(sql, con, myTrans);
myUpdate.CommandType =... more >>
Dataset update error (record requires parent table record)
Posted by PAUL at 9/30/2005 3:00:12 PM
Hello,
I have 2 datasets I am trying to update. The parent table seems to
update fine but when I go update the chiled table I get an error message
that says I need a related record in the parent table. However I put some
code in to display the key field of each parent table record (pa... more >>
Retrieving Excel Sheet Names from Excel Workbook
Posted by Rohit at 9/30/2005 2:33:59 PM
Hello,
I am retreiving Excel sheet names from a Excel workbook.
I am using GetOleDBSchemaTable for it.
I see a strange behaviour sometimes that when I retrieve the names from a
particular Excel file, it returns all 3 sheets correctly with right names
and also returns a additional sheetn... more >>
Sorting by child relationship in a dataset
Posted by lovemyalpacas NO[at]SPAM gmail.com at 9/30/2005 2:30:21 PM
Hi,
I have a dataset with a parent and child table, as follows:
Parent Table: 'Asset'
- AssetID
- Name
Child Table: 'Attribute'
- AssetID
- Name
- Value
I need to sort the items in the parent table by a certain val... more >>
Lock MSSQL Table Row?
Posted by xenophon at 9/30/2005 2:16:49 PM
In my .NET Framework 1.1 DataSet/DataTable/DataRow, I have a row with
a stringized GUID column called 'Concurrent'. There is a matching row
in the database with the same GUID. Within a single XA (MSDTC)
transaction (not SQL Server transaction), I need to "lock" the
existing row if the 'Con... more >>
Connection pool count too high?
Posted by Dan at 9/30/2005 1:43:04 PM
I am trying to determine if the # of connection pools our app is using is
'normal'/acceptable, or if there is a problem.
Our web application is all asp.net, using ADO.NET and SQL Server 2000 STD.
The app is run on a Windows 2003 Server Web Edition and IIS 6. The
application is broken up in... more >>
Retrieving database type via DataAdapter
Posted by Jiho Han at 9/30/2005 1:27:28 PM
I am trying to retrieve the database type (in this case OleDbType actually)
from a DataSet created via DataAdapter.Fill method.
When I retrieve a result set via OleDbDataReader, I can use its GetDataTypeName(int
index) which will give me the underlying type such as:
"DBTYPE_DBTIMESTAMP"
"... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
DataTable.GetChanges() -> Null Reference Exception in LookupNode.B
Posted by Collaborative Data Services, FHCRC at 9/30/2005 1:18:02 PM
Having an expression that includes a relation reference causes GetChanges()
to fail with an exception. A simple Console program to demonstrate the
problem follows. Is this a known bug? Is there another/better workaround?
Thanks,
David
using System;
using System.Data;
using System.Collec... more >>
Replacement for DataLinks dialog box in VS2005
Posted by michael at 9/30/2005 12:44:19 PM
To keep a uniform visual interface, I used the DataLinks object (found in
MSDASC) and the Connection object (found in ADODB) when creating a connection
string in my VS2003 apps.
Is there a similar object available in VS2005? I like the ability to enter a
server name or IP, choose the authe... more >>
Messages back from SqlServer using Ado.net?
Posted by Jason Haley at 9/30/2005 10:16:05 AM
I have a WinForms application in which I am wrapping the backing up of a sql
database. In order to back up the database I am using the BACKUP DATABASE
t-sql and the STATS=5 in order to get the progress back from sql server.
Here is the exact script:
BACKUP DATABASE test_dvpt
TO test_Backup... more >>
Unexpected results from datatable select method
Posted by Hank1234 at 9/30/2005 8:27:04 AM
I am receiving unexpected results when performing a select method on a
datatable. What I am noticing is that occasionally only the first part of the
search criteria is being used. Example of the code:
Dim oRows() As DataRow
Dim oRow As DataRow
oRows = Sales.Select("thsmn = "... more >>
Exception has been thrown by the target of an invocation mscorlib
Posted by Robson Carvalho Machado at 9/30/2005 8:26:03 AM
Dear Friends,
I'm trying to create a .NET class named TESTE using VB.NET that can be
called by an ASP page but I got an error that I could not fix.
TEST CLASS code:
==========
Imports System.Web.Mail
Public Class update
Public update As String
Public server As String
Pub... more >>
DataGrid Column Headers and Size
Posted by lliang27 NO[at]SPAM yahoo.com at 9/30/2005 6:55:01 AM
Hi List,
I use the folloiwng code to fill up a DataGrid with one table's data
from SQL:
fillGrid.SetDataBinding(m_DataSet, tableName)
My questions are:
1. How can i change the column headers instead of using the names from
the database columns?
2. How can I autofit each column?
Thank... more >>
Database doesn't update from datagrid using dataset
Posted by Assimalyst at 9/30/2005 3:09:38 AM
Hi,
I'm attempting to update an SQL Server database from a datagrid. I have
followed one of microsofts walkthroughs as far as possible, but I am
using stored procedures where it did not, though i don't think that
should be a problem.
Here's the code:
private void DataGrid1_UpdateCommand(... more >>
Unable to merge 2 mySQL Databases using OdbcDataAdapter.Update
Posted by den 2005 at 9/30/2005 12:55:02 AM
Hi Everybody,
I am Updating server database with data from client database, I am using
mySQL Ver 4.1, I am unable to do that. What should I do to change the codes
to make it work? I have also another method that do the opposite data from
server updates the database on client side. I need h... more >>
SqlParameter for IN-Clausel (int values)?
Posted by Roland_Müller at 9/29/2005 4:51:13 PM
Hi Ng,
i have a sucking problem......
select * from test where nId IN (1, 2, 3)
Now i want to execute this with an sqlcommand and more interesting with
an sqlParameter:
sqlCommand.CommandText = select * from test where nId in (@IN-Values)";
I first tried:
SqlParameter sqlPara... more >>
Whats wrong with short code snippit?
Posted by Steve1 via DotNetMonster.com at 9/29/2005 4:38:33 PM
Hi all,
Why is the last line of this code snippit pulling up with an error? Any help
will be appreciated - Thanks, Steve.
string str_SQLLayoutsPound = "SELECT * FROM Layouts ORDER BY Name";
OleDbCommand obj_SQLLayoutsPound = new OleDbCommand( str_SQLLayoutsPound,
obj_SourceConn );
OleDbDa... more >>
Testing SqlCommand.Parameters["@Name"].Value == null
Posted by Giammarco at 9/29/2005 2:50:19 PM
Hi all,
I have the following code:
int? name;
SqlCommand.Parameters.AddWithValue("@Name", name);
if (SqlCommand.Parameters["@Name"].Value == null)
{
SqlCommand.Parameters["@Name"].Value = DBNull.Value;
}
Well, I do not assign any value to 'name', so it's value is null, as it
is a... more >>
SqlDataAdapter Fill Dataset is slow
Posted by chrisdepalma NO[at]SPAM yahoo.com at 9/29/2005 1:25:50 PM
I call a stored procedure that returns two select statements.
in query analylzer, it takes 1 second to do the query.
The following code takes 60 seconds in dot net 1.1. It seems to me
that the dot net runtime sucks. Any ideas?
SqlConnection con = GetConnection();
con.Open();
... more >>
ExecuteNonQuery
Posted by nbohana at 9/29/2005 1:17:02 PM
I am trying to get the number of records selected using the ExecuteNonQuery
(MARKED BELOW BY ***). It does not crash but returns a "-1". The select
returns one record. What am I doing wrong? please help.
strSQL = "SELECT [med-id], [animal-id], [animal-name], medication, date,
dosage, freq... more >>
serviced components and shared methods
Posted by z f at 9/29/2005 1:00:36 PM
how does the enterprise services infrastructure treat shared (static )
declared methods?
does the class the shared method is declared inside it must be serviced
component in order for the method to get transaction services? because
instance of the class does not have to exist and even if exis... more >>
NullReferenceException when you update a column value in OnRowUpdating event handler
Posted by Jiho Han at 9/29/2005 11:47:07 AM
I am getting a NullReferenceException deep in the bowels of ADO.NET.
I figured out that it only happens when I change column values within RowUpdating
event handler.
private void _dataAdapter_RowUpdating(object sender, OleDbRowUpdatingEventArgs
e)
{
System.Dia... more >>
Howto obtain the credentials from a SqlConnection object
Posted by Friso Wiskerke at 9/29/2005 11:46:54 AM
Hi all,
In the ConnectionString property you can set the UserName and Password to be
used for the SqlConnection as well as the DataSource and Initial Catalog
(and some more possible values). There are properties on the SqlConnection
object which return the DataSource and the Database provid... more >>
Parameterize Query using IN
Posted by Jonathan Lurie at 9/29/2005 11:27:15 AM
I have a query.
da.SelectCommand.CommandText="Select * from Inventory where
InventoryType=@Type and Status in (@Status)"
da.SelectCommand.Parameters.Add("@Type", SqlDbType.Int)
da.SelectCommand.Parameters.Add("@Status", SqlDbType.VarChar)
I know how to set value for the Inventory Type para... more >>
Please help!!!!!!!!
Posted by nashak NO[at]SPAM hotmail.com at 9/29/2005 11:11:29 AM
What is a preferred method to handle form input from textboxes that can
be empty or null (in C#). If I pass these values as parameters to a
method, then they fail when there is no data in the field.
I can check the value and if empty set it to System.DB.Null and then
create a sqlparameter[] an... more >>
What wrong with this simple code snippit?
Posted by Steve1 via DotNetMonster.com at 9/29/2005 10:32:16 AM
Hi all,
Whats wrong with the below code? On every loop it seems to be jumping 3
sometimes 4 records. As you can see the SQL query is asking for all records
with no filters. I want to loop each record as I asked. Is there something
with wrong with my code? Thanks in adavnce, Steve.
stri... more >>
Does ExecuteReader allow you to return a record name?
Posted by Steve1 via DotNetMonster.com at 9/29/2005 9:48:23 AM
Hi all,
I''ve created an OleDbDataReader that will contain the number of records that
the used SQL query will return. I'm then using a while loop to loop while
the OleDBDataReader object has records. I would like to know does the
OleDbDataReader contain the actual information on each record ... more >>
running SQL Scripts from VB.Net - is OSQL the best way?
Posted by m00nm0nkey at 9/29/2005 7:39:21 AM
I have written a VB.Net application which, on start up, creates a database by
running numerous .SQL files using the OSQL utility. This is the code i'm
using in VB.Net to run the scripts:
Dim proc As New Process
proc.StartInfo.UseShellExecute = True
proc.S... more >>
TableAdapter Designer generates weird update and delete procedures
Posted by Mirronelli at 9/29/2005 7:28:02 AM
Hi,
I am impressed by the work you have done to simplify creation of DAL
components.
I especially like TableAdapters.
However, I have found out that when you generate a TableAdapter in the
TableAdapter Designer it creates a bit weird update and delete (SQL)
procedures.
Whenever a collu... more >>
ODBC .Net Data Provider not working on production web server
Posted by Matt T at 9/29/2005 6:58:04 AM
OK, I have a solution that works fine on my laptop and my desktop. When I
tried to move the solution to the production server, I keep getting the error
message
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified
Although, we did dow... more >>
Webservices + oracle connection problem
Posted by lomiarz at 9/29/2005 5:51:02 AM
Hi, i have windows xp sp2 & visual .net 2003 and asp 1.1 iis 5.1 and
oracle 10.1
and when i try to connect to database by webservice OCIEnvCreate error
occures. While connecting with console application or windows
application goes without any problems. I gave permission to bin
directory (oci.dl... more >>
Cint(null)
Posted by Wael at 9/29/2005 5:39:30 AM
Hi
I have code that stores integer data from the control to the database.
(I am using Option Strict). The problem is when I try to do the code
below, I get that the string is not properly formatted because there is
no value. Each page has a lot of variables. Is there a way to solve
that probl... more >>
How to retrive schema bound with a SELECT statement columns?
Posted by Gopinath M at 9/29/2005 2:35:04 AM
Hi ,
We are developing an application in C# to compare data retrieved by two
SELECT queries. User Input for data comparision is two valid SELECT
statements which returns data.
Before starting the data comparison, i would like to validate the data
type of all the columns which are l... more >>
ADO.NET AddNew EndCurrentEdit & "Column 'Appt_ID' does not allow nulls" SOLVED
Posted by tony010409020622 NO[at]SPAM spamthis NO[at]SPAM hotmail.com at 9/29/2005 12:10:08 AM
I see this question asked in different ways both in this newsgroup and
on bulliten boards, I just stumbled on the fix. What I had was
basically correct, but missing one line. In the Update button, after
this:
Me.BindingContext(DsAppointments1, "Appointments").EndCurrentEdit()
THIS is ... more >>
update call not working
Posted by ahager via DotNetMonster.com at 9/28/2005 5:39:08 PM
My update method is not working, I am getting
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.
Don't know why. Please help!
using System;
using System.Data.OleDb;
using System.Data;
using System.Da... more >>
OleDbSchema Guid
Posted by Trainee at 9/28/2005 4:56:03 PM
hi
i am using OleDbSchemaGuid to display the schema information of a database
when i use OleDbSchemaGuid.Procecdures method it returns a data table
containing all procedures as well as functions..
but i am not able to separately get the list of procedures and the list of
functions....i need... more >>
deadlocks and datareaders
Posted by Dan at 9/28/2005 4:29:03 PM
We are reguarly getting deadlock errors on a page when it calls
SqlDataReader.Read(). If DataReaders are read only, forward only 'firehoses',
why would this be causing deadlocks? What can be done to resolve the problem?
**************************************************
Erro... more >>
DateTime parse
Posted by ahager via DotNetMonster.com at 9/28/2005 2:39:48 PM
I know I need to use the parse method of the DateTime but am unsure where or
exactly how to do it. I am trying to update a SQL database with an
unspecified amount of data and am passing in several columns whose datatype
is of type DateTime. Below is my code.
using System;
using System.Data.... more >>
Related Tables in Different Databases; how to query
Posted by Ed Warren at 9/28/2005 2:12:54 PM
Database1 contains a table of people with addresses (sql Server)
Table: People
MasterID MasterName MasterAddress1 etc.
DataBase2 Contains a table of people and the property they own. (msAccess ->
imported from the sqlServer but detached)
Table Property
PropertyID MasterID Prop... more >>
Help with adding stuff to a database please
Posted by JamesB at 9/28/2005 12:21:35 PM
Im just converting an app to .net (using VB) and I decided to use ado.net
also, rather than sticking with plain ado.
I have got my queries running fine with datareaders, but I'm having a little
trouble inserting records. I dont really want to use an SQL command as
single quotes in strings o... more >>
This simple ADO.NET connection is causing errors - HELP!!!!
Posted by Steve1 via DotNetMonster.com at 9/28/2005 11:25:42 AM
Hi all,
What wrong with the below snippit of code? I believe I've called the this
function correctly and besides all the errors (immediately below) are
pointed to this snippit of code. Thanks in advance, Steve.
} expected
Invalid token '(' in class, struct, or interface member declaratio... more >>
There is already an open DataReader associated with this Connection which must be closed first".
Posted by VIswanathan S at 9/28/2005 11:02:23 AM
Hi All!
i am using the oledb connection to connect Oracle database. I use the code
for connectiong to datawindow as
Public sqlca As Sybase.DataWindow.AdoTransaction
Public con as oledb.oledbconnection
'con as oracle connection
con.open()
sqlca = New Sybase.DataWindow.AdoTransaction(co... more >>
Business objects and class' w/ member DataSets
Posted by Steve at 9/28/2005 7:20:06 AM
I'm designing my data access needs and have a couple of questions.
First of all, I can't get a straight answer what a "business object" is. I
typically create classes to represent my database tables, are those
"business objects"?
Is it more typical to pass the business objecs to the DAL metho... more >>
ADO.net 2.0, beta 2, how to get data from 2 tables, not parent-chi
Posted by Peter at 9/28/2005 6:14:04 AM
in ADO.net 2.0 beta 2
I know how to do the parent-child type.
1. drag a DataGrid control in a window form, get a datasource from
table cust.
2. drag table cust onto the DataGrid.
3. in the data window, right-click the dataset, select configure..
adding table o.
4. drag t... more >>
Where are DataSets Stored??
Posted by Freeky Code at 9/28/2005 2:17:16 AM
This Point has always make me confuse
Sure that DataSet is in the RAM but where in the RAM the Server or the
Client
Shall be Very Kind of you if any one can take a lill of there time to
let know this Topic clear to me..
Thanks Dudes ;)
... more >>
ADO.NET AddNew EndCurrentEdit & "Column 'Appt_ID' does not allow nulls"
Posted by tony010409020622 NO[at]SPAM spamthis NO[at]SPAM hotmail.com at 9/28/2005 12:00:00 AM
Having spent a lot of time Googling over the last 2 days, this seems
like a common problem, but I havent run into any answers:
My VB.Net front end loads data from an Access database successfully,
and navigation works fine. However, I cannot add a record. Code is as
follows:
In my Add N... more >>
Working with different kinds of databases
Posted by Dino Buljubasic at 9/27/2005 7:21:41 PM
Hi,
How can I make my application work with SQL Server, Oracle, MySql,
etc?
_dino_... more >>
Need help with productDataSource.SelectParameters
Posted by syoung at 9/27/2005 6:40:58 PM
Does anyone knows how to assign the value of a textbox to =
productDataSource.SelectParameters when a button is clicked? I'm using =
VS 2005 and all the code I've found on the web are samples of dropdown =
lists with code in the aspx page.
Heres the subroutine where I'm stuck.
Prote... more >>
Trying to debug a connection issue
Posted by Clint at 9/27/2005 5:09:15 PM
I'm getting an "Unknown connection option: user" error when trying to
The connection string block in the dataConfiguration.config file looks like:
<instances>
<instance name="Instance1" type="Sql Server"
connectionString="Connect_String1" />
</instances>
<connect... more >>
|