microsoft.public.dotnet.framework.adonet Archive - April 2002
Post a message to this list
Messages
Page: 12345678910111213141516
Returning an oledb dataset (2 replies)
microsoft.public.dotnet.framework.adonet
Using an access database with a table named user what are the steps to take to make a connection and fill the dataset and return it to the form?
Newbie question (ado.net / vb.net). (2 replies)
microsoft.public.dotnet.framework.adonet
I'm new to ADO.NET and have been reading about it and have managed to create a little application in VB.NET which reads and updates one table. So far, so good. The table has 5 fields, ID(bigint), Code(char), Desc(char), ModId(char) and ModDate(DateTime). I would like the datagrid to just show the Code and Desc field, but when the record is saved, ModId should be filled with currentUser and ModDate...
typed dataset with enum column (4 replies)
microsoft.public.dotnet.framework.adonet
I am trying to create a typed dataset with one of the columns as an enum. I can do this in the schema designer but the class that gets generated uses an int for the data type of that column. Is there any way to force the column to be exposed as an enum that is specified in the schema without having to hack the code that the designer generates? Thanks for any help! Dot Net Guru
DataBinding Questions (2 replies)
microsoft.public.dotnet.framework.adonet
I am creating a data bound windows forms application which queries data from a table into a DataTable. For Example: DataSet ds new DataSet(); SqlDataAdapter da new SqlDataAdapter("SELECT * FROM Orders", "Data Source localhost;Database Northwind;Integrated Security True"); da.Fill(ds, "Orders"); I then add a calculated DataColumn to the DataTable and bind the columns to controls on my form: DataCol...
Conversion of column values (2 replies)
microsoft.public.dotnet.framework.adonet
It's a long story, but I'm not able to use the schemas in VS.NET in my current ASP.NET app. When it receives data though, it is in the form of a DataTable. Am wondering if I'm doing things the hard way after a query when I'm reading values into fields of my wrapper class. Does the following look like the work of a newbie or is it really the best way to safely get a long value: DataRow r; long Repo...
Paramaterized Queries (2 replies)
microsoft.public.dotnet.framework.adonet
I am converting a VB6 app to .Net and am having trouble with a paramaterized query. The following code does not work in .Net Command.Parameters.Append(.CreateParameter(, adVarChar, , Len(sValue), sValue)) What syntax do I use to append the Parameters collection? Many thanks, Robert
ADO.NET -> XML less functional? (4 replies)
microsoft.public.dotnet.framework.adonet
Unless I'm missing something it appears that returning XML in an ASPX page is more difficult than in ASP. In ASP/ADO I'd do this: MyCmd.CommandType 4 MyCmd.CommandText "myProc" MyCmd.Properties("XML Root") "root" MyCmd.Properties("Output Stream") Response MyCmd.Execute This would create a fully formed XML document (the store procedure used the FOR XML clause on the SELECT statement). The ASPX/ADO....
Typed DataSet Events: Should I use them? (2 replies)
microsoft.public.dotnet.framework.adonet
Greets, Just trying to see whether I got this straight ... a typed DataSet has events. What if my typed DataSet has 3 tables, whereof 1 table (call it tblResult) contains calculations made on values in the other two tables. Would the purpose of these events be for me to catch inserts and updates on the 2 tables holding my base values used for calculations, and updating the values in tblResult from...
ORA-01000: maximum open cursors exceeded (3 replies)
microsoft.public.dotnet.framework.adonet
When looping and opening a DataReader to get a single row after about 170 loops I get this error. ORA 01000: maximum open cursors exceeded I'm open the reader getting the value closing the reader and continuing. For some reason the cursor isn't getting closed on the Oracle server. Any ideas???
Generate Dataset Issue (5 replies)
microsoft.public.dotnet.framework.adonet
Ok, I must be missing something very simple. I'm trying to step through the "Walkthrough: Simple Data Access in a Windows Form" example. I create a connection and and oledbdataadapter, but when I got to generate the dataset I get this error: "There were problems generating WindowsApplication1.dsAuthors. To resolve this problem, build the project, fix any errors, and then generate the dataset again...
How to handle Null in C# (2 replies)
microsoft.public.dotnet.framework.adonet
SqlDataReader reader GetList("procListAllTransaction"); ..... while (reader.Read()) { .... results[index].exchangerate reader.GetDouble(3); ..... } ..... results[index].exchangerate is double. The problem: When reader.GetDouble(3) is null, results[index].exchangerate reader.GetDouble(3) generates error, saying results[index].exchangerate cannot handle null. Exception Details: System.Data.SqlTypes....
Mapping issue (2 replies)
microsoft.public.dotnet.framework.adonet
Hello, this is my scenario: I receive data from an XML document like this: ?xml version "1.0" encoding "utf 8"? BOOKS AUTHOR FName John /FName LName Smith /LName /AUTHOR BOOK Title My Book /Title ISBN 115577447X /ISBN /BOOK /BOOKS I fill a DataSet with the XML document using the ReadXml () method. Now my problem is inserting these data into an unique table such as the following: Table Books ISBN v...
Best solution for multiple databases (2 replies)
microsoft.public.dotnet.framework.adonet
I have a simple ASPX page with an OLEDB Dataset running a chart (SoftwareFX) and a datagrid. I have since discovered that the data I need is actually in three seperate databases. (The database in question is Oracle). My question is this. Should I look to ADO.Net for a solution to merging the data in the three databases? Is it as simple as three data adapters, all filling one dataset? Or should I l...
ADO.NET and crystal reports. (2 replies)
microsoft.public.dotnet.framework.adonet
Hi group We're having a situation where we have a report, based on company data, that has two subreports (one based on contacts, the other on company terminals). There are all together around 8000 companies, 6000 contacts, and 24000 terminals. We're using UDFs (user defined functions) to create the datasets, and although they take a few moments to run, they return back fine and dandy. However, onc...
Display datagrid CurentRowIndex on top row (2 replies)
microsoft.public.dotnet.framework.adonet
How do you display, in a windows form datagrid, the Datagrids CurrentRowIndex at the top line of the Datagrid display. I have more records in the data source than the datagrid can display. When I set CurrentRowIndex 300, the datagrid points to this record, but depending how I program it, the datagrid either doesn't display the CurrentRowIndex at all or places it on the very bottom line of the data...
Update problems with multi-table dataset (2 replies)
microsoft.public.dotnet.framework.adonet
I've got a dataset with two tables in a one to many relationship, say like orders orderdetails. I've bound the orderdetails table to a datagrid in a windows app, which works great. However, when I try to add a row to the table using the datagrid, the OrderId field (which i'm not displaying in the grid) doesn't get updated with the parent table's ID, and the update fails since that field isn't null...
Dataset.HasChanges and DataAdapter.Update (10 replies)
microsoft.public.dotnet.framework.adonet
Hi, I am having a problem inserting the fields from dataset to the Database using Dataset.Haschages() and Dataadapter.update() methods as shown in the following code. The error I recieive is Update requires a valid InsertCommand when passed DataRow collection with new rows. This error is returned in the last line where updation is being done. //Deserialize the dataset IFormatter formatter new Bina...
Retrieving data using a stored proc (5 replies)
microsoft.public.dotnet.framework.adonet
I was wondering if someone could look at this bit of code and let me know what I have done wrong, all I get is a message saying sysntax error near USP GetDeductionWeeklyHeaderRS Dim sqlComm As SqlCommand New SqlCommand("USP GetDeductionWeeklyHeaderRS", sqloConn) sqlComm.Parameters.Add("@inintTripLen", SqlDbType.Int).Value 1000 sqlComm.Parameters.Add("@invchrTripData", SqlDbType.VarChar, 8000).Valu...
Passing datareader object between layers (2 replies)
microsoft.public.dotnet.framework.adonet
Hi , We here used to belong the world of vb asp applications .Based on the technical documentation available to us we decided to use datareader object to pass data between layers of the application . But we now are faced with a showstopper cause of our decision to go that way . We realised after testing our application that if we dont release the connection object explicitly by calling its dispose...
available Datasources (3 replies)
microsoft.public.dotnet.framework.adonet
Is there a way that I can get available datasources from my machine through ado.net
NextRecordset equivalent in ADO.NET? (2 replies)
microsoft.public.dotnet.framework.adonet
Used to be in classic ADO you could execute two resultset retuning queries in one query to the db like: strSQL " SELECT Count(*) FROM Employees where LastName 'Smith' " ' returns counts strSQL strSQL & " SELECT * FROM Employees where LastName 'Smith' " ' returns desired resultset rst.Open strSQL, dbConn Do Until rst Is Nothing ' do somethig with the various resultsets Set rst rst.NextRecordset Loo...
dataset.fill can take a long time - or am I doing this right? (2 replies)
microsoft.public.dotnet.framework.adonet
I'm involved in writing an api for our other programmers here to use. It is written in c# and will access either MS Access or Oracle. Included in this api are simple table wrappers. Classes that allow you to get a particular row in a table or iterate through a set of rows. What I'm wanting is to have a single connection to the database using OleDbConnection. I also want to be able to have multiple...
Getting last created row (2 replies)
microsoft.public.dotnet.framework.adonet
I have an Access Database with a table that has an autoincrementing field in it. I use the code below to be able to create a new row. The problem is that I cant figure out how to get the new value that was assigned to the autoincrementing field in the new row. It doesn't exist until I do the Update. In older versions of VB I had a LastModified that I could set to a bookmark. How do I do this now i...
DataGrid and DataRelation (5 replies)
microsoft.public.dotnet.framework.adonet
Hi I have a problem with data relation and datagrid. I have following code, but can't get data show from the Child table (OutOfHouse) in my DataGrid. Code start DataSet PhoneDataSet new DataSet(); myCommand.Fill(PhoneDataSet, "Phone"); myCommand.Fill(PhoneDataSet, "OutOfHouse"); PhoneDataSet.Relations.Add("Root", PhoneDataSet.Tables ["Phone"].Columns["EmplID"],PhoneDataSet.Tables ["OutOfHouse"].Co...
Can't copy a table to SQL Server under ADO.Net? (2 replies)
microsoft.public.dotnet.framework.adonet
I just have to say that it is ridiculous that ADO.Net provides no facility for creating or modifying tables in the datastore in ADO.Net That's half a product, guys.
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification