all groups > dotnet ado.net > august 2005
Filter by week: 1 2 3 4 5
Connection as a static class
Posted by Water Cooler v2 at 8/31/2005 7:55:17 PM
Is it alright if I took a static class that wrapped around a
SQLConnection object on a web application? Or should I make it an
instance class?
If I have a static class, would there be just one code instance of the
class in the server process/app domain for all the clients/browsers?
So, if a p... more >>
What's the better way to modify rows in a table?
Posted by Water Cooler v2 at 8/31/2005 7:52:15 PM
What's a better way to add a new row to a table:
(1) An Insert SQLCommand object? or;
(2) Through the DataRows collection doing it manually and then calling
Update on the Adapter?
... more >>
Disconnected architecture on SQL IDENTITY
Posted by Water Cooler v2 at 8/31/2005 7:50:21 PM
Let's say I have a table with an IDENTITY column,
create table Foo
(
id int IDENTITY not null primary key,
SomeThingElse varchar(50) null
)
Since DataSet(s) are disconnected, what impact would two concurrent
statements have on the IDENTITY column:
Dim dr as DataRow = New DataRow
dr(... more >>
Is the DataReader disconnected?
Posted by Water Cooler v2 at 8/31/2005 4:55:58 PM
Like the dataset, is the datareader also a disconnected datasource? It
doesn't look like because of two reasons:
(1) It is forward only. Having a connected stream would make more sense
to reflect recent updations to the original database from other
connections of other users.
(2) It would b... more >>
Hwo to use mySQL database with .Net Compact Framework
Posted by den 2005 at 8/31/2005 4:48:01 PM
Hi Everybody,
I am new at this group/forum. I am a .Net Programmer from Manila,
Philippines.
I like to ask anyone who can help me how to use mySQL database in
programming Visual Studio .Net Smart Device Application (.Net Compact
Framework). Specific question is it seems the System.Data ... more >>
Dynamic retrieval of MS-Access Tables and Relationships
Posted by saran at 8/31/2005 3:26:03 PM
Hi,
I would like to retrieve MS-Access database tables, columns and
relationships dynamically from .NET. However I could not find any
article/help material to do that. Could any one help me in this regard?... more >>
SQLClient Data access errror
Posted by John Beschler at 8/31/2005 1:43:01 PM
I have the following code:
private int buildetcsforacctperiod(int iAcctPeriod, string szSEMS_User_ID)
{
SqlDataReader Reader;
int iCounter;
int iRows;
int rtn;
string szWBS_Number;
iCounter = 0;
szSQL = "sp_FCT_099_GetJobList "
+ "'" + szSEMS_User_ID ... more >>
SQLClient Data Access Error
Posted by John Beschler at 8/31/2005 1:31:09 PM
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to get Number of columns in a dataset
Posted by tshad at 8/31/2005 1:17:49 PM
How do you get the number of columns in a dataset?
I know that I can get the number of rows by:
DataSetObj.Tables(0).Rows.Count.
Also, how do I get the name of the column. I can get to the data by name
DataSetObj.Tables(0).Rows(ktr).Item("Name")
Is there a way to find out what... more >>
getting the value of a datacolumn
Posted by CyberBless at 8/31/2005 12:37:39 PM
I have a combobox that list two items. Lets call it cbxCombo. I have
a table extracted from an MS SQL database. This table has a column
that will either be 1 or 2. If the value in the table is 1, the
cbxCombo.SelectedIndex = 0. If the value in the table is 2 the
cbxCombo.SelectedIndex = 1. ... more >>
Getting Xml Data from String
Posted by tshad at 8/31/2005 11:59:53 AM
I have a proceedure that reads data from a Web Service.
The data is sent back in a string. I can put this string into a Textbox,
which works fine.
I now need to get the data without the tags and was trying to use the
ReadXml method of a DataSet object. Apparently, this only works with
re... more >>
using dataadapter.update changes the insertcommand.commandtext
Posted by jerrydy at 8/31/2005 10:33:04 AM
I have a dataadapter where i have changed the insertcommand.commandtext to
have the following insert and select:
"INSERT INTO my_table (col1) values (@p1); select scope_identity() as pk"
I modify the dataset and perform an update on the dataadapter so the changes
are reflected in the datab... more >>
Executescalar, retrieving a value
Posted by Steve Schroeder at 8/31/2005 10:03:40 AM
From MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataIDbCommandClassExecuteScalarTopic.asp
Use the ExecuteScalar method to retrieve a single value (for example, an
aggregate value) from a database.
Public Sub CreateMySqlCommand(myScalarQuery A... more >>
I would learn ADO.NET 2.0 - There are Tutorials or online books?
Posted by Giuseppe Pezzella at 8/31/2005 9:58:26 AM
Dear friends
I have installed visual basic 2005 beta 2 and sqlexpress 2005 and by video
tutorial downloaded from visual basic express site I have created a very
simple database application.
This tutorial create database application utilizing IDE Wizard, instead I
would learn
to created ... more >>
Adapter.Fill error
Posted by Harry F. Harrison at 8/31/2005 9:00:46 AM
I'm getting the following error on the Adapter.Fill method:
A first chance exception of type 'System.NullReferenceException' occurred in
system.data.dll
Additional information: Object reference not set to an instance of an
object.
Here's the snippet of code:
Friend Function Load(ByVa... more >>
Thru Windows Service connecting to SQL server database using windows authentication
Posted by raku at 8/31/2005 2:35:58 AM
Hi
I am trying to connect to SQL server data base using NT authentication
from my window service code.
_bstr_t bstrConn =
_bstr_t("PROVIDER=SQLOLEDB;SERVER=SD1;DATABASE=MEDICAPT;TRUSTED_CONNECTION=YES;");
m_pConnGenGuiDB->ConnectionString = bstrConn;
m_pConnGenGuiDB->CommandTimeou... more >>
read only data fetching
Posted by sahridhayan at 8/31/2005 1:48:04 AM
hi all
i have some modules in my app.. reads data (always)
i am using datareader and should i set any transaction and isolation level
so that
like specified in MSDN, lower isolation level will give lot of performance..
should i include a "select * from.." inside a transaction?
i thou... more >>
Wii close connection?
Posted by ad at 8/31/2005 12:00:00 AM
I have a function call MyExecuteNonQuery(see bellow)
When I call it with some Sql command like:
MyExecuteNonQuery("Delete from myTable);
Will it close the conneciton which opened in MyExecuteNonQuery?
----------------------------------------------------------------------------
pu... more >>
Request For Opinion (data file performance).
Posted by Lloyd Dupont at 8/31/2005 12:00:00 AM
I'm writing a program at home for general public which store its data in a
datafile.
Fearing the data loading could be long, I used an embeded datafile engine
(SQLite), because this way I could read/write/delete file incrementally
(unlike what I could do with tar-gzipped XML file for exampl... more >>
Question about DataAccess Block
Posted by ad at 8/31/2005 12:00:00 AM
I user DataAccess Block in my progrm.
http://www.microsoft.com/downloads/details.aspx?FamilyId=F63D1F0A-9877-4A7B-88EC-0426B48DF275&displaylang=en
I often uses the code:
string sSql="Select...";
string cnnStr="....";
SqlDataReader dr=SqlHelper.ExecuteReader(cnnStr, CommandType.Text, sSql);
.... more >>
.net & Visual FoxPro error
Posted by V.V. Singh at 8/31/2005 12:00:00 AM
Hi Everyone,
This is my code for making a connection to a Visual FoxPro free table and
querying it.
I get the following error message
File iddxstrippunc.prg does not exist
I have tested the dsn through access link tables and it seems to work fine.
Any help would be appreciated.
... more >>
File format for a new application
Posted by Lloyd Dupont at 8/31/2005 12:00:00 AM
(I know it's a seond post, but I think I explain it better this way)
--
On my own I'm writting an application for the general public.
(a bit like word, except it has nothing to do with word ;-)
So far I used an embeded database engine to store the data (SQLite), I like
the concept because ... more >>
The conneciton in DataAccess block
Posted by ad at 8/31/2005 12:00:00 AM
Thanks,
There are many other convenient function in DataAccessBlock like
ExecuteDataset, ExecuteScalar, they all return some object or dataset..
I think they all must open a connection in their funciton.
When I call them like:
string cnnStr="...";
sCmd="Select ..";
DataSet ds=ExecuteData... more >>
How to change the value of timeout in program
Posted by ad at 8/31/2005 12:00:00 AM
When usr process some data in program, it will result in time out.
How to change the value of timeout in program?
... more >>
Connection to Oracle - Help
Posted by Fernando at 8/30/2005 10:48:39 PM
Hi
I'm new in ASP.NET
I have TNSNAMES.ORA with all information I need
I have the path of TNS_ADMIN correctely pointing to TNSNAMES.ORA folder
This is true because I have no problems conecting to Oracle using VB 6 or
VBA
With ASP.NET I get always TNS error
Did I miss something ? what... more >>
SQL Error - PLEASE HELP
Posted by Dino Buljubasic at 8/30/2005 8:50:52 PM
Hi,
My app (VB.NET, .NET Framework 1.1) intalls database tables for a
database. Then it is supposed to create full-text catalogs. It works
well on my machine but not on another machine.
here is error message I get:
An unhandled exception of type
'System.Runtime.InteropServices.COMExcepti... more >>
Grouping??
Posted by Charles A. Lackman at 8/30/2005 4:00:41 PM
Hello,
I have a dataset that has rows with data that are all different. In some of
the rows the "DescID" and "PlaceID" are the same, but primarilly they are
all different. What I am trying to do is group all the rows that have the
same DescID and PlaceID. If there are multiple rows with ... more >>
HasChanges does not change even after EndCurrentEdit() is called HELP!
Posted by mqasem NO[at]SPAM gmail.com at 8/30/2005 3:01:33 PM
I am losing my mind. I can't figure this out. I have a dataset and a
textbox that is bound to it. I edit the textbox value and click a
button to submit the changes to SQL CE server. I call EndCurrentEdit(),
and then I check the value of HasChanges(). I always get a false. What
am I doing wrong... more >>
BUG Found : DB2 OleDB Connections not closing with Framework v1.1
Posted by Johanl at 8/30/2005 2:17:04 PM
Problem : Calling .Close() or using {...} (or any combination or these) with
a OleDBConnection does not close the connection to DB2.
Solution : Uninstall Framework v1.1 Service pack 1
Using : IBM OleDB Provider version ("DB2 v8.1.6.574")
Reproducible on W2k and XP.
Any solution to th... more >>
Anyone have a DAL Generator?
Posted by AMDRIT at 8/30/2005 10:54:48 AM
Hello everyone,
Anyone out there have a DAL Generator Utility for sale for free that mimics
what happens in the IDE designer when you drag a dataadapter onto a
component?
I like what MS did here, I just don't like the instantiation of all the
objects on New().
They Do:
Sub Initia... more >>
Batch Statements
Posted by Vinny Vinn at 8/30/2005 8:51:41 AM
I have used simple batch statments with C# (ans SQL Server 2000).for example:
string select = "select model from cars where id = ?;select * from trucks
where model = ?";
where ? is a parameter whose value i have before running the bach statment.
I was wondering if it possible to use the valu... more >>
DataAdapter with different SQL's
Posted by ivanfernandes NO[at]SPAM flashmail.com at 8/30/2005 8:12:54 AM
Hello,
Created dataadapter select with this command
"select * from emp where empid IN (123,456,789)";
Filled and sent dataset to remote client. lost original dataadapter
Remote client works with the dataset and sends it back
Created a new dataadapter select with this command
"select * fr... more >>
Rowfilter on child recorsd only works with Fill
Posted by olrt at 8/30/2005 7:05:17 AM
Hello everybody,
I have a dataset containing two related tables :
Master,
Detail.
I have used the designer to create a form
with two DataGridView.
I want to filter parent records so that only those
which don't have child records are listed.
In the Form_Load, I have created a Data... more >>
Auto update data on RowChanged
Posted by Wigno at 8/30/2005 12:00:00 AM
Hello,
i want to auto update a datatable (SQLDataAdapter.Update(myDatatable)
) during RowChanged event
It is possible?
thanks
wgn... more >>
Hierarchical data
Posted by Griff at 8/30/2005 12:00:00 AM
Hi
I'm a VB6 developer tasked with taking a VB6 application and turning it into
a .NET application. I'm just doing a bit of reading up at the moment...
The VB6 application does a lot of queries returning hierarchical ADO
recordsets, sometimes this goes as far as 4 chapters deep... This d... more >>
Save Table in MSSQL
Posted by PawelR at 8/30/2005 12:00:00 AM
Hello Group,
In my application I create new DataTable (name : myTable). How save this
table on sql server as myTable.
Thx
PawelR
... more >>
MSDE help
Posted by Nathan M at 8/29/2005 7:27:01 PM
I'm looking for help getting started with MSDE. Anyone have any suggestions?... more >>
BindingContaxt
Posted by nbohana at 8/29/2005 5:06:04 PM
I am trying to insert a new record into a sql table, that has a field that is
a key field. Before I can insert the record I get a message when the
statement with the '***' is executed. is there a way to code around this???
MESSAGE:
"System.Data.NoNullAllowedException: Colume 'taskid' does ... more >>
Emergency! Too Busy A Connection!
Posted by Ehsan at 8/29/2005 3:21:02 PM
Hi.
I have a problem with an OLEDBConnection object that is supposed to serve for
a number of clients that need data from my Access(mdb) database.
These clients are placed in different threads and try to load data from this
connection. The problem is that when the connection is retrieving data ... more >>
FUNCTION as DATASET
Posted by davis NO[at]SPAM ds3cs.com at 8/29/2005 12:35:29 PM
I am trying to create a function that passes a Dataset. I know the code
works because if I cut and paste it on my file in code behind it works
fine.
The actual task is to create the Dataset from a SQLDataAdapter within a
function. Then I want to call the function to fill a dropdown list on
m... more >>
transaction with unknown nbr of commands
Posted by Alex S Moore at 8/29/2005 9:15:17 AM
Using vb.net for code behind on a asp.net application.
I need to run a number of sqlcommands, based on user input. The commands
need to run as a single transaction. The commands are all stored procedures.
How do I do this? I was thinking that I could build an array of the
sqlcommands, b... more >>
SQL debugging
Posted by Arne at 8/29/2005 8:52:56 AM
I have setup my project for SQL debugging. I get the error message
Unable to start SQL Debug session.
Ensure SQLDBREG2.exe and Proxy/stub dllsqldbg.dll are registred on this
machine.
How do I get these registered?... more >>
Object reference not set to an instance of an object - Exception in System.Data.OracleClient
Posted by MBO at 8/29/2005 12:00:00 AM
Hello NG,
We are facing sometimes the following exception
....
Object reference not set to an instance of an object.
------------------------------ Stack Trace ------------------------------
at System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject,
Boolean& isInTransa... more >>
Why can run with Users
Posted by ad at 8/29/2005 12:00:00 AM
I use VS2005 to develop Asp.net program.
If the asp.net just belong to Users group, my aps.net can't run. It's error
message is : "Login failed for user 'D610\ASPNET' (D610 is my machine name)
But if I add Administrators to Asp.net account, my asp.net program can run
well.
Why? I have found ... more >>
How to determinate the vesion of Sql2005
Posted by ad at 8/29/2005 12:00:00 AM
The user of my asp.net program use Sql2005 or Sql2005 express as database,
both are possible.
I have try both version of data base, I found:
If I use Sql2005 express, the Data Source in connection string will be
..\SQLEXPRESS, like:
Data Source=.\SQLEXPRESS;Initial Catalog=myDB;Integrated S... more >>
What is threadsafe mean ?
Posted by Woo Mun Foong at 8/28/2005 7:11:01 PM
Hi,
I am newbie to multithread programming.
When I read some writeup about classes, i.e. Dataset or Dataview
sometimes it said it is safe for multithreaded read operations and you must
synchronize any write operations.
What does the above statement means ?
Thank You,
mfwoo... more >>
Textbox DataBinding
Posted by Joe Reggae at 8/28/2005 11:40:58 AM
I don't fully understand control binding in c# programs and wonder if
someone could clarify things for me.
I have two related tables ...
Parent: USERS (names)
Child: USER_CONTACT (telephone numbers, etc)
To the child table I've bound several textboxes as follows ...
myTextbox.DataBind... more >>
How to Store Multidimensional DataSet (.NET 1.1)
Posted by Axel Dahmen at 8/28/2005 12:00:00 AM
Hi,
I want to read a bunch of related tables into a DataSet, update some data in
some of the tables and save the changes back to the database. How can this
be done? Can someone please point me to a corresponding tutorial? I've been
searching through MSDN but couldn't find anything appropriate.... more >>
How to select a sequence of datetime records
Posted by Carlao at 8/27/2005 2:00:02 PM
I have a table where the records are inserted in intervals of 500ms. I need
create a SP where the records are selected in the following basis:
1. One of the fields is a datetime type
2. An initial datetime is provided as an argument
3. I need read the first 400 records (for example) where the f... more >>
How to join two tables.
Posted by Speed at 8/27/2005 5:42:22 AM
i have two tables as follows:
first table:
Id Name Age
2 ABC 21
3 XYZ 22
second table:
Id Salary Exp
2 10000 2
3 20000 5
The Id columns in both the tables being the primary keys.
and wat i want is
Id Name Age Salary Exp
2 ABC 21 10000 2
3 XY... more >>
|