all groups > dotnet ado.net > february 2005
Filter by week: 1 2 3 4
Limiting the # of rows returns by a query
Posted by DavidM at 2/28/2005 9:31:03 PM
ADO Classic had a MaxRecords property the allowed you to limit the number of
rows being return by a query. If there is a similiar property in ADO.NET and
if so, where is it? ... more >>
fails trying to save :unhandled exception of type "system.nullreferenceException.
Posted by Barret Bonden at 2/28/2005 6:45:59 PM
I get "An unhandled exception of type "system.nullreferenceException.
Object reference did not set to an instance of an object"
while trying to save back to the database - relating to : da.Update(ds)
, the last line of code in this listing. Just starting tyring to learn data
in vb.net- wanted... more >>
Access datasource through forms
Posted by Hemang Shah at 2/28/2005 5:53:30 PM
Hello
How can I access dataset defined on one form by all the other forms opened
by that form ?
Is that even possible ? if so, how ?
Thanks
... more >>
loading tab-delimited files...
Posted by gloria at 2/28/2005 5:38:21 PM
Hey kids,
I need to work with a tab-delimited file and load and validate the data
before inserting it into various tables. Is there a way I can load it
directly a temp table or load it into a DataSet? This would be much
easier than building a two-dimensional array. Any thoughts on how to
d... more >>
Populating Columns
Posted by Ian Frawley at 2/28/2005 1:16:44 PM
Hi All,
I was just wondering if this is possible.
I have a strongly types dataset that has a number of columns that are
populated and a couple of columns that aren't populated. I was wondering if
it is possible to populate the unpopulated coulmns using a SqlDataAdapter
and a stored procedu... more >>
C# and MySQL using ByteFX Data Provider
Posted by ape NO[at]SPAM unister-dot-de.no-spam.invalid at 2/28/2005 11:50:52 AM
hi all,
I want to get an db connection to a mysql database, using the bytefx
data provider. I want to use this provider because i have to migrate
my webservice to Linux/Mono and as I know, the mono mySQL data
provider is based on the bytefx data provider.
My problem:
i can't find the provi... more >>
SQL timestamp column for concurrency
Posted by Ade at 2/28/2005 11:33:04 AM
Excuse my ignornance but I am relatively new to .NET. We have migrated a
solution from Access to web based and have a fully working solution except
that we failed to consider multi-user use in ceratain areas, although
last-write is OK it has caused a few minor issues with some information bein... more >>
ADO.Net DateTime issue
Posted by Paul Yanzick at 2/28/2005 10:06:56 AM
Hello,
I'm having some issues pulling a datetime object from a database and am
looking for any suggestions I can get.
I have written a function to make querying specific fields in a table as
generic as possible. The function is below:
private string GetFieldValue(string IDKey, string F... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Transaction please ??
Posted by ~Maheshkumar.r at 2/28/2005 9:59:02 AM
How can i include Transaction Directives. Will it work like same fashion of
manual code.
My appln is in lauching stage, i dont want to change the coding structure
for manual transaction code inclusion. So i decided to include trasaction
directives in the page header. but this is giving error as ... more >>
Integrated security
Posted by Arne at 2/28/2005 9:13:01 AM
How do I create trusted security between my web server and my sql server?
I don't know the account and password that my web server is running under.... more >>
Autonumber Column in Insert
Posted by mh1mark at 2/28/2005 8:55:01 AM
I have an Access table I am doing an insert into. The Insert includes a
select from another table, but does not include the column name of the
autonumber column. If I run the query in Access, it inserts correctly,
generating a new number in the autonum column. If I run it from .net using... more >>
Multiple table dataset
Posted by Bill K at 2/28/2005 6:57:04 AM
I have a classic scenerio - simliar to the Northwind
Customer/Ordes/OrderDetails. I want to select a customer from a combo box,
display pertinent info, and display in a hierarchical datagrid the orders and
ordertails (in to next layer). I am creating 3 dataadapters, one for each
table. I ... more >>
Dataset for crystal report
Posted by Hemang Shah at 2/28/2005 4:49:27 AM
I have form1 which has the dsDataset which is instance of
dsDataSetClass.xsd
I have a button called "report", which opens up another form, which has the
Crystal Report Viewer.
The datasource of the report is "current connection" dsDataSetClass
But whenever I run the report, it shows up... more >>
OleDbException on Access DB Query
Posted by Nick at 2/28/2005 2:23:02 AM
Hi,
I get this error where calling a query in an Access DB with the Nz function
contained within it:
System.Data.OleDb.OleDbException : Undefined function 'Nz' in expression.
I don't believe this should happen. How can I fix it.... more >>
need simple help with Unicode
Posted by Kent Rollins at 2/28/2005 12:57:19 AM
I am trying to insert a Unicode string into SQL Server and then read
it back out. I wrote a simple little test app and somewhere my string
is getting converted to ANSI or something similar. Can anyone sport
what I'm doing wrong or give me some ideas to check out?
cmd.CommandText = "CREATE TA... more >>
How do I "refresh" my bound control?
Posted by Bruce A. Julseth at 2/27/2005 11:38:07 PM
After I've completed an update of my data to my database, how do I "refresh"
bound controls. Right now, I am doing EXACTLY the same as I did when I
initially bound them, ie. setting up the DataAdapter, reFILLing the DataSet,
then Binding.Add to each of the controls. This seems like a waste. I a... more >>
CommandBuilder generates incorrect SQL
Posted by enders2010.5357414 NO[at]SPAM bloglines.com at 2/27/2005 11:00:03 PM
Hi,
I have the following SQL :
Select AutoID, TS, Object, ActionType, ID, Property, OldValue,
NewValue From Changes.
When I use the commandbuilder (both OLEDB and SQL) I get the following
result back (for delete) :
(SQL)
"DELETE FROM Changes WHERE ( (AutoID = @p1) AND (TS = @p2) AND ((@p... more >>
Store Procedure return values to VB.net app
Posted by Rudy at 2/27/2005 10:45:01 PM
Hello All!
I have a SP that returns a int value as an alias called "returnvalue". I can
call the SP fine in my code.
conLog = New
SqlConnection("Server=localhost;uid=*****;pwd=*****;database=footbet")
cmdLog = New SqlCommand("loginStore", conLog)
cmdLog.CommandType = Comm... more >>
Many data components - use one transaction?
Posted by Marty at 2/27/2005 8:11:41 PM
I need to use three data components to write to three different tables
(same database). But they must participate in the same transaction
(all must succeed or rollback). At the same time, each data component
should be able to perform an update without a transaction if desired.
Not sure how to ... more >>
how to construct a Schema
Posted by RayAll at 2/27/2005 4:21:28 PM
Hi,
I have a table which has 3 forign keys to three other tables.I's to make an
schema out of this table which contains all the constrainsts and all its
relations and also I'l like to have the records from the look-up tables to
be included into that schema.The reason I like the data is that .I... more >>
Problem to restore an SQL database....
Posted by Raphaël Désalbres at 2/27/2005 3:36:18 PM
Hello,
I'm having the following problem.
I have SQL Server Accounting database called 'db_Accounting' , and a form.
This database is only accessed by one user at a time.
I have made a menu to backup the database. Works fine.
Dim fd As New SaveFileDialog
fd.Filter = "Database backup (BAK... more >>
Why does my Update not update?
Posted by Bruce A. Julseth at 2/27/2005 1:28:30 PM
After running the follow code, "intResult" is returned as "0" and the update
does not take place. Could it be that my database column name, "Name", is
not being related to the Procedure parameter, "@Name?" Is so, what do I need
to change so that "Name" will be related to "@Name?". Can I do it wit... more >>
Converting to Date format.
Posted by Srinivasa Rao at 2/27/2005 4:23:02 AM
I have a string which has a value "2/14/2005". I need to convert this string
to "2-14-2005" format. How can i do this conversion?
Regards
G.V.Srinivasa Rao.... more >>
filling a dataset taking toooo much time
Posted by mich_stone NO[at]SPAM yahoo.com at 2/27/2005 2:51:45 AM
Hi world.
I have a dataadapter whose select statements does some joins between
some tables and a view.
Running this select statement in Query Analyzer gives me my result in
under 2 seconds (i can digest it even if it takes 4 seconds which is
twice this time).
But when i do myAdapter.Fill... more >>
Transaction Directives..
Posted by mahesh at 2/26/2005 2:45:01 PM
How can i include Transaction Directives. Will it work like same fashion of
manual code.
My appln is in lauching stage, i dont want to change the coding structure
for manual transaction code inclusion. So i decided to include trasaction
directives in the page header. but this is giving error as ... more >>
Script problem...
Posted by Raphaël Désalbres at 2/26/2005 12:55:12 PM
Hello, I'm having trouble with the following script:
Me.cnAccountingProgram.Close()
Me.cnAccountingProgram.Dispose()
Dim cnMaster As New SqlConnection("Initial Catalog=Master; Data
Source=(local); Integrated Security=SSPI")
Dim cmd1 As New SqlCommand
cnMaster.Open()
cmd1.Connection = cnMas... more >>
Data Source Configuration Wizard and autogenerated code
Posted by dimension at 2/26/2005 10:55:05 AM
Hi,
i have an Access Database being used in my project. When i double click on
this in Solutions Explorer, a wizard pops up ("Data Source Configuration
Wizard"). Apparently, this wizard allows you to select database object for
which you want "accessor" classes created for. This is all good ... more >>
hi
Posted by anuradha ravanan at 2/26/2005 8:24:23 AM
i have loaded .net and sqlserver in my windows xp os.but i have error
like "cannot open database requested in login "sqloledb.1".login failed
..login failed for user sa" is the message.plz help me correct the error.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just p... more >>
Problem with SQL Server Script...
Posted by Raphaël Désalbres at 2/25/2005 10:54:12 PM
Hello,
I'm having the following problem.
Using the following script works OK when run from Query Analyzer
use master
go
Drop database db_Accounting
go
RESTORE DATABASE db_Accounting FROM DISK='D:\mydb.bak'
But, my question is, how can I make it work through VB.NET code?
Thanks,
... more >>
dBase
Posted by Charles A. Lackman at 2/25/2005 3:50:50 PM
Hello,
I am working with a dBase Plus database and I cannot create a connection
string to the darn thing. I have tried the Fox Pro Driver, ISAM and others
and I keep getting "File is not a valid Table" exception. When I look at my
ODBC Data Source Administrator I see a "Driver do Microsof... more >>
Batch queries in stored procedures?
Posted by at 2/25/2005 2:52:20 PM
I'm using SQL Server stored procedures to access my tables, but I'm having
problems with concurrency violations when updating.
The ADO.NET Core Reference (Ch. 11, pg 469) says you can use batch queries
to retrieve data after submitting an update via a data adapter. Am I
correct in assuming th... more >>
Maximum data size or rows
Posted by jj at 2/25/2005 2:41:35 PM
Is there a maximum data size(MB) an Access table is supposed to hold? Or a
maximum number or rows?
concerned
jj
... more >>
DataSet Performance
Posted by Klaus Aschenbrenner at 2/25/2005 1:13:18 PM
Hi!
I've a DataTable with 100 rows and 100 columns. Then I'm updating each
column in each row. When I call the Update method on the DataAdapter, this
generates 10000 UPDATE statements.
Are there any solutions how I can create a better solution, which reduces
the UPDATE statements? Or how c... more >>
WinForms connect to Hosted Database?
Posted by MisterKen at 2/25/2005 12:53:05 PM
I initially posted this on the WindowsForms group, but perhaps it's more
appropriate in the ADO.NET group.
Is it possible to using connect to a SQL Server database on a shared hosted
web account using sqlconnection objects?
What would the connection string look like?
Thanks.... more >>
Problem in Updating records in DataGrid Control
Posted by Ganapathi Hegde at 2/25/2005 11:55:59 AM
Hi,
I am new to ASP.NET. I developed an sample application, which displays the
database table on DataGrid Control.
I added Edit, Update, Cancel (Button Column) to Grid Control. Then I
implemented EditCommand, CancelCommand and UpdateCommand
When I click on Edit link text box will display fo... more >>
How to add new record in a form with BindingManagerBase used?
Posted by Davis at 2/25/2005 10:58:23 AM
Dear Experts,
I have a problem on adding new record in a form, with btnAdd_Click function,
the record stays at current record...even with a clear form function, it
only clear the record currently staying at. Seems that the datatable in ds
doesn't go to "AddNew" mode... or I need to do anyth... more >>
ERROR IN ORACLE CONNECTION
Posted by triptiasawa NO[at]SPAM gmail-dot-com.no-spam.invalid at 2/25/2005 9:41:27 AM
I HAVE CREATED ODBC CONNECTION FOR ORACLE.But when i use the
connection in vb.net i get the following error
error:ORA-12154 :TNS:could not resolve servicename
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** ... more >>
new bie to stored procedure...please suggest me
Posted by mahesh at 2/25/2005 9:35:43 AM
Hello groups,
I'm new to database, i like to master stored procedures, triggers etc.
please suggest me good site to read about all this with good example..
Mahe~
... more >>
serializing dataset
Posted by sonicsoul NO[at]SPAM gmail.com at 2/25/2005 9:08:20 AM
Hello,
In my custom control, i am providing serialization / deserialization of
dataset and noticed that, when a dataset table is empty, it will not be
serialized. (no xml is generated for empty tables using ds.GetXml or
ds.WriteXml)
Example:
DataSet ds = GetData();
ds.Tables.Count<enter>
... more >>
Login based connection string setting!
Posted by Raj at 2/25/2005 8:23:04 AM
Hi!
I am developing a VB .NET based app for a company X that has five associate
companies A,B,C,D, and E. Each of the associate companies has its own
database, but have one common database to store the user profile and login
details. All the five databases are identical.
I have one appli... more >>
Insert SQL Error
Posted by Tom Nowak at 2/25/2005 5:27:02 AM
I am writing a VB NET program, and I have set up the following InsertCommand
property and parameters:
dap1.InsetCommand = New OleDb.OleDbCommand( _
"INSERT INTO entry " & _
"(date, child, activity, starttime, endtime) " & _
"VALUES (?, ?, ?, ?, ?)", cnn1)
Dim prm11 As OleDb.OleDbParamete... more >>
DataTable.Select method bug in .Net Framework 1.1 SP1 and in KB891
Posted by lynch at 2/25/2005 2:31:04 AM
There is a bug in .Net Framework 1.1 SP1 with the DataTable.Select method.
Microsoft's description of the problem may be found here
http://support.microsoft.com/default.aspx?scid=kb;en-us;891742
and you can ask for a fix to that issue. The problem is that the fix does
not work properly!... more >>
Close() and Dispose()
Posted by alx at 2/25/2005 1:19:07 AM
On some documentation about ADO.NET, I've found that, during the close
of a IDbConnection, is a "best practice" to close a connection with
these lines of code:
connection.Close();
connection.Dispose();
For example, Microsoft Data Access Application Block uses this code to
close con... more >>
Subject:Writing a db independent data access layer with DAAB:How?
Posted by sedefo at 2/24/2005 10:35:03 PM
I ran into this Microsoft Patterns & Practices Enterprise Library while i
was researching how i can write a database independent data access layer. In
my company we already use Data Access Application Block (DAAB) in our .Net
projects. We use SqlHelper in SQL based projects, and OracleHelper ... more >>
Multiple raiseerrors = SqlException.Errors
Posted by DW at 2/24/2005 9:59:01 PM
Hi all,
I posted a question a couple of days ago, but did not receive any answers.
I´ll try to explain my issue a bit deeper.
I will also attach some example code. One stored procedure and some C# code.
I have a stored procedure that can raise multiple raiseerror. It is
important that I c... more >>
Executing stored procedures as CommandType=Text
Posted by Gavin G. Jones at 2/24/2005 9:21:11 PM
I've got an urgent problem - I'm converting a legacy VB app to .NET.
I've got thousands of pre-saved strings such as "exec sp_name 'p1', 'p2',
'p3'" that execute on a VB 6 application and ADO.
These now need to execute on C# and ADO.NET.
I receive the SQL requests in the string format with... more >>
Cannot do update on a record. Please help.
Posted by Newbie at 2/24/2005 9:09:02 PM
I am VERY NEW this whole concept of DataSet and all. I have a code that goes
like this..
=============================================
conn.Open()
Dim ds = New Data.DataSet
'/// The function below is used to create adapter ///
da = CreateCmds... more >>
unicode parameter with contains() clause in OracleClient
Posted by curtis at 2/24/2005 5:59:02 PM
Hi,
We are trying to provide keyword searching with the Oracle Text engine using
the 'contains' predicate. However, it does not work when using NVarChar or
DBType.String parameters like so:
IDbConnection conn = database.CreateConnection();
conn.Open();
IDbCommand comm = conn.CreateComma... more >>
SQL Server Data Access - Conversion to Unicode?
Posted by epigram at 2/24/2005 3:32:31 PM
If we have a SQL Server 2000 database that does not use unicode data types
(nchar, nvarchar, ntext), but is instead uses character data types (char,
varchar, text) does ADO.NET go through some conversion process when it, for
example, retrieves these values to store in a .NET string? In partic... more >>
Retrieving procedure parameter information is not supported
Posted by HungTrinh at 2/24/2005 2:23:30 PM
Hi All,
I get an error when I use OleDbCommandBuilder.DeriveParameters to
retrieve procedure parameter information. The error is " Retrieving
procedure parameter information is not supported by the
'Microsoft.Jet.OLEDB.4.0' provider". Below is the query in MSAccess:
INSERT INTO TT_Users... more >>
|