all groups > dotnet ado.net > april 2004
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Inserting Records into SQL Server Tables
Posted by Gary at 4/30/2004 7:06:01 PM
I am currently writting an application in VB .Net and SQL Server. I am trying to insert new records into two SQL Server tables and would like to know whether it is best to insert the records using a stored procedure or through a dataset. Currently I have a form that consists of two parts. One part o... more >>
Transaction Commit TimeOut but Transaction still completes
Posted by Huan at 4/30/2004 3:31:02 PM
I'm faced with a weird problem that happens once a week in a production environment(20 transctions a second): I Attempt to commit a SQlTransaction, it throws a "TimeOut Expired" exception but the sqltransaction still commits. The Transacion Object is null which means that it can't be rolled back ... more >>
Unicode problem: Can read, but not store Chinese characters in database!
Posted by Morten at 4/30/2004 3:03:18 PM
Hi there!
I'm building a VB.NET application that connects to a MS SQL 2000 Server
through ADO.NET.
NOTE: My application can correctly read and show Chinese characters
retrieved from the database (they are stored in a 'nchar' column).
However, when I try to store some Chinese characters th... more >>
MySQL & ByteFX (Invalid PInvoke metadata format)
Posted by Don Lopez at 4/30/2004 2:49:26 PM
I get this exception when I try to run open on the MySQLConnection
object. It goes like this:
System.TypeLoadException: Invalid PInvoke metadata format.
at System.Net.OSSOCK.gethostbyname(String host)
at System.Net.Dns.GetHostByName(String hostname)
at ByteFX.Data.Common.StreamCrea... more >>
Mapping fields of two dataset schemas
Posted by bboer60657 NO[at]SPAM yahoo.com at 4/30/2004 12:52:28 PM
I have two dataset schemas and I want to map the fields of one to the
other. I know that I can use a dataadapter to map the fields of a
dataset to the results of select query executed as part of a Fill
call. But is there a datadapter for XML, as opposed to a database.
Any help would be appreci... more >>
SQL connection opening two connections
Posted by Christopher at 4/30/2004 12:16:03 PM
I have a question about Sql. When I run a simple open statement for a SQL database, it opens up two connections sometimes, and other times it opens up one connection. Does anyone know why this happens. Below is my source code where this is occuring. You will have to change the connection string, esp... more >>
ADO.NET Not Returning Error
Posted by achobbs at 4/30/2004 10:36:02 AM
If you run the following query
select
'CategoryID = ' + c.CategoryID
from
northwind.dbo.Categories
In Query Analyzer against the Northwind database, QA returns an error saying it cannot convert 'CategoryID = ' to an int. However, if you execute this statement using ADO.NET, no error is retu... more >>
one DataAdapter vs. many DbCommands
Posted by juan5 NO[at]SPAM dev.com at 4/30/2004 9:41:01 AM
Hi
I have a design decision to make. I must choose between a DataAdapter.Update() and many DbCommands (actually SqlCommands)
Let's assume that a small percentange of the columns need to be modified on average. This would suggest that long strings of SQL will be traveling to the server and back (a... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Array of datarows
Posted by Brian Henry at 4/30/2004 9:15:01 AM
If I have an array of data rows, how do i bind a listbox to that array of
rows and show whats in a column? right now if i bind to the array it just
shows "System.Data.DataRow" as the name, but if i bind to a table with the
same rows it works.
... more >>
TableMappings and FirstReturnedRecord
Posted by Greg at 4/30/2004 9:11:42 AM
We manually assign tablenames to our Datatables. We do not use
TableMappings.
When calling DataAdapter.Update like this:
dim i as integer = 0
i = da.Update(dsChanges.Tables("myTable"))
and setting the InsertCommand to a insert sproc that returns the inserted
record with a Select after t... more >>
Cancelling query with ADO and Oracle
Posted by Sandra at 4/30/2004 9:11:13 AM
Hi All,
I am running a VB.NET application which is using ADO to connect to an Oracle
9i database. I have a form which runs a query which can take a considerable
time to run depending on the criteria that is entered. This query is run on
a seperate thread as I wish to return control to the appl... more >>
Password problem of MS Access
Posted by Arsalan Ahmad at 4/30/2004 9:01:43 AM
Hi all,
I have a MS Access database (say abc.mdb). I have set the database password
and admin password to "abcdefg" (say). The problem is that when I create a
simple application (a form-based application or asp.net application) and try
to connect to the database using ado.net i get following e... more >>
Sttopid Q 2
Posted by JLW at 4/30/2004 8:39:30 AM
What do I have to do to mey development webserver to remotly debug a
project using the IDE? Basically, I have my server, and I work on my
workstation, and create/run the projects from the server remotly, but
debugging won't work. I tried to install just the remote dubugging stuff
from VS.N... more >>
DataAdapter UpdateCommand
Posted by markmatheney NO[at]SPAM hotmail.com at 4/30/2004 8:33:18 AM
Please help. Simple question.
I want to update a row in an SQL table. (using VS2003)
There are 2 keys:
tts_tkey and tts_tskey
and 3 fields to modify:
tts_activeflag
tts_lastmoddate
tts_lastmodifiedby
SqlUpdateCommandTS.CommandText = "UPDATE TechnicianSchedule " & _
"SET tts_acti... more >>
MDAC 2.8 Issues
Posted by GG at 4/30/2004 7:55:41 AM
VB.Net Standard 2003, Win2k Pro w/all patches & updates.
My dumbass installed MDAC 2.8. Now I'm getting the following errors when I
try to build my solution....
Unable to find dependency 'INTEROP.ADODB' (Signature='(null)'
Version='2.8.0.0') of assembly 'Interop.JRO.dll'
Unable to find depe... more >>
Stoopid Question
Posted by JLW at 4/30/2004 7:52:11 AM
This is probably a really stoopid q, but I'm planning a multi-user
ASP.NET Data Entry system. Where should I declare the DataSet's and such,
so it's accesable throughout the entire application, and lasts only for the
users session?
Thank You
... more >>
error: There is already an open DataReader associated with this Connection which must be closed first
Posted by powellmw NO[at]SPAM comcast.net at 4/30/2004 7:26:50 AM
I am attempting to maintain a database connection across threads. I am
receiving the following exceptional error:
"There is already an open DataReader associated with this Connection
which must be closed first."
The code I use is in two stages: first, open the connection. Second,
execute th... more >>
joining 2 tables
Posted by confused1 at 4/30/2004 6:36:02 AM
I hope i explain this clearly. I have 2 tables. TABLE1 contains 250 rows with the following data:
quantit
part I
purchase order numbe
date
TABLE two has the same data plus a column for customer order ID with 150 rows of data
I want a query will return equal rows where quantity, part ID, purc... more >>
Using ADO.NET to prcoess T-SQL batches
Posted by David R Hancock at 4/30/2004 6:31:03 AM
In our development process we have to create T-SQL Scripts to be run against the "Live" databases (there are at least a dozen) so that any changes can be verified and/or tracked
Reading the text from the file is straight forward enough. Using SqlConnection/SqlCommand to actually execute the code i... more >>
Connection Pooling
Posted by John at 4/30/2004 5:06:02 AM
Hi All
I have a single-threaded WinForms app which uses SQL Server 2000 as its database
Part of the app is a 'Restore from Backup' form which uses SQLDMO code. I keep gettin
errors telling me that there are other connections open - therefore the restore can't go ahead
I used sp_who to check co... more >>
Can 2 different projects in the same solution share the same strongly typed dataset
Posted by moondaddy at 4/29/2004 10:19:36 PM
I have 2 projects in the same solution that have a common strongly typed
dataset which they both use. Can they share it so that one project can pass
the dataset and it's data to the other project where the 2nd project can use
the methods and properties of this strongly typed dataset?
somethin... more >>
Making ADODB More Bulletproof and Connection Timeout
Posted by Chuck Cobb at 4/29/2004 5:53:10 PM
I'm trying to make my code more "bulletproof"...I have a user who is using a
wireless LAN network connection that is very unreliable and it has caused
some problems. For example, sometimes when they have a very bad network
connection the ADODB connection can hang the application. I want to make... more >>
Working with many to many data
Posted by Brian Henry at 4/29/2004 5:50:49 PM
Before i explain this because of a strange situation we're haveing with data
we import from a 3rd party this Many to many relationship has to exist, so
it can not be replaced.
With that said, we have two tables, with a junction table in the middle (a
many to a many relationship) these names ar... more >>
Connection to database- how?
Posted by Ian at 4/29/2004 5:47:28 PM
Hi there,
I have just started learning c# and I have stored my connection string in
the web.config which I can read in my main program.
My question really is, should I open the database on every single page and
also close it too?
I presume I open it on Page Load but where should I close i... more >>
multiuser database with c#?
Posted by Ian at 4/29/2004 5:44:47 PM
Hi there,
I wonder if anyone can offer some help
I have the task of creating a multiuser database that will be access by 10
different IE sessions (i.e. 10 different machines).
It is basically a stock program, i have come from the background of a VB
application programming but now trying t... more >>
FOR XML AUTO, ELEMENTS
Posted by Brett Robichaud at 4/29/2004 5:43:53 PM
I am trying to get data as XML from my SQL 2k server.
My select statement is:
SELECT TOP 10 * FROM IMAGE FOR XML AUTO, ELEMENTS
I then use this code to wrtie it to a file:
XmlWriter w = new XmlTextWriter(@"foo.xml", Encoding.UTF8);
w.WriteStartDocument();
w.WriteStartElement("Test");
rd... more >>
ExecuteXmlReader()
Posted by Brett Robichaud at 4/29/2004 4:46:57 PM
Is there no way to have the returned XmlReader automagically close the
SqlConnection when I call Close() on the XmlReader? I am used to
SqlDataReader where this works nicely.
My data layer currently abstracts out the SqlConnection object so the caller
knows nothing of it. If I add support fo... more >>
Output Parameter always 0 when used with a dataadapter
Posted by Tommy at 4/29/2004 4:46:01 PM
I have a stored procedure that has an output parameter defined as output and
it is definately being set in the proc. I even went as far as hard coding a
value in the bottom of the proc to be sure it had something other than 0. If
I run it in Sybase central (sybase's version of Query Analyzer) it ... more >>
Object Relational Mapping
Posted by Noel H at 4/29/2004 3:47:07 PM
Hi all,
Just a question. Anyone know a good ORM tool? Would like to hear
recomendations. I've found one that I'm pretty keen on Evaluant
(http://www.evaluant.com/en/default.aspx)
Any news on Object Spaces? Would really be grateful if anyone if this will
still be ship with .NET2.
Thanks,
... more >>
Could not find installable ISAM.
Posted by Brent at 4/29/2004 3:30:38 PM
Hi, my asp.net c# app is trying to connect to an Access database with a
password and am I getting the error.. Could not find installable ISAM. . If
I connect to one without a password it works fine. I've looked at Q209805
but I don't think that helped. Oledb connection. Here is the one that works... more >>
TABLE NAME AS A VARIABLE IN SQL
Posted by Gina L. Hernandez at 4/29/2004 3:29:37 PM
Could somebody tell me what is the syntax for reading the name of a tabla
from a variable??. For example
declare @tabla varchar(10)
set @tabla = 'prompts'
select *
from @tabla
Thanks
... more >>
Connection box in ADO.NET
Posted by Learning at 4/29/2004 2:31:04 PM
Hi there
ODBC as well as ADO have connection boxes that allow to set up connection strings (pick providers or ODBC drivers etc.). Is there something that is equivalent for ADO.NET. Does ADO.NET still use OLE DB providers or is there something different with the .NET providers and therefore a diffe... more >>
Updating database record
Posted by William Gower at 4/29/2004 2:04:01 PM
I am new to ADO.NET and have a question about updating
da.Fill(rsUser, "Users")
Dim tbl As DataTable = rsUser.Tables(0)
Dim Row As DataRow = rsUser.Tables(0).NewRow
Row("Name") = FullName.Text
....
....
....
....
rsUser.Tables("Users").Rows.Add(Row)
What's next to update the dataAd... more >>
Cannot serialize transaction
Posted by Kettle NO[at]SPAM bigpond.net.au at 4/29/2004 1:25:30 PM
I am using manual transaction control with the Ingres ODBC data
provider for .NET. I have simulated a bank transfer example and found
that, despite setting the isolation level of the transaction to
serializable, the result of running the transfer concurrently is >not<
serialized.
I intend to... more >>
HtmlInput "Security" Issue?
Posted by Sean Patterson at 4/29/2004 11:25:14 AM
Greets all,
I have a simple CSV parsing .NET web app where the user uploads the file
and the web app does the magic. I have been able to get it to run on my
personl workstation and our sanbox, but as soon as I move it to the
pre-production server, I am getting a really weird exception being th... more >>
Dual Combo box binding problem (relation involved)
Posted by Brian Henry at 4/29/2004 10:52:37 AM
Here's an example of the code.. I have two combo boxes on screen that when
one's selection is change the other's items will be updated to reflect the
change (based on a relation)
Private ds_formData As New DataSet
'
' Fill Line Of Business
'
cmd_selectCommand.CommandText = "BENESP_GetLinesO... more >>
Question: Data Application Blocks - work with MS Access?
Posted by VB Programmer at 4/29/2004 10:45:13 AM
Do DAB work with MS Access? Any online examples?
If not, any online examples of ADO.NET with Access?
Thanks!
... more >>
Reset to Null a parameter in an SQLCommand
Posted by sburns NO[at]SPAM advhomecare.org at 4/29/2004 10:21:11 AM
Help
I have a command that executes a stored procedure. The same command is executed thousands of times. Prior to each execution of the command, the parameters need to be reinitialized to null and then repopulated with new values. I've tried the following command
cmSql.parameters(3).value =... more >>
SQL Server and Primary Key
Posted by scorpion53061 at 4/29/2004 9:10:03 AM
I am attemtping to add a record to SQL Server.
I am trying to find an example of how to increment the primary key value
like we do in Access.
Can anyone point me to an example?
I tried the code from Access and it writes the first record as -1 and then
complains about distinct errors.
T... more >>
VB + MySQL
Posted by Stefan Richter at 4/29/2004 8:41:32 AM
Hi, I am trying to access a MySQL Database using VB,
with / or without ODBC, whatever is easier...
Any ideas?
Stefan
... more >>
SqlCommandBuilder
Posted by h01magha NO[at]SPAM du.se at 4/29/2004 6:11:03 AM
Hi
I have a DataGrid that represents an whole databasetable. I fill the
grid with a DataSet, see below.
I wonder if it is possible to turn off the possibility to run Insert
commands for SqlCommandBuilder object when the GetUpdateCommand() is
run?
I dont want the user to be able to add ro... more >>
ADO.Net DataSets and constraints error
Posted by n.danson NO[at]SPAM lbs-ltd.com at 4/29/2004 5:21:40 AM
I have a database table TBLCOMPANYCONTACTS :
CREATE TABLE RELMAN.TBLCOMPANYCONTACTS (
COMPANY_CODE VARCHAR2(10) NOT NULL,
CONTACT_IDX NUMBER(3) NOT NULL,
TITLE VARCHAR2(4) NULL,
FIRSTNAME VARCHAR2(50) NULL,
LASTNAME VARCHAR2(50) NULL,
POSITION VARCHAR2(50) NULL,
TELNO VARCHAR2(50) N... more >>
populate listbox based on user credentials
Posted by victor NO[at]SPAM vanhillo.net at 4/29/2004 1:32:13 AM
Hello there,
I have a problem but i don't know how to solve it. I have a Login page
where i use Form based authentication and i use sql server. When the
user is logged in he is redirected to the correct page. I have users
that work in different shops. I want to populate datagrids, listboxex
e... more >>
Updating dataview in VB.net datagrid
Posted by gauravdell NO[at]SPAM yahoo.co.in at 4/29/2004 12:31:48 AM
Hi,
i have just started working on VB.net and got stuck on the following:
1) i have created a view in Sql Server 2000 using 2 tables and both of
them doesnt have primary keys but i have used inner join on the 1
column in common and those tables , i am confused if i update the data
in datagr... more >>
access+Xp vs access+98se
Posted by yener at 4/28/2004 11:32:54 PM
i have a database application using access written in csharp. it works well
on my computer with Windows XP . but when i run it under Win98 second
edition, if i try to insert , it catches an error: "..Operation must use an
updatable query...".
what would be the case here?
in fact , i am usi... more >>
Compact Access DB
Posted by T Cordon at 4/28/2004 11:09:00 PM
Is there any way to compact an Access database using a VB.NET app?
Thanks
... more >>
HOWTO: Table, related tables, and only related data in a dataset?
Posted by McGurk at 4/28/2004 11:07:58 PM
Been looking for an answer to this all day. Tried a number of
different methods, but I can't find out how the heck to do this. If
you can help, I would greatly appreciate it.
Setup:
.NET C# application (web service)
SQL Server 2000 database
Tables in question:
Plan (user (pk), date (... more >>
How do I tell if a dataset contains any records?
Posted by William Gower at 4/28/2004 9:34:27 PM
I used to be able to do
if rs.EOF and rs.EOF then
do something
end if
... more >>
INSERT Error
Posted by T Cordon at 4/28/2004 9:20:08 PM
Im updating a remote Access database using a Web Service.
First I drop all the records in the table and then I insert the records in
the DataSet received by the webservice.
Most of the tables update ok but some give me this error. The
databases/tables have exactly the same structure.
-214... more >>
SELECT .... LIKE doesn't work
Posted by Eric Nelson at 4/28/2004 9:11:02 PM
String cstr = "select * from tFam where name like \'" + tFind.Text + "\' order by name, fname"
Directed to Access DB
Works fine when tFind.Text = "nelson" but returns nothing when tFind.Text = "*son". Same behavior with single or double quotes around the find text. What's up
Thanks
Eric... more >>
|