all groups > dotnet ado.net > june 2006 > threads for june 15 - 21, 2006
Filter by week: 1 2 3 4 5
Designer Generated Code
Posted by Jessard at 6/21/2006 9:18:02 PM
Hi All,
Does anyone know how to modify the rules visual studio (or the designer)
uses to generate it's dataset, datatable, datarow, datatableadapter classes
when you use the wizard to generate a strongly typed dataset from a database
table/stored proc? I want the code that it outputs to be... more >>
Retrieving output params from stored procedure?
Posted by Djimbo at 6/21/2006 3:33:23 PM
Hi,
for example on the follow procedure:
create procedure myproced
@id int
as begin
select name,country from mytable where id=@id
end
i want to retrieve the output parameters from a stored procedure using
sqlserver,
the DeriveParameters only returns me the input param "@id", but ... more >>
Trasaction and dataset
Posted by flavio at 6/21/2006 3:21:34 PM
hello i would like to know a information
i've a form made to insert a new record in my database
the ID is calculated as a result of max of existing record and than add by
one
(but in this ID there are other data is not a simple counter)
is possible to create a transaction that look a table fr... more >>
SqlCommand which INSERTS and then SELECTs single value
Posted by Edward Diener at 6/21/2006 2:52:40 PM
I want to do an SqlCommand which INSERTs a row with an Identity column
and then SELECTs the single identity column with a SELECT ID from
MyTable where ID = SCOPE_IDENTITY(). The CommandText consists of the
INSERT followed by and separated by a ; from the SELECT. Does using the
ExecuteScalar ... more >>
Insert Null Date
Posted by ann at 6/21/2006 2:46:01 PM
How do I insert a null date into sql 2000? I tried this:
DateTime expireDate = (txtExpDate.Text.Trim().Length <= 0) ?
DateTime.MinValue : DateTime.Parse(txtExpDate.Text);
and
DateTime expireDate = (txtExpDate.Text.Trim().Length <= 0) ? null :
DateTime.Parse(txtExpDate.Text);
... more >>
Insert into Empty table problem
Posted by sun919 at 6/21/2006 11:29:50 AM
hi there,
I have problem regarding insert data into empty table. i have two fields
which is religionID and ReligionName
i have try to insert data that generate use @@identity inorder to find and
create id no. and it still doesnt work and i have try to do insert and update
into table and still n... more >>
How to: Query/Subquery against 2 datasets within application?
Posted by Tuna Fly at 6/21/2006 11:01:01 AM
I'm writing a .NET 2.0 windows forms application to do Phone maintenance. I
have 2 databases that exist on separate database servers, Employees and
Phones. They both use a common key, EmployeeNumber. I have been using a
subquery approach to populate a combo box with the Employees not in the
... more >>
Connection string for InterSystems Cache ODBC driver
Posted by Ronaldo Nascimento at 6/21/2006 9:34:01 AM
I want to form an ODBC connection string in C#.
I know how to plug all the connection data into the ODBC Data Source
Administrator, but want to do it programmatically.
I assume it is something like:
provider=InterSystems ODBC; host=127.0.0.1; port=1972; namespace=JDKKR;
login=foo; password... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Problems with Dataset
Posted by SEGACO at 6/21/2006 9:33:52 AM
Hi,
I'm trying to use a DataAdapter with a complex query (in Oracle) to fill a
Dataset, but the DataAdapter don't accept it, then I try to create the
Dataset manually with the same fields that the query returns in the Designer
that VS.NET2003 provides, and then, create the DataAdapter in ru... more >>
Connection to ORACLE: Need some explanations
Posted by tommaso.gastaldi NO[at]SPAM uniroma1.it at 6/21/2006 5:16:29 AM
Hi I have a question:
I have been connecting to oracle on my own machine successfully by
using either one of the 2 following:
Me.ConnectionString = _
"Provider=OraOLEDB.Oracle" & _
";User ID=" & Me.UserId &... more >>
Image Data retrieve from MSSQL200
Posted by ken at 6/21/2006 12:00:00 AM
Hi All,
if I use MSSQL200 to store bitmap/image files using datatype "image"
how can I retrieve from DB and shown in my window forms (VB.NET 2005),
and how can I save/upload those files into DB!?
I have search online and wouldnt find some sources code to resolve this
matter,
thx for your... more >>
datagrid operation
Posted by sai at 6/21/2006 12:00:00 AM
hi friends,
I am working on datagrid in windows application, I need to
retrieve row from datagrid whenever I double clicked on it . so plz suggest
me how to proceed.
Regards
Sai.
... more >>
Datagrid help needed
Posted by Keith at 6/20/2006 2:01:01 PM
Can someone try and explain detail to me of how they would begin to tackle
the following scenario:
I would like to display two EDITABLE datagrids:
1. The "master grid" - contains people's information - name, title, job
description, etc. Some of these columns will be IDs to other lookup-t... more >>
sqldatareader
Posted by Jeremy Chapman at 6/20/2006 1:52:46 PM
The most efficient way to get a recordset out of sql server is probably by
using a sqldatareader. I want to make a generic class that I can populate
with data from a datareader (an extremely slimmed down datatable, with less
functionality I suppose). Essentially it would store an array of ar... more >>
Concurrency violation and DateTime
Posted by Jim Brown at 6/20/2006 12:23:02 PM
I’m trying to design a front end program in VB.NET for a MS Access database.
I’m getting Concurrency Violation errors when updating if there is a DateTime
field in my table that has been edited in Access. Seems to be when there is a
Time value in the column.
This is even happening from ... more >>
Query runs slow from web app, but not from management studio
Posted by Jeremy Chapman at 6/20/2006 9:30:08 AM
This is odd, when I run a stored procedure from query analyzer or sql
server management studio my results return within about 3 seconds. but when
I run the same query from my web app I get sql timeouts sometimes and other
times it's just plain slow. I've verified that both are using the sam... more >>
Adding row to DataTable which has Sql Server identity column type
Posted by Edward Diener at 6/20/2006 8:51:24 AM
If I call NewRow() for a DataTable and add a row with an Sql Server
identity column, whose value I set to null before calling
DataTable.Rows.Add, does the identity value get created immediately in
the new row of the DataTable ? If so, how do I determine the value of
the identity column after... more >>
datatable write to xml file - visual studio 2003
Posted by Orr at 6/20/2006 8:17:27 AM
hi
can anybody pls help me?
i am trying to write a datatable to xml file
in visual studio 2005 it goes like this:
datatable dt = new datatable();
dt.writexml(saveFileDialog1.FileName);
in visual studio 2003 dt doesn'n have this property "writexml"
how do i do it?
... more >>
Detect when user modifies a value in a bound textbox
Posted by James Minns at 6/20/2006 12:00:00 AM
Hi,
I have a form which views exactly one record from a dataset. It uses a
BindingSource and has bindings linking several textboxes to the data.
I would like to enable / disable the "Close" "OK" and "Cancel" buttons on
the form according to the row status; What is the best way to do this? I... more >>
Using a network path not working
Posted by Mike at 6/19/2006 7:23:48 PM
Hi all, I have a vb.net program running as a service that uses a network
path to query a file.
If System.IO.File.Exists(fpath & "\" & filename)
Can anyone tell me why the above isn't working? When I place it in a none
service program it works fine.
Any help appreciated.
Thanks in... more >>
MS Access Security
Posted by JosephByrns at 6/19/2006 2:04:01 PM
Can someone please advise me on Access security (generally I use SQL Server,
where security is much more straight forward to set up).
I have an Access db with users setup using Tools->Security->User and Group
Accounts.
I then create the various permissions using Tools->Security->User and Gro... more >>
Connect to SQL Server 2005 on a server in a workgroup
Posted by BobRoyAce at 6/19/2006 10:04:58 AM
NOTE: This is a modified repost of
http://groups.google.com/group/microsoft.public.dotnet.framework.adon...
I have a bunch of lcient PCs that are primarily running Windows XP and
Windows 2003 and they all belong to the same workgroup. In addition, I
have a server PC that is running SQL Server ... more >>
Connecting to SQL Server 2005 on a server in a workgroup
Posted by BobRoyAce at 6/19/2006 10:00:56 AM
NOTE: This is a modified repost of
http://groups.google.com/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/f50e59feea1d12ab?hl=en
I have a bunch of lcient PCs that are primarily running Windows XP and
Windows 2003 and they all belong to the same workgroup. In addition, I
h... more >>
Do I need to close DataReader explicitly?
Posted by Matt at 6/19/2006 6:02:02 AM
If I close the connection, would the reader already open on the connection be
automatically closed without explicitly closing the reader? I have an
ASP.NET app that on a daily basis generates 'there is already an open
DataReader ...' exception. I search the code to see where I am calling a
... more >>
Newbie Question from former DAO user --> my.settings and ConnectionString
Posted by Andre Rode at 6/19/2006 2:22:35 AM
Hi NG,
I was working with VB6 and DAO till now, I'm trying some first steps
with VB.NET 2005 and ADO.NET and some questions came up to me
first: I defined in "My Project" - "Settings" a Connectionstring,
pointing to a mdb Access Database. Works so far. For some reason, the
location and/o... more >>
How to return counter value from MS Access
Posted by Henke at 6/18/2006 11:50:32 PM
Hi
I'm using VS 2005 and TableAdapters to manipulate data in an Access 2003
database.
For id-values i use a counter field in Access. How can the value of the
id-field of the newly created row be returned?
Thanks in advance!
/Henke
... more >>
DataAdapter and inserting into a table with a AUTO Counter field?
Posted by David at 6/18/2006 3:17:51 PM
When using a DataAdapter to insert new records into a table, can ADO
obtain the value of a AUTO Counter field, eg. one generated by the
database, and place it back into the datatable/row during the insert?
The only way I can see to do this is to insert the information and
then refresh the table.... more >>
Help with: odbcdataadapte and update command
Posted by David at 6/17/2006 10:50:55 PM
I am having an issue with generating update command in a
odbcdataadapter with VS 2003. (Eg dragging the table from the server
and dropped on a form).
The table has a primary key, but it does not appear to see the key or
use it in the update command. Is this a bug in the 1.1 framework or
do y... more >>
ConnectionStringBuilder: Automatic quoting problem
Posted by Michael Russell at 6/17/2006 10:07:17 PM
I've got a form that allows the user to enter the information to build a
connection string for various data connection types. I've run into a
problem testing the ODBC for a dsn-less connection, using a MS Access
database.
I fill out the minimum required information (Driver and Datasource/D... more >>
datagridview does not update in master detail relation
Posted by Dirk W at 6/16/2006 9:03:20 PM
I setup a simple database with a master and a detail table. Both are
connected via a datarelation. Data of each table is shown in a
datagridview (dgLektion and dgLektionlernkarten). When I start the app
for the first time, everything works fine: all master rows are shown
in dgLektion and the app... more >>
How to specify the sort field in Gridview
Posted by ad at 6/16/2006 7:37:24 PM
How can we specify the data in a gridview to be sorted by a spcified column?
... more >>
Best practices for using Connections in connected environment?
Posted by Michael Russell at 6/16/2006 2:22:38 PM
Hi all,
I'd be interested in hearing opinions for best practices regarding
handling data connection in a connected (desktop client/server)
application environment. I'm working with the assumption that the
database (driver/component/etc.) supports pooling. I'm currently
working on an MDI... more >>
Query Strings using Web Matrix
Posted by glenn at 6/16/2006 11:44:01 AM
Hi folks,
I have two tables in one database.
One table has an automatic numbering primary key named ID and is named rfi.
The other table has a field named rfinumber and is named discussion.
Both ID and rfinumber have a datatype of number.
Upon using the querybuilder with Web Matrix, ... more >>
Unable to update gridview
Posted by Terence at 6/16/2006 11:39:02 AM
Hi,
I have a web user control which includes a gridview and a sqldatasource. It
also has a property called TableName which is used to populate the gridview.
However, i'm running into a problem where i can select and delete row but i
cannot update a row.
Here is the code in the usercont... more >>
Count Of items, Count of Items Passed and percentage passed
Posted by Jay Balapa at 6/16/2006 10:55:57 AM
Hello,
Underlying table has the following fields and values
Barcode Item Pass
1000 x YES
1001 x YES
1002 x NO
1003 x NO
1004 y YES
1005 y YES
1006 y NO
Iam trying to create a... more >>
Can't get DataView to sort correctly.
Posted by tshad at 6/16/2006 9:23:59 AM
I do a select into a Dataset, apply a DataView to it and then sort it. But
the sort is not correct. I am sorting it by the UserName and it is not in
alpha order when I bind it to my datagrid.
When the filter and sort look like:
dv.RowFilter: ActionType = 1
dv.Sort = UserFullName asc,Sessi... more >>
Connecting through a proxy
Posted by keeper NO[at]SPAM dynafus.com at 6/16/2006 4:50:11 AM
I have a client application that I want to connect to an Sql Server but
the client machine is behind a proxy.
I've been told that the application has to connect to the proxy with a
username/password on port 8080, but is this even possible for an
SqlConnection, if so what would the connection s... more >>
Microsoft Jet 4.0 Engine can't work properly
Posted by Goh at 6/16/2006 3:12:27 AM
Hi,
Recently I has try to install some of my software in a PC. and my
software are actually using microsoft MSADO objects. The problem come when I
try to run this software in this pc. The computer throw an error said that
"Provider is no longer available. Ensure that the provider is ins... more >>
DataBinding across multiple form
Posted by Goh at 6/16/2006 3:04:34 AM
Hi,
let said my form1 got a dataset and datasource my form1 got some textbox
is binding with the dataset currently.
If I got another form2 can I bind form2 textbox from form1?
And after I bind I evetually need to update back what ever changes in form2
textbox back to the dataset.... more >>
Share Dataset across multiple windows form
Posted by Goh at 6/16/2006 3:00:31 AM
Hi,
Got question every time windows from is load database, are dataset
is isolated with others form? if this is true then it mike take up allot of
memory space.
Can we actually share the same dataset across multiple windows form
to prevent every fill data from database.
... more >>
Strange problem while inserting row into table.
Posted by trialproduct2004 NO[at]SPAM yahoo.com at 6/16/2006 12:17:31 AM
Hi all,
I am facing one problem while inserting data into table through windows
application.
I am having one table in sql server containing one field for which i
set default value as 'getdate()' while designing that table only.
So when i add reords to that table through sql query analyser... more >>
expression in data column and Type GUID
Posted by Dirk W at 6/16/2006 12:00:00 AM
in my app I have two tables, which are connected with a datarelation.
Now I want to include a new datacolumn in the master table with an
expression that shows the number of rows in the detail table. My idea
was to simply count over the ID column of the detail table which is of
type GUID.
dsCa... more >>
DbDataAdapter and RowUpdated event
Posted by Michael Russell at 6/15/2006 10:02:04 PM
I'm working on a small app that will talk to different databases, and so
far it's been working great using a generic database factory model.
However, I've run into a situation where I need to be catching some
DataAdapter events, and found that I can't.
So I'm asking, is there an easy way to... more >>
Mysterious problem
Posted by leodippolito NO[at]SPAM gmail.com at 6/15/2006 9:49:08 PM
I have these tables:
Questions
- id (PK)
- description
- status
Replies
- id (PK)
- status
- idQuestion (FK)
I am trying to run this query within an ASP.NET application (OleDB):
---
SELECT QUE.id, QUE.description, QUE.status, COUNT(REP.id) AS
NumberOfRep... more >>
Argument out of range ..really?
Posted by Earl at 6/15/2006 5:58:59 PM
This is a replicated database from SQL2k to SQLCE.
I'm getting an ArgumentOutOfRange exception when I try to add this parameter
(all other params are ok):
pc.Add(New SqlCeParameter("Age", SqlDbType.VarChar, 3, "Age"))
In the main database, this is indeed the column name, datatype and ... more >>
Connecting to SQL Server 2005 on a server in a workgroup
Posted by BobRoyAce at 6/15/2006 5:49:59 PM
I have a bunch of lcient PCs that are primarily running Windows XP and
Windows 2003 and they all belong to the same workgroup. In addition, I
have a server PC that is running SQL Server 2005 and it also belongs to
the same workgroup. I am writing a Windows Forms application, using
Visual Studio ... more >>
Simple DataReader to Business Object
Posted by J055 at 6/15/2006 1:23:59 PM
Hello
I normally use DataTables to retrieve data but I thought I should probably
be using DataReaders to populate a Business Entity Object with a single
record at my DAL. I'm struggling to find some good examples on the subject.
Is there a better way of doing this? Is this faster then get... more >>
updating dataset when original data adapter has been disposed of.
Posted by smHaig at 6/15/2006 11:37:02 AM
Hello:
I have a separate module that creates my dataset and passes it back to my
form. I am using vb.net 2003 with ado.net and sql server 2000. The
dataadpator that creates the dataset using a stored procedure is disposed
right after the dataset is created.
Now I want to update that ... more >>
ADO .NET 1.1 SqlClient and Sql Server 2000
Posted by Edward Diener at 6/15/2006 8:10:26 AM
Can I access an Sql Server 2000 database with ADO .NET 1.1 and the
SqlClient classes. The doc mentions Sql Server 7 and I want to make sure
the driver also works with Sql Server 2000.... more >>
Cannot load schema to dataset
Posted by Petri at 6/15/2006 4:28:01 AM
Hi,
I'm trying to read an XML schema into a dataset and it fails. I tried both
ways, importing it into VS.NET and then generating dataset there, or using
dataset.readxmlschema("Filename.xsd") method. Both complain about the same
thing, undefined data type : 'monetaryAmount'
The schema its... more >>
How can I update a datatable?
Posted by Arne Garvander at 6/15/2006 3:14:02 AM
One the columns in my gridview needs to be computed.
I am not able to get my computed value to stick.
DataTable orders;
getSqlData(orders);
for (i = 0; i < orders.Rows.Count; i++)
{
orders.Rows[i][8] = i * 8;
}
GridView1.DataSource = orders;
GridView1.DataBind();
How can I get a gr... more >>
code query
Posted by Adrian at 6/15/2006 12:00:00 AM
Q: In the code below: how do I give the key a value?
new_data["key"] = whatever; gives the error column not found.
Many thanks,
Adrian.
private void Form1_Load(object sender, System.EventArgs e)
{
string connect = "server = fred\\sqlexpress; database = TrialDB; Integrated
Security = TRUE... more >>
|