microsoft.public.dotnet.framework.adonet Archive - January 2002
Post a message to this list
Messages
Page: 12345678910
ADO.Net GetXML (2 replies)
microsoft.public.dotnet.framework.adonet
Hello, I am attempting to use the GetXML feature of ADO.Net. I plan to load the results of this into Biztalk. I am getting an "xmlns" tag at the top of the xml that is generated by getxml. AGIDataSet xmlns "http://tempuri.org/AGIDataSet.xsd" This causes a problem with BizTalk. I want the tag as shown below. AGIDataSet Is there any way to achieve this with GetXML or do I have to go in and strip off...
Retrieving a primary key after inserting a new record. (5 replies)
microsoft.public.dotnet.framework.adonet
The following code connects to a database, selects a record from a table, fills a dataset, adds a new record to the dataset, then updates the database. Like I would have thought a new record is added to the database. The problem is that I can not figure out how to retrieve the key that is automatically generated when the new record is inserted into the table in database. Dim myConn As New OleDb.Ol...
DBNull questions (3 replies)
microsoft.public.dotnet.framework.adonet
Hi, Why, when I create a new row using the NewRow method of the dataset, do numeric fields get initialized with dbnull? dRow ds.Tables("InvoiceDetail").NewRow I was trying to do something like: dRow("BillableHours") 3 But I couldn't because IsDBNull(dRow("BillableHours")) returns true. So I ended up writing If IsDBNull(dRow("BillableHours")) Then dRow("BillableHours") 0 End If dRow("BillableHours"...
Unable to load Multiple Unique Constraints (3 replies)
microsoft.public.dotnet.framework.adonet
I cannot seem to load more than the primary key constraint even though I have a secondary unique key defined. I have a file with 2 unique keys (one of them being the primary key). From reading the documentation I should be able to use the FillSchema method to ensure that both constraints are loaded into my dataSet when I perform the Fill for the table. Unfortunately, this does not appear to work. ...
DataTable Copy (2 replies)
microsoft.public.dotnet.framework.adonet
Hi all, can someone tell me why this code does not work? DataTable ddt new DataTable("dt1"); ddt.Columns.Add(new DataColumn("a", System.Type.GetType("System.String"))); DataRow newrow ddt.NewRow(); newrow["a"] "f"; ddt.Rows.Add(newrow); DataTable nndt; nndt ddt.Copy(); I get a NullRefrenceException on the copy command. Any help would be appreciated. Thanks
Why does this not work? (2 replies)
microsoft.public.dotnet.framework.adonet
This code simply reads the "Photo" field from the Employee table in the Northwind database. However, it throws the following exception: An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll. Invalid Parameter used. Can anybody tell me how to make this work?? Thanks Bob Willer // Code Snippet: private void Form1 Load(object sender, System.EventArgs e) { this.sqlCo...
writing in a xml file (2 replies)
microsoft.public.dotnet.framework.adonet
I now that you can read a xml file with the xml reader but how can I write in a xml file must I use a dataset or somthing else or how much ways can I use
GetXML XMLNS Problem (4 replies)
microsoft.public.dotnet.framework.adonet
Hello, I am attempting to use the GetXML feature of ADO.Net. I plan to load the results of this into Biztalk. I am getting an "xmlns" tag at the top of the xml that is generated by getxml. AGIDataSet xmlns "http://tempuri.org/AGIDataSet.xsd" This causes a problem with BizTalk. I want the tag as shown below. AGIDataSet Is there any way to achieve this with GetXML or do I have to go in and strip off...
Evolution of the DataSet (13 replies)
microsoft.public.dotnet.framework.adonet
Situation: The new Dataset offers much in the way of improved disconnected data control. Reality: It lacks a few important items. Here are some thoughts: Item 1: True DataRelation activity. If a DataRelation is set, in a disconnected dataset, and i add a primary record, i see no reason why an interim ID cannot be established. Then when the foreign records are added, the FK can be populated with th...
DataView Manager? (2 replies)
microsoft.public.dotnet.framework.adonet
Can someone please explain the function of a DataViewManager? I can't find any documentation on it in the Microsoft knowledge base. The specific problem I'm trying to solve is I'm using DataViews to connect to a DataGrid and when the Datagrid navigates to a related table, it loses the settings of the original dataview such as AllowEditing. Thanks, Chuck
Is this a Bug or a Feature? (3 replies)
microsoft.public.dotnet.framework.adonet
Here's another DataSet to DataSource synchronization/update problem.... The DataSet has no knowledge of the sequence order of changes that has taken place when it performs an update to the datasource, and in some cases the sequence order of changes can be important. Here's an example that will cause a primary key error if you try it.... Consider a DataGrid connected to a DataView in a DataSet (it ...
NullReferenceException (10 replies)
microsoft.public.dotnet.framework.adonet
I am having a problem getting the return value from a stored procedure in C#. I have the exact same code in C# and in VB. The VB code returns the value, but the C# code halts with NullReferenceException. Is there something I am missing.... ' ' VB Code That works ' db New SqlConnection cmd New SqlCommand db.ConnectionString sConnectString db.Open() cmd.Connection db cmd.CommandType CommandType.Stor...
Parent/Child Relation Referencing in DataColumn.Expression (5 replies)
microsoft.public.dotnet.framework.adonet
DataColumn.Expression property documentation states that "Child(RelationName).ChildColumn" syntax could be used while defining the expression property for a data column in a parent datatable. When tried, we get the syntax error exception indicating: Cannot interpret 'Child' token. (In .Net Beta). Any clue on what's happening? Thanks. code snippet DataColumn petname new DataColumn ("PetName", typeo...
Bug in .NET - Framework? / Problems with deleting rows in a database table (2 replies)
microsoft.public.dotnet.framework.adonet
Hello, i have some problems with deleting rows in a database. My table structure: Parent table Child header table child data table I can delete all selected child data rows and the selected parent row. But, if i try to delete the selected child header i got an exception in the line "DataAdapterMeasurementHeaderData.Update(DBDataSet, "MeasurementHeader");" (Exception: 0 rows deleted (in german: "Pa...
Problem to update a dataset... (2 replies)
microsoft.public.dotnet.framework.adonet
I've a dataset I've creating it with the wizard. So, the wizard has generated a dataset class for me (and it's related table and column classes) I've fill it without problem and no problem to display it. But, When I try to uodate, I've a problem... If I try this code, the update process update nothing ! : dsMyDataset.MyTable(0).MyColumn newvalue dsMyDataset.AcceptChanges() adpSqlAdapter.Update(dsM...
OleDbCommandBuilder and transactions woes (2 replies)
microsoft.public.dotnet.framework.adonet
Hi all, I'm confused. What am I doing wrong in the following code snippet? I start the transaction and then as soon as I do the oCb.GetInsertCommand() I get the message shown below and I don't know how to fix it. Any help would be GREATLY appreaciated, as I am dead in the water. Thanks ... Ed "Execute requires the command to have a transaction object when the connection assigned to the command is ...
LoadDataRow Error (2 replies)
microsoft.public.dotnet.framework.adonet
it seems that the documentation of this method in ADO.Net is incorrect..supposedly, this method trys to locate an existing row and update it OR create a new row..as it exists, only the new row is created..please advise as to the future functionality of this method..
Retrieving autonumber field using Dataset and Dataadapter (2 replies)
microsoft.public.dotnet.framework.adonet
Hi There, I need to use a Dataset in order to update a Database, my code is the next: .... Dim ds As DataSet New DataSet() da.Fill(ds, "Shippers") Dim RowDatos As DataRow RowDatos ds.Tables("Shippers").NewRow RowDatos.Item("CompanyName") "Serpost Peru" RowDatos.Item("Phone") "(511) 555 5555" ds.Tables("Shippers").Rows.Add(RowDatos) Dim custCB As SqlCommandBuilder New SqlCommandBuilder(da) da.Updat...
How to return the sequence number of a datarow? (2 replies)
microsoft.public.dotnet.framework.adonet
For example, if a table has three rows, aaa bbb ccc then function("aaa") return 0 function("bbb") return 1 function("ccc") return 2
Connecting to Oracle using Oracle OLEDB Provider? (2 replies)
microsoft.public.dotnet.framework.adonet
I have installed the Oracle OLEDB provider (8.1.7). I am trying to connect using the following: Dim cnstr As String cnstr "provider OraOLEDB.Oracle;" & "Data Source kitchen;" & "User ID system;Password manager;" Dim cn As New OleDb.OleDbConnection(cnstr) cn.Open() But it hangs on the Open. What am I doing wrong here? Alan
Deleting Data with ADO.NET (2 replies)
microsoft.public.dotnet.framework.adonet
Hallo, How can i delete Data with ADO.NET! Updating and adding ist OK, but i can t delete any Data! Please send a Mailto:mko@crazyworld.de Thanks, Michael Kohler
Oracle Connection Trouble (2 replies)
microsoft.public.dotnet.framework.adonet
I am attempting to connect to an Oracle 8i database using the following code: Imports System.Data.OleDb Public Const ORA CONN STRING As String "Provider MSDAORA; Data Source servername; Initial Catalog TEST; User ID USER; password USERPASSWORD;" Dim strSql As String strSql "INSERT INTO..." Dim myOleClientSrvConn As New OleDbConnection (ORA CONN STRING) Dim myOleCommand As New OleDbCommand(strSql) ...
How to search a dataset? (4 replies)
microsoft.public.dotnet.framework.adonet
Hi, Is there a way to search a Dataset similar to the way we used to use the RecordSet.Find method? Right now I'm looping through. Thanks ... Ed
GetRows() Method in ADO.NET? (3 replies)
microsoft.public.dotnet.framework.adonet
Is there an equivalent to GetRows() in ADO.NET? I have not found one. The DataReader object is forward only, and therefore wouldn't support this. I might expect the DataSet object to support a GetRows() method, but I have not found an equivalent one. If no method exists, has anyone found a workaround? (The obvious one being to loop through the data object, and manually assemble an array... ugh!)
Determining column name in a datarow (2 replies)
microsoft.public.dotnet.framework.adonet
Hi, How can I get the name of the column in DataRow Object. For example, DataRow(0).ColumnName. I know this is incorrect, but what is the correct way to do this? Thanks ... Ed
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