|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ADO.NETmicrosoft.public.dotnet.framework.adonet
@parameter - is it portable
David Thielen -
11 Mar 2006 11:48 PM - 13 messages
Hi; I have my sql commands (.net 2.0) as: cmd.CommandText = "insert into Datasource (title, description, providerType, sqlVendor, sqlServer, sqlDatabase, sqlConnectionString, xmlFilename, useCredentials, username, password) VALUES (@title, @description, @providerType, @sqlVendor, @sqlServer, @sqlDatabase, @sqlConnectionString, @xmlFilename, @useCredentials, @username, @password)"; Will this work for all Sql databases (also in selects) or do I need to use a ...
Inserting into a SQL database - any provider
David Thielen -
11 Mar 2006 11:26 PM - 13 messages
Hi; Ok, using the Web.Config connection strings I have all of my code for an insert, using any database, working - except setting the parameters. How do Ido this part? ConnectionStringSettings connStr = WebConfigurationManager.ConnectionStrings["WindwardPortal"]; DbProviderFactory provider = DbProviderFactories.GetFactory(connStr.ProviderName); ...
How to get DataRow array into a DataView?
deko -
11 Mar 2006 5:16 PM - 9 messages
I need to get the child rows of a DataTable using the foreign key, and then I need to sort those rows. So I want to get the array of DataRows returned by GetChildRows into a DataView. Is it possible to insert the DataRow array ...
ODBC adapter update command syntax nothing happens
cindy -
11 Mar 2006 3:53 PM - 2 messages
this is the call private void Page_Load(object sender, System.EventArgs e) { OdbcConnection connection = new OdbcConnection ("DSN=xyz"); CreateDataAdapter(connection); } this is the code, no errors, but NO UPDATE I have to use ODBC I just need to ...
odbc adapter syntax HELP make it do the update
cindy -
11 Mar 2006 3:44 PM - 2 messages
this is the call private void Page_Load(object sender, System.EventArgs e) { OdbcConnection connection = new OdbcConnection ("DSN=PFW52"); CreateDataAdapter(connection); } this is the code, no errors, but NO UPDATE I have to use ODBC I just need to update a field based on a key, EMBARASSED to say days going ...
Passing morethan 32 KB Data to a Stored Procedure using ODP.Net Provider.
GautamKumar -
11 Mar 2006 4:00 AM - 6 messages
Passing more than 32 KB Data to a Stored Procedure using ODP.Net Provider throws this error to me " ORA-01460: unimplemented or unreasonable conversion requested" The same code is working fine with oledb provider type but using ODP.Net it is giving this error if the fILE Size is Greater than 32 KB. ...
Framework 2.0 BUG with SqlParameter and "negative zero"
pdxfilter-google -
11 Mar 2006 1:54 AM - 5 messages
Hello! We're seeing some very odd results from the below code. Under certain conditions, ADO.NET will create commands that specify a negative zero amount ("-0.00"). It's easy to reproduce. This is a major issue in our application as we do lots of decimal math ...
Catch Row validating exceptions
KB -
10 Mar 2006 11:31 PM - 2 messages
I am using a typed dataset and would like to perform some validations on a row before it is edited or added to a datatable. I have tried putting validation in the RowUpdating event (using SetColumnError) however this doesn't block the row from being added. If I throw an exception this does ...
How to add new bindable properties of a Typed DataSet object?
KB -
10 Mar 2006 10:57 PM - 2 messages
Using a partial class I can add new properties to the Row objects of a typed dataset and I can see them using intellisense. Unfortunately, the data source window can not see these new properties, nor can a bindingsource. I ...
ExecuteNonQuery
Nick K. -
10 Mar 2006 10:53 PM - 2 messages
I have a piece of code that gets a SQL Server stored procedure script from a xsql file and creates the stored procedure using ExecuteNonQuery. The code works fine except that it chokes if there is a "GO" or multiple sql ...
Basic question
vul -
10 Mar 2006 9:42 PM - 2 messages
I'm working with VB6 and SQL Server 2000 now. There is a need to rewrite an existing application using VB 2005 (db is going to be the same at this point). In VB6 the application can be created with using data controls or with more ...
ADO.Net 2.0 DataRelation/System.Data Bug
Learnicus -
10 Mar 2006 9:17 PM - 1 message
Hello There is clearly something buggy about the way an ADO.Net 2.0 data realtion accesses parent rows in a dataset as per the code and immediate window listings below: 1. Dim contactRow As dsContact.ContactRow 2. contactRow = CType(activeTerritory.GetParentRow(SalesTerritory.RELATION_SAST), ...
SqlNotificationAuthType not found
skg -
10 Mar 2006 4:36 PM - 3 messages
i am using vs.net 2005 but unable to find definition for SqlNotificationAuthType.None thx. I get following eerror Error 3 The name 'SqlNotificationTransports' does not exist in the current context using System.Data.SqlClient; ... .... .... SqlDependency depend = new SqlDependency(cmd, null, ...
advice needed for a good book to make good database applications
mesut demir -
10 Mar 2006 8:26 AM - 2 messages
Dear collegeaus, I would like to learn Visual Basic.NET and working with DATABASES. My intention is making some Windows programs + Database & Internet programs +Databaseses. I'm a 3GL programmer.... Which and What book do you advice for start ...
data view query
tarun.sinha -
10 Mar 2006 5:31 AM - 2 messages
Hello All.. I Need Your Help, I want to set a filter in data set.I am fetching the data from store Procedure in dataset, but I want to use data view to filter this data set.how do i do it, ...
data view query
tarun.sinha -
10 Mar 2006 5:31 AM - 2 messages
Hello All.. I Need Your Help, I want to set a filter in data set.I am fetching the data from store Procedure in dataset, but I want to use data view to filter this data set.how do i do it, ...
newbie: How to get rows in specific column?
deko -
10 Mar 2006 4:24 AM - 5 messages
How do I reference the rows in a particular column in a DataTable? tblMyDataTable row# colA colB pkID fkID 1 str1 srt2 23 19 ...
DataTable.GetChanges() followed by OlDbDataAdapter.Update()
fermisoft -
10 Mar 2006 4:07 AM - 4 messages
How to set the command text for the following update operation? DataTable dataTable = (DataTable) grid2Stock.DataSource; dataTable = dataTable.GetChanges(); if (dataTable!=null) { OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.UpdateCommand = new OleDbCommand(); conn.Open(); ...
Retrieving 1 large sql record - progress bar possible? vb.net 2005 sql2000
Chris Thunell -
9 Mar 2006 11:39 PM - 4 messages
I have a sql database that stores documents (word and excel files) inside a field. These documents can be 10mb or larger in size. When running on my local network the files load very quickly, but on remote networks it runs ...
Multiple Oracle Owners
RoyG -
9 Mar 2006 11:08 PM - 3 messages
We want to start using VB.2005 while adding new functionality to one of our large VB.6 applications that supports multiple clients. To segment data, we have an "application" owner, and multiple "client_ID" owners in the Oracle 9i ...
get primary key on insert
David Thielen -
9 Mar 2006 9:48 PM - 12 messages
Hi; If I have the primary key set to be created in the database, how can I get it's value when I insert a new record in the database? Preferably a method that works regardless of the vendor. ...
Read Dataset from webservice and update local sql server!!
Jay Balapa -
9 Mar 2006 9:24 PM - 2 messages
Hello, Iam trouble updating my local version sql server database from a webservice which returns a dataset. I call update but no rows are added any help will greatly be appreciated. I have already verified that the webservice dataset already has valid data. ...
DbProviderFactory & creating from DbProviderFactories.GetFactoryCl
David Thielen -
9 Mar 2006 9:23 PM - 4 messages
Hi; When I call DbProviderFactories.GetFactory("System.Data.SqlClient").CreateDataSourceEnumerator().GetDataSources(); I get 2 entries for my computer (Sql Server & Sql Server Express). For Sql Server I get "BELLE", DBNull, "No", "8.00.194" and for Sql Server Express I ...
BECOME A DOT.COM MILLIONAIRE WITH ONLY $5.99Cents or $1K.
ISRAEL FAGBEMI -
9 Mar 2006 8:43 PM - 1 message
...
Process File in Chunks - StreamReader
das -
9 Mar 2006 7:52 PM - 3 messages
Hi All, I want to process a file in chunks, meaning I have a big file of 50K rows. I want to process 5K rows at a time. I am using StreamReader object and looping through each row and process ...
How to stop TransactionScope from starting distributed transaction
BF -
9 Mar 2006 7:32 PM - 8 messages
When I use TransactionScope in my code, I got error message saying "cannot use SAVE TRANSACTION in distributed transaction". This is because I have SAVE TRANSACTION in one of my stored procedures. It looks like TransactionScope automatically starts distributed transaction ...
TransactionScope link to remote server has firewall problem
BF -
9 Mar 2006 7:01 PM - 6 messages
When I use TransactionScope to access a remote SQL server from my Windows/XP computer, I got error message "The transaction has already been implicitly or explicitly committed or aborted". But if I turn off the firewall on my Windows/XP computer, this code runs ...
Multiple Datareaders On One Connect
Bernie Hunt -
9 Mar 2006 6:33 PM - 5 messages
OK, I promise no more questions after this one today! My application is reading data out of an ODBC database for creating reports. I'm using Datareaders because they are lighter weight and I only need to read through the data once. ...
database enumerator like datasource enumerator
David Thielen -
9 Mar 2006 6:13 PM - 4 messages
Hi; DbProviderFactory.CreateDataSourceEnumerator() creates a list of servers it can find and does so for all ADO clients (yes it's only implemented for SqlServer at present). Is there a similiar client independent method of getting all databases on a ...
Open Connection
Dan, Vascas -
9 Mar 2006 4:51 PM - 4 messages
Hi Gurus, Please help. I have two Questions. 1. Is it bad to keep a database connection always open. 2. In one function we are always opening a new connection, but we are not closing it. If we use that function second time it uses the connection it ...
Problem with auto generated update command
Michel Hardy -
9 Mar 2006 4:42 PM - 1 message
Hello, I am using SQL Server 2005 and Visual Studio 2005 Pro. Here is my particular situation, I drag table BusinessDev from the server explorer onto a dataset. VS2005 automatically creates the data table and table adapter with the select, insert, update and delete command. ...
Checking for Nulls in Fields
Bernie Hunt -
9 Mar 2006 4:25 PM - 5 messages
Is there a cleaner way to check for nulls in fields? Faster, shorter in code, or just better way? If Not IsDBNull(drPatients("Address")) Then tmpStrAddress = CStr(drPatients ("Address")) Thanks, Bernie ...
Anything special about UNICODE
VC -
9 Mar 2006 3:39 PM - 2 messages
Hi All, I have a Sybase table with International text (UTF-8) fields. Is there anything special about retrieving these columns in my C# application? If I retrieve the data into a recordset or datareader and dump the fields into strings, i should be able to view the text or do I need to do any ...
All or nothing for DataAdapter
Maxwell2006 -
9 Mar 2006 2:53 PM - 7 messages
Hi, I am using DataAdapter.Update to update database tables based on changes in my DataTable. How can I make sure that the whole Update operation (which can include several update, delete and insert operations) is within a transaction. If ...
Datareader Problem
Bernie Hunt -
9 Mar 2006 2:44 PM - 3 messages
Sorry folks, I sure this is a stupid one, but I'm stuck. Just starting with .Net so working with the ado.net objects are not natural to me yet. This routine should open a datareader with a lot of records, step through ...
How to return XML data from Store procedure ???
serge calderara -
9 Mar 2006 2:43 PM - 4 messages
Dear all, From an ASP.net application I am calling a store procedure from an SQL server 2000 database, defined as follow : "SELECT * FROM TABLE1 FOR XML AUTO" How to retrieve the result of the store procedure back to my code and format ...
help: sqltransaction
John -
9 Mar 2006 2:59 AM - 5 messages
i need advice to my problems as follow: i need to update 3 table (say table a, table b and table c) using sqltransaction (because i want all transaction either commit or > rollback). table c will be updated after table a and table b updated. ...
How to tell if a timeout exception occures
Jeremy Chapman -
9 Mar 2006 12:59 AM - 5 messages
If a time out occures an SqlException is thrown, but how can I programatically tell if the SqlException is a timeout error vs some other type? ...
Strongly typed dataset, sorted by dataview, how to get dataset's row index from dataview?
Thomas H -
9 Mar 2006 12:55 AM - 3 messages
Hello everyone, here's my problem! I'm using the .NET framework v1.1... I've created a strongly-typed dataset class (using XML), and I've instantiated it twice. The first instance is used to hold a ...
Datagrid aggregation in each cell
dcmetro -
8 Mar 2006 8:45 PM - 4 messages
Hi, I have a search page which will display the results in a datagrid. The grid's nature is, except the first column, every cell in every row is an aggregate value. The grid will always have the same number of rows ...
Simple TransactionScope problem, please help
BF -
8 Mar 2006 7:35 PM - 8 messages
This problem is so simple I am surprised it's happening. When I run the following code: using (TransactionScope ts = new TransactionScope()) { ...
setting dataset datarelation from database
stv_fortner -
8 Mar 2006 5:40 PM - 5 messages
Hi, I want to set my dataset's datarelations based on the relationships from a database. I've read about people doing this, and since the dataset.readxmlschema() is just looking for a xmlreader, I provide that with sqlcommand.executexmlreader(). I also tried casting it to ...
Handling UNICODE in DB
VC -
8 Mar 2006 5:19 PM - 1 message
Hi All, I am looking for some samples/documentation that will help me in understanding the steps involved to Insert UNICODE (International) strings into a Sybase database and also retrieving the same in a C# application. Any pointers will be appreciated. Thanks for your time. ...
How to use TransactionScope to roll back changes except for one ta
BF -
8 Mar 2006 4:23 PM - 2 messages
I need to roll back database activities from Business Object level. I need to roll back changes in all other tables except ProcessError table where I logged my process errors. I need to do this business object level transactions in many places and the ...
VB.NET/ EXCEPTIONAL OPPORTUNITY/ IN
OMNI GROUP -
8 Mar 2006 3:54 PM - 1 message
OMNI GROUP tgug***@sbcglobal.net ...
.NET Data Provider/OLEDB
Colin J Paterson -
8 Mar 2006 3:29 PM - 1 message
Is it possible or does anyone know of a tool that will let me expose a .NET Data Provider as an OLEDB DataSource. I am writing a custom .NET Data Provider for a custom database, in itself a much easier task than writing an OLEDB Provider. However unless I am ...
Update Data Source from Data Table
G Hustis -
8 Mar 2006 3:19 PM - 3 messages
I am using VB.Net and I have been trying to store record changes to a SQL Server table from changes made to a data table by using the data adabpter's update command, but I am having no luck. The user will make changes to the ...
Web Setup msi
jjmraz -
8 Mar 2006 3:05 PM - 1 message
Hi, I am trying to exclude a web folder from being included in my web setup project. I have selected "Content Files from ..." and clicked on ExcludeFilter. In this ExcludeFilter I added images\*.gif but they are still being included with project. What am I ...
Oracle Rollback causing error with .NET 1.1
Khurram -
8 Mar 2006 1:28 PM - 6 messages
Hi, I am calling a DBMS_Transaction.ReadWrite(); and later Rollback; from an Oracle Stored Procedure. When I call this stored procedure with from an ASP.NET page, using OracleClient.dll version 1.0.3.000 i get NO ERROR, but ...
Retrieve only changed values from a DataRow ?
Rune B -
8 Mar 2006 12:33 PM - 2 messages
- I need to find the columnNames of values that has Changed in a certain DataRow, and I can't quite figure out how to do it right ... The following does seems a little clumsy, and does not work right either. ...
instant client + odp.net
Roger Bruhin -
8 Mar 2006 11:46 AM - 2 messages
hello I need a version of the instant client with odp.net. Is that anyhow possible and with files are necessary? my applikation needs oraops10.dll thanks. roger ...
How do i bind to a collection
Vivek M -
7 Mar 2006 9:55 PM - 1 message
I know how to bind to a property in a class like this : this.BindingContext.Add(Class1.PropertyName, dataview, "Name"); Now i have a data Relation which can return muliple rows. Here is the construct CurrencyManager cm = (CurrencyManager)this.BindingContext[dataview, "StudentsWithLastNameX"]; ...
How to retrieve TimeSpan from typed DataSet?
deko -
7 Mar 2006 6:10 PM - 2 messages
I keep getting an InvalidCast exception when trying to do this: DataRow row = dtP.Rows.Find(projectID); bakInterval = new TimeSpan(); bakInterval = (TimeSpan)row[colBI]; //colBI is a string const Error Message: "Specified cast is not valid". ...
Parameters
Shawn Thompson -
7 Mar 2006 1:43 PM - 4 messages
Why should we use the parameter object when it seems like duplicated code. The info is described in SQL Server as int, varchar, etc. so why do we have to redundantly use the parameter object when inserting a record rather than passing the parameter in an SQL query insert code? Just curious??? ...
not associated with a trusted sql connection
steven scaife -
7 Mar 2006 1:31 PM - 5 messages
Hi in my page i am getting the following error Message "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." String This only happens in ASP.net and doesn't happen in windows applications how ...
Is this a Bug in Visual Studio 2005??
Larry -
7 Mar 2006 12:46 PM - 1 message
Try the following in VS 2005: Add a SQLCommand object to a Windows Form Set the connection to the Northwind Database Change the "CommandType" to "StoredProcedure" In the "CommandText" property, select "CustOrderHist" from the combobox. The "Parameters" collection property does not get populated. ...
Using SqlTransaction with MSSQL Trans?
yacrumb@yahoo.se -
7 Mar 2006 11:51 AM - 4 messages
Hello all, I got seven sp's that uses transactions: BEGIN TRAN .... ROLLBACK TRAN .... COMMIT SqlTransaction tran = conn.BeginTransaction() .... tran.Commit() .... tran.Rollback() Q: will a commit in sp's be rollbacked by ado.net's rollback? i.e. do ...
NUNIT vs VSTS ?? Which is better ?
Parag -
7 Mar 2006 5:53 AM - 21 messages
Hi, I am trying to figure out best testing tool for my project. I have narrowed down my requirements to two tools NUNIT and VSTS unit. But I have used neither and I have to use only one of them. Hence can someone who has ...
Column 'Column' does not belong to table 'Table'
Learnicus -
7 Mar 2006 5:39 AM - 4 messages
Hello I have a dataset which is successfully being filled. However whenever i try to access a givewn row of one of the tables in the dataset i get the error "Column 'ContactId' does not belong to table 'SalesAgent'" Except that it does and if i use an ordinal reference i can access the value ...
How can cancel a validator
ad -
7 Mar 2006 4:03 AM - 3 messages
I am use a RequiredFieldValidator to valid a Text box, and there are two Buttons on the forms, one for OK and one for Cancel, both are Asp.Net controls. When a user press Cancel to cancel the input, the RequiredFieldValidator ...
We Pay 50%--100% Returns Monthly For 1 yearr on investment. You need to know this!
INCOME---DAILY -
7 Mar 2006 2:51 AM - 1 message
...
c# - AcceptChanges - What's it used for?
Ant -
7 Mar 2006 1:42 AM - 5 messages
Hi, Can anybody tell me when you would use DataSet.AcceptChanges. If you use it, then all the new records are reset to be seen as original records (unchanged), and hence cannot be updated into the datasource. Therefore I've ...
Moving data from Access to SQL Server using ADO.NET
Gil Lapid Shafriri -
6 Mar 2006 10:35 PM - 2 messages
Hi, I was looking for long time for a fast and reliable way to upload Access table into an empty SQL Server table. Finaly I came with a way that seems to be working fine but I'd like to ...
What's up with the VS.NET 2005 Dataset Designer?
jheising -
6 Mar 2006 10:18 PM - 2 messages
Why has the VS.NET 2005 dataset designer changed so much from the 2003 designer? The 2003 designer gave you so much more power over the way the dataset was represented in XML. It seems like the designer has gone to a much more Database-centric ...
Could someone answer a stupid dgv question?
Joyce -
6 Mar 2006 6:48 PM - 10 messages
Hi, when inserting rows from an unbound datagridview to a database I do something like: for each row... process data next in the "process data" routine I call a routine that goes through this whole scenerio for each row: ...
login routine with information returned from database
steven scaife -
6 Mar 2006 5:01 PM - 4 messages
Hi i am creating a login routine that i have overloaded and wondered how i could return some data back to my program or even if i am going about the right way of achieving what i want to do. ...
Data Validation and Import Strategy
Michael -
6 Mar 2006 2:26 PM - 1 message
I would appreciate some input and advice on the following situation. I have a number of data files which I need to place the data into my database. Much of the data in the files are, of course, related and I ...
DataBound ListBox selects first item
Tick Tock -
6 Mar 2006 12:31 PM - 1 message
I am fairly new at developing, but have decided to implement an application that uses a comboBox to populate a listbox, Both comboBox and ListBox are DataBound. For example: if a type of car is selected in the comboBox the list box will ...
SQL Syntax error
Marius Horak -
6 Mar 2006 9:25 AM - 3 messages
I have something like that SqlCommand cmd = new SqlCommand(sqlText, connection); SqlDataReader data = cmd.Execute(); while (data.Read()) { ...do my stuff } When sqlText is invalid the error does not occur on cmd.Execute (as I would expect) but on data.Read(). ...
Problem with ODP.Net and TNSNames
jdw -
6 Mar 2006 9:21 AM - 2 messages
I am using asp.net (Framework 1.1) with Oracle 9i and ODP.Net version 9.2.0.401. I am developing using a local copy of IIS version 5.1. When I use a connection string to connect to Oracle utilising a data source ...
newbie: why does DataSet AutoIncrement advance by 2?
deko -
6 Mar 2006 8:01 AM - 9 messages
I create a DataSet called database and add a table to it as shown below. Why does the AutoIncrement value advance by 2 every time I add a record? How do I get it to advance by 1? DataTable tblProject = database.Tables.Add("TableProject"); ...
Internal .Net Framework Data Provider error 12
Maik Albrecht -
6 Mar 2006 7:55 AM - 1 message
Hi NG, i use the oldedbExecuteReader Method on an Access DB and get a System.InvalidOperationException with the message :"Internal .Net Framework Data Provider error 12" Do anybody now what the framework will tell me ? I cant't find a desciption of the error. ...
.net and DB Data layer : Best Practice
David -
6 Mar 2006 4:38 AM - 2 messages
I am converting an app. from PHP to .net. I know that you can create an xsd and then have the system generate code to load data into a dataset. I assume that you use this and an a data adapter to talk to ...
Sychronize Key between Database and Dataset on Insert
Aeden Jameson -
5 Mar 2006 10:28 PM - 5 messages
Hi, I'm sure this has been asked many times before, but I haven't had a lot luck finding an answer; not googling the question right. So I apologize before hand. I have a TableAdapter whose insert command uses ...
Search button to filter a Dataset
thebison -
5 Mar 2006 2:46 PM - 7 messages
Hi all, I hope someone can help with this relatively simple problem. I am building a timesheet application using ASP.NET C# with Visual Studio 2003.As it is only a protoype application, my database has been made in MSDE. ...
only test- solo test
toñooo -
5 Mar 2006 11:24 AM - 1 message
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control"> <TITLE></TITLE> </HEAD> <BODY> <P> </P> </BODY> </HTML> ...
OutOfMemoryException on DataTables
Venkatachalam -
5 Mar 2006 10:47 AM - 14 messages
Hi, In my application I have text(flat) file as input and I have to generate an XML file. The maximum input text file size can be 900MB and gererated xml may result 2+ GB. Based on the first column value from the text file, the row will be moved to ...
GridView and reader source
SalamElias -
5 Mar 2006 9:46 AM - 7 messages
Hi, I can give a DataTable to gridview and in one line data are displayed int the gridview using : dgvEmployee.DataSource = myDataTable.; When I use a dataReader instead, do "dgvEmployee.DataSource = myReader;", nothing is displayed in the gridview. Does that mean that GridView dosnt or can not bind to a data reader ...
DataAdapter + DataRow + Inserting a record
A.J -
5 Mar 2006 7:57 AM - 2 messages
########################################################################### private void btnAdd_Click(object sender, System.EventArgs e) { OleDbConnection con = new OleDbConnection(str); con.Open(); string qry = "select * from t_contact"; ...
|
|||||||||||||||||||||||