all groups > dotnet ado.net > may 2006 > threads for may 15 - 21, 2006
Filter by week: 1 2 3 4 5
Typed dataset - how to I alter SelectCommand
Posted by DG at 5/21/2006 5:35:31 PM
Hi,
Can anyone advise how I alter the SelectCommand in an auto-generated typed
dataset programmatically? The select command would be part of a search
condition built by user inputs in the GUI.
Thanks,
DG
... more >>
CRUD on parent/child rows in a typed dataset
Posted by mike at 5/21/2006 10:55:32 AM
i am new to ADO.NET!
i have created a typed dataset with parent and child types. is there a
straightforward way to load parent records and have child records load
automatically rather than manually loading tables using Fill method
with citeria arguments?
when disconnected application perfor... more >>
DataSet nested relations
Posted by Vad at 5/21/2006 4:12:41 AM
Hi, all.
I'm trying to set relations between two DataSet tables.
The problem is, that the key of the parent table has more columns
than the child table, something like this:
ParentTable(id, name, amount)
ChildTable(id, name)
So I can't relate the column "amount" to any column of ChildTab... more >>
How to tell the version of SQLServer2005Express
Posted by ad at 5/21/2006 12:00:00 AM
How can I tell the version of SQLServer2005Express if it is SP1?
... more >>
Geting tables from an MDB file
Posted by Paul Wardle at 5/20/2006 9:47:28 PM
I am using .Net 2.0 - how do I get the available tables froma MDB file? I
tried:
DataTable dt = connection.GetSchema("Tables");
But this returns system tables, as well as the tables I need. How do I
restrict this?
When I enumerate the available restrictions, I get 3: TABLE_CAT,
TABLE_SC... more >>
odbc works in one application, not in another
Posted by Ben at 5/20/2006 3:09:08 PM
Hi,
I made two rootapplications with VWD under IIS 5.
I installed ODBC.net connector from Microsoft and Myodbc 3.51 from Mysql.
The same files (test.aspx and test.aspx.vb) has been copied in both
rootapplications.
In the first rootapplication, it works.
In the other, i get:
"Type 'Microso... more >>
Sqlparameter with "IN " sintaxe
Posted by João Santa Bárbara at 5/19/2006 5:41:58 PM
Hi all
i have this query .
Ex: "Select * from tblMove Where ID IN (1,2,3,4,5) and i want to replace
the "1,2,3,4,5" with a parameter.
is it Possible ?!
thlks
JSB
... more >>
SqlBulkCopy to not insert IDENTITY field
Posted by Bryce K. Nielsen at 5/19/2006 2:51:03 PM
I'm using SqlBulkCopy to copy over data from one table to another, BUT I
don't want the Identity field to be copied, and rather want the new server
to auto-generate the identity values. What's the best way to accomplish
this?
At first, I was hoping that I could just use WriteToServer and in... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
CREATE VIEW error
Posted by Edwin Knoppert at 5/19/2006 2:28:27 PM
I have serious issue by inserting a query using (names are fake):
CREATE VIEW Query1 AS
SELECT Count(Table1.ID) AS CountOfID, Day([DatumAanmaak]) AS Dag,
Month([DatumAanmaak]) AS Maand, Year([DatumAanmaak]) AS Jaar
FROM Table1
GROUP BY Day([DatumAanmaak]), Month([DatumAanmaak]), Year([DatumA... more >>
SqlDataSource
Posted by Victor Rodriguez at 5/19/2006 10:47:40 AM
Is there a way to pass a SqlDataSource from one page to another having
captured data on the first one but not sent it to the server until the
second page has capture some other data?
thanks,
Victor
... more >>
Insert Problem
Posted by Joe Delphi at 5/19/2006 9:12:51 AM
Hi,
I am attempting to do an INSERT operation using the OleDBCommand
object. I am receiving this error message:
"Object must implement IConvertible"
Here is the part of my code where the error occurs:
Dim cmdInsert As System.Data.OleDb.OleDbCommand
cmdInsert = ... more >>
sort a typed dataset table
Posted by Federico Caselli at 5/19/2006 12:52:01 AM
Hi,
my application must iterate through a typed dataset table and I should set
a record-order before I itarate.
I gave a look at the dataview but it seems it cannot be typed...
Can you help me?
... more >>
How to...?
Posted by ElHombre at 5/19/2006 12:33:21 AM
Hi!
I'm new to C#.
In a SQL-database I have:
tblZipCodes:
ZipCodeID
ZipCode
City
tblCompanyInfo:
CompanyID
CompanyName
Adress
ZipCodeID
Phone
Now on the form, in C#, I'll have an extra textbox - 'city' - which
will display what city after
the ZipCodeID, which is a combobox, ... more >>
An serious bug.
Posted by ad at 5/19/2006 12:00:00 AM
I am use VS2005 to develop Web application.
I put some DataTableAdapters in a ClassLibrary. When the Web Application
need to deal with data, it call the methods in the ClassLibrary.
It run ok in the VS2005 IDE. But when I deployment my Wep applicaotn to Web
server, my WebApplicaiton fail to up... more >>
Enumerate tables and fields by query?
Posted by Edwin Knoppert at 5/19/2006 12:00:00 AM
At http://www.w3schools.com/sql/ i don't see a way to enumerate tables (and
fields).
Is there way ala SQL?
... more >>
Import file into Access database
Posted by sham at 5/18/2006 7:23:55 PM
Hi to all,
I need to import a file (csv) into an empty access database.
If I do this manually, I would have to :
1) Open access and select get External data
2) Check delimited text
3) Then go to the next tab and select text qualifier " and click box "First
Row Contains Field names"
4) Ch... more >>
Record Count from Data Reader
Posted by RKNET at 5/18/2006 7:04:02 PM
How to find the Record count from the Data Reader (ADO.Net) is there any way
to do it without looping thru the records ? Please let me know.
Thanks,
RKNET... more >>
how to use a stored procedure?
Posted by Ben at 5/18/2006 5:49:59 PM
Hi,
I want to execute a stored procedure ("myquery") in Access. I use the oledb
connector.
......
Dim oConnection As System.Data.OleDb.OleDbConnection
oConnection = New System.Data.OleDb.OleDbConnection()
Dim comd As System.Data.OleDb.OleDbCommand
Dim... more >>
checking if data reader is open
Posted by Smokey Grindle at 5/18/2006 10:00:18 AM
is there any way to check if a data reader is open if you dont know the
original object that created it? I keep getting data reader is open errors
yet I never used a data reader in this project ever... so i'm having a hard
time tracking down whats happening here. thanks!
... more >>
ADO.NET Timeout Exception - I have tried everything
Posted by sorcerdon NO[at]SPAM gmail.com at 5/18/2006 8:40:53 AM
Hello!
I am looking for someone who has solved this multi-million people's
problem. EVERYONE seems to ahve this problem.
Im a creating a data set and populating it with a call to a store proc.
Its a complex stored proc with the end result as an insert to a temp
table. Then I do a select fro... more >>
Get specific rows from dataTable using the SELECT method.
Posted by Niron kag at 5/18/2006 8:33:02 AM
I try to get specific rows from dataTable using the
select method with simple criteria.
For the following lines I the values of the variables are :
expression : "Account like 6133101" ("Account " is the name of my
column.)
[CODE]
System.Data.DataRow[] foundRows;
string expressio... more >>
Updating a dataset using SqlDependency
Posted by ChrisAtPhaseWare at 5/18/2006 8:13:01 AM
I am trying to update a DataGrid by binding to a dataset located in another
class.
In this class, I subscribe to a Query Notification using a SqlDependency.
In the SqlDependency's OnChange event, I attempt to merge a temporary dataset
FILLed with a DataAdapter with a private dataset of the c... more >>
UPDATE with WHERE IN clause
Posted by spp at 5/18/2006 12:00:00 AM
I want to UPDATE a SQL table with a SqlCommand
The Update command is
UPDATE mytable SET col1 = @param1 WHERE STR(intcolumn,6,0) IN (@param2)
My questions are
what type of parameter should be @param2 to satisfy my update because
intcolumn is an int column and I populate @param2
with a loop lik... more >>
how to trap/deal nullRefException for cmd.ExecuteScalar w/o try-c
Posted by Rich at 5/17/2006 3:47:01 PM
Hello,
'Shmo' is a unique word in tbl1. If it exists in tbl1, then I write it to
the console.
cmd.commandType = CommandType.Text
cmd.CommandText = "Select fldx From tbl1 Where fldx = 'Shmo'"
console.writeline(cmd.ExecuteScalar.ToString)
If 'Shmo' does not exist in tbl1 - I get a nullre... more >>
Sql Server Connection Irritations (again)
Posted by Shawn B. at 5/17/2006 1:12:13 PM
We recently migrated from .NET framework 1.x to 2.0 with a code base that is
4 years old. The application is a mix between Windows Services, Web
Application, and some internal WinForms tools. We never had a problem using
framework 1.x and even the same code that fails in framework 2.0, paste... more >>
Cannot read XML into data set
Posted by Eric at 5/17/2006 11:27:02 AM
Hello,
I am trying to read in an XML file into a strongly typed data set, and I get
this error:
Column name 'myColumn' is defined for different mapping types.
Here is my code:
myDataSet.ReadXml("myFile.xml", XmlReadMode.InferTypedSchema);
Here is my XML:
<?xml version="1.0" encoding=... more >>
Customizing codegeneration of typed tableadapter
Posted by henk gijsbert at 5/17/2006 11:24:04 AM
I would like to inject one line of code in the update methods of
generated tableadapters (to call a validationmethod on DataSets and
DataTables that I define using partial classes).
Can this be accomplished? (This would be nicer than having to subclass
every generated tableadapter and override... more >>
Overlapping typed datasets in .NET2: best practices?
Posted by henk gijsbert at 5/17/2006 11:14:39 AM
Assume I have one adressTable that is used for as well companies as
persons and I have need to retrieve companies with adresses as well as
persons with adresses. I could generate typed datasets, one with
companytable+addresstable and one with personTable+addresstable,
resulting in as well ident... more >>
Which Event Is Firing?
Posted by Joe Delphi at 5/17/2006 11:08:49 AM
Hi,
I have a DataGrid with one column defined as a hyperlink column. I
wrote a SelectedIndexChanged event handler to handle processing when the
user clicks on that hyperlink. But all I get is a 404 error -it doesn't
appear to be firing the event handler at all.
Is some o... more >>
Need Help Using Select INTO from on mdb to another.
Posted by fracassa NO[at]SPAM gmail.com at 5/17/2006 9:01:50 AM
I am trying to use a SELECT INTO statment (using VB 2005) to Insert
records from a "table1" in one mdb to a "table2" in second mdb located
in another location.
The problem is that the columns in the table2 have different names then
the ones in table1. (I have variables that describe the diffe... more >>
XML From Stored Proc
Posted by Jay at 5/17/2006 8:22:08 AM
In VB.NET (Studio 2005) I need to loop thru a result set returned from a
stored proc and generate XML for each row. E.g. exex procWhatever returns:
custno, lname, fname, address
2, Doe, John, 123 4th St.
3, Smith, Bill, 567 8th St.
4, Grant, Terry, 333 Wherever St.
For each on of those ... more >>
Modify ODBC DSN Properties with VB.NET Code?
Posted by zacks NO[at]SPAM construction-imaging.com at 5/17/2006 8:04:26 AM
I have a single ODBC DSN that I have to change the default database
frequently. Is there a way I can change that property from VB.NET code?
Sure would make the process simpler than going through the setup wizard
every time.
... more >>
ODP.NET and System.Transaction support
Posted by joachim.hoffmann NO[at]SPAM privat.dk at 5/17/2006 2:53:27 AM
Hi,
As for now it doesn't seam like the latest ODP.NET supports the new
System.Transaction namespace. I have tried to download and install the
latest beta of ODP.NET version 10.2.0.2.10
(http://www.oracle.com/technology/tech/windows/odpnet/index.html), but
it doesn't support the System.Transa... more >>
Using 2003 Data Adapters in 2005
Posted by Paul Craig at 5/17/2006 12:00:00 AM
Hi everyone,
I have recently upgraded several of my projects from Visual Studio 2003 to
2005 and everything went across quite smoothly. The main problem that I am
having is I have used SQL Data Adapters on many of the forms. These forms
function fine in 2005 however I appear to be unable to c... more >>
FormView, DataSource, Update, and why it doesn't work
Posted by Shawn Anderson at 5/16/2006 8:46:50 PM
Does anyone have any suggestions on how to determine why my updates that
happen inside a formview are not being saved back to my database? I have a
datasource with select, insert, and update statement (simple SQL), I am
using standard databinding -- yet it doesn't work. The updating event fi... more >>
How To Lock Record From Read/Write using Transactions
Posted by Scott at 5/16/2006 5:50:01 PM
What is desried, during a transaction, with its IsolationLevel set to
RepeatableRead, will it block out other transactions from performing a read
or write to the same record until it's transaction has completed?
See code snippet below:
SqlConnection connection = new SqlConnection(connectionS... more >>
how to connect to multiple database?
Posted by cipcip at 5/16/2006 5:16:57 PM
Is it possible to connect to 3 database and execute a cross db query?
I usually use SqlConnection(connectionString) for a single connection
... more >>
VB.NET 2003, SQL Svr 2k5, Dataset + Rowlock
Posted by Dominic Belley at 5/16/2006 1:31:35 PM
Hi,
I use VB.NET 2003 & SQL Server 2005.
I will try to make it simple.
I have a winform which has a textbox "Member No".
When the user enters a value and clicks the Search button, I call a stored
proc (SELECT) and fill a dataset with a dataadapter.
Then about 20 to 25 other textboxes ... more >>
Adding a NULL to an array then adding array to a data table
Posted by Fiddelm3742 at 5/16/2006 1:12:02 PM
I'm having problems adding some data to my data table where one of my rows
contains a column that has a null value. Here is a snippet of my code
while ((strDataFileLine = DataFile.ReadLine()) != null) //Read till EOF
{
strTokens = strDataFileLine.Spl... more >>
Insert whole dataset in to a db table - VB.Net 2005
Posted by Federico Caselli at 5/16/2006 9:32:02 AM
Hi,
I have a very simple question. I have a typed dataset, dsOrders, bound to
tbOrders Access table. Now I must write a function to copy all the records
from the dsOrders to the Access table tbOrdersDone. How can it be done?
... more >>
vfp Parameter - callin vfp geeks
Posted by Toco at 5/16/2006 9:21:02 AM
Hello. I perform a search on a vfp table using select statement. Based on
the input paramter, the db engine performs a lookup by stripping the dashes
(-) from the searched string. The data in table is bad and I must remove
dashes. I use STRTRAN function. Now I have built commandText to se... more >>
'OraOps9.dll': Access is denied
Posted by SteveNH at 5/16/2006 9:20:59 AM
I am getting the above error from two machines when attempting to
connect to Oracle:
OracleConnection connection = new OracleConnection(connectStr);
This used to work fine on one of these machines. I always got this
error on the other machine. I have given ASP.NET and Authenticated
Users ... more >>
Saving image data
Posted by B. Mark McKinney at 5/16/2006 6:23:02 AM
I'm having trouble saving SqlDbType.Image data from a file to SQl Server.
Using VB.Net 2003 and SQL Server 2000, I am attempting to use a stored
procedure to save the data using the following code:
Dim fi As New FileInfo(FileName)
' Open the Image file for Read
Dim imgStream As Stream = f... more >>
SQL: create a table with recursive relationship
Posted by bonk at 5/16/2006 5:28:52 AM
I am fairly new to SQL and ADO.NET and I am currently trying to create
a SQL table (using Microsoft SQL and ADO.NET 1.1) that has a recursive
relationship, let me try to explain:
I have a piece of Data let's call it "Item" wich may again contain one
more "Items". Now how would I design a set o... more >>
SQLConnection, Please help me.
Posted by marcmc at 5/16/2006 5:15:02 AM
This is related to a post below but is a new issue.
I have created a SQLDataAdaptor from the config wizard and set my
SQLConnection1 in same wizard. I then gerated a dataset from my adaptor as
all the notes tell you to do.
I load the form and code the following to see if the connection is... more >>
Run sql server 2005 backup from VB.net 2005
Posted by steve at 5/16/2006 12:00:00 AM
Hi All
How do you run a backup / restore on sql server 2005 from within a VB.net
2005 application
In VB6 I used an execmd routine to run OSQL in cmd shell
In VB.net 2005 is there a better way to do it??
Regards
Steve
... more >>
How to close all connections of a database
Posted by ad at 5/16/2006 12:00:00 AM
I use sp_detach_db to detach a database, but it fail when threre are some
connections to the database.
How can I close all connections of this database before I detach it?
... more >>
How to text if a database exist?
Posted by ad at 5/15/2006 7:59:25 PM
How can I test if a DataBase existed in a server?
... more >>
Paging in ADO.net 2.0 - row count in filtered dataset
Posted by Jawahar at 5/15/2006 1:37:02 PM
I am usign paging in a gird with a Dataset as the DataSource for a grid. I
also apply a Filter expression to the dataset but when I dispaly the Rowcound
or check "AffectedRows" I get the original Row count before I apply the
filter.
How can I get the actual rowcount of the filtered dataset... more >>
DataGrid Updates DataSet and Database (Not!)
Posted by marcmc at 5/15/2006 8:22:02 AM
Am i missing something blatently obvious?
1.) I have dragged a SQLdataConnection & SQLDataAdaptor to the screen where
my DataGrid is. My DataAdaptor is configred for updates (see end of thread)
and my table has a Primary Key.
2.) I have generated a dataset from my Adaptor. Everything is co... more >>
Modifying a Dataset in VB.NET (Clarification)
Posted by Bmack500 at 5/15/2006 7:36:20 AM
I have code which needs to make several modification to data. If I set
up a Dataset, fill it w/data from a data-adapter, is there any way to
modify the dataset results using sql syntax? Or do I have to iterate
through the datatables and modify the rows one at a time?
Thanks in advance!
... more >>
Structure of execution a query on dataTable.
Posted by Niron kag at 5/15/2006 6:34:01 AM
Hello!
I am interested to lern how to execute queries on dataTables , in order to
get a specific data , and - how do I keep the data I get from the query .
Thanks for your help... ... more >>
SqlDataAdapter Update table with AutoIncrement column
Posted by Jawahar at 5/15/2006 5:51:01 AM
I have the following code
iAdapter = new SqlDataAdapter();
iUpdater = new SqlCommandBuilder(iAdapter);
dsROCData = new DataSet("ROC");
SetConnection("XXXXX"); --> set the connection
oCommROC = new SqlCommand();
oCommROC.Connection = oConn;
oCommROC.CommandType = CommandType.StoredPro... more >>
DataGrid / DataSet / DataAdaptor / DataBase update issue
Posted by marcmc at 5/15/2006 5:05:01 AM
Hi, I'm using vb.net.
My dataset is not updating my database after the user modifies the datagrid.
I populate my data with the load sub below.
In the Save Sub (below), I have generated my DataSet 'dataSet11' from my
DataAdaptor 'SqlDataAdapter1' and the DataConnection 'SqlConnection1' and
t... more >>
Connection Weirdness
Posted by David Wimbush at 5/15/2006 1:51:08 AM
I have an application that follows this pattern every time it needs to
interact with SQL Server:
1. Open a connection with a fixed connection string
2. Execute query
3. Close connection
I'm expecting connection pooling to give me the same connection each
time.
Two odd things are happening:
... more >>
From QueryDef to plain SQL text
Posted by Edwin Knoppert at 5/15/2006 12:00:00 AM
I have a few queries in my MDB, some of them are using them as INNER JOINs.
(A SELECT in a SELECT but then using querydefs)
I would like to combine these SQL statements into one but they become highly
complex for me.
I rather would like to embed the SQL text into my application than keeping
... more >>
|