microsoft.public.dotnet.framework.adonet Archive - July 2002
Post a message to this list
Messages
Page: 1234567891011
Accessing a column of a datatable (2 replies)
microsoft.public.dotnet.framework.adonet
Hi, I have a datatable which has 4 colums. I want to retrieve values from the 2nd column and populate an array. Anybody to help me? SAM
Adding row to childtable creates another table instead of adding it (3 replies)
microsoft.public.dotnet.framework.adonet
Hi all, I've got an xml file that looks like the following: General Date / Title Title goes here /Title Category id "5" My Category /Category Users User position "1" Email test@test.com /Email Phone 555.555.5555 /Phone Name John Doe /Name UserID 1 /UserID /User /Users Area id "12" United States /Area /General I read this file into a dataset named DS and then I would like to add a new User to it. A...
Can I have multiple transaction objects on the same connection? (2 replies)
microsoft.public.dotnet.framework.adonet
Hi there!!! Can I have multiple transaction objects on the same connection? I will be opening the connection once, and in the loop, i am getting the transaction object and doing some operation to Database(if successful means commit the transaction else roolback the transaction) it is like, connection.open foreach(...) { trans connection.begingintrans try{ trans.commit() } catch { trans.rollback() ...
Dynamic Row size in Datagrid (2 replies)
microsoft.public.dotnet.framework.adonet
I have a datagrid that has three columns, Date, Entry, User. Entry can be a string from 0 to 10,000 characters. Is there anyway to make the row in a datagrid be multiline such that it displays the entire contents of the entry column? So far I only get as many characters as the column is wide, all rows are exactly the same size. Thanks in advance.
xml to dataset (2 replies)
microsoft.public.dotnet.framework.adonet
Hello, I have a xml file that looks like this level0 content0 "test" level1 content1 "test" level2 text "test" / level2 text "test" / /level1 level1 content1 "test" / /level0 level0 content0 "test" level1 content1 "test" / /level0 In my asp.net page, I read this xml file into a dataset. Next thing I want to do is loop through the dataset and return the items and write it to a label. But I want to ...
aspnet_wp fails to connect to SQL Server 2000 (3 replies)
microsoft.public.dotnet.framework.adonet
Hello amigos. I have a web service that use the SQLConnection object to establish a session with SQL Server 2000. The web services uses an assembly file that has the bussiness logic. this assembly uses another assembly that has the data access layer. One of the procedures of the last, connect to SQL server, fill a Dataset and disconnect from SQL. After some time (3 to 4 hours) the applicacion is g...
Dataset (2 replies)
microsoft.public.dotnet.framework.adonet
Hi, I have a datatable which has 4 colums. I want to retrieve values from the 2nd column and populate an array. Anybody to help me? SAM
Joining two DataTables to a CheckListBox control... (2 replies)
microsoft.public.dotnet.framework.adonet
My situation is that I have two tables: tblKeyword and tblProjectKeyword. tblKeyword contains a list of available keywords (intKeywordID, txtKeyword). tblProjectKeyword (intProjectID, intKeywordID). tblProjectKeyword.intKeywordID is a FK to tblKeyword.intKeywordID. tblProjectKeyword.intProjectID is also a FK to another table. So the tblProjectKeyword table is a Many Many relationship... a join tab...
Oracle .NET bug? (14 replies)
microsoft.public.dotnet.framework.adonet
I am having a problem with Oracle .NET where it is not returning all the data in a row. Some rows have all the data but some rows are missing data. I am requesting three fields from a table (select nbremployee, namelast, type from emp) the nbremployee & type always are returned with each row but the namelast is randomly missing from rows. Here is the code I am using to fill my datagrid. I have tri...
SqlTransaction (4 replies)
microsoft.public.dotnet.framework.adonet
Hi, I'm doing some ADO.NET stuff and I've used an SQLTransaction becuase I have a function that does three inserts and, or course, if one fails, then I don't want the others to happen and I have it working, but I was just wondering about the order of the lines of code. Here is what I have to use the transaction (I followed an example from ..NET's help) Dim conInsert As New SqlConnection(Configurat...
using LOBs with the System.Data.OracleClient (3 replies)
microsoft.public.dotnet.framework.adonet
I need to insert and retrieve CLOBs from an Oralce 8i. The CLOBs are in a simple table consisting of Number column and a CLOB column. In keeping with how this table was used by a Java JDBC Tier I am inserting a row into the table and then retrieving it, this time in ..Net by using the OracleDataReader and getting an OracleLob object as below: OracleCommand command new OracleCommand("select * from ...
DataGrid and ADODB._RecordSet (2 replies)
microsoft.public.dotnet.framework.adonet
Hi~ I doing windows application in C# I want to bind DataGrid by ADODB. RecordSet my code //ClassLibrary3.cs public ADODB. Recordset CompRS2(string strQuery) { ADODB. Recordset rs new ADODB.RecordsetClass(); DataTable dt new DataTable(); OleDbConnection myConnection new OleDbConnection ("provider SQLOLEDB;server localhost;uid sa;pwd ;database P ubs"); OleDbDataAdapter myOleAdapter new OleDbDataAda...
DATASET and PrimaryKEY (2 replies)
microsoft.public.dotnet.framework.adonet
After creating a dataset with a few tables, how could I find which columns are primary and foreign keys? Victor
SQL Server BUG. Able to update invalid Foreign Key Value. (3 replies)
microsoft.public.dotnet.framework.adonet
I am able to update foreign key column with an non existence parent primary key value using ADO.NET parameterized command. See example below. Note that database columns type are varchar but parameter type is DbType.string which maps to nvarchar. This happens only when update statement updates the PK column of child table along with the FK. If it is excluded then SQL server will report an FK constr...
DataSet - DataRow inserts in C# (3 replies)
microsoft.public.dotnet.framework.adonet
Can someone tell me what is wrong with this code? It fires when there is a postback. If you look at the line with Response.Write commented out. This is the last line that works. It correctly reports back 8 rows. But somehow the inserts fail. I guess I need more advice on when to use AcceptChanges(),what object to fire AcceptChanges() from, and if I use AcceptChanges do I still need a command build...
FK Constraint Error when adding DataRow (2 replies)
microsoft.public.dotnet.framework.adonet
Hi all, I'm currently trying to add a row to a child table in a two table DataSet that's bound to a DataGrid, but I'm getting a foreign key constraint error 'relEntryType GLAccount requires the child key values (1) to exist in the parent table.' The constraint only applies to one FK pair. Child table: ("tbl gl accounts") Parent: ("tbl gl account entrytypes") FK: ("glaEntryTypeID") There are two re...
XML and DATASET - example (2 replies)
microsoft.public.dotnet.framework.adonet
Hi Can anyone produce a simpel example of how to read XML from a dataset persons person name "michael" Great guy /person person name "chris"/ person name "john" Bad boy /person /persons Know about the dataset.loadxml, but don't know how to loop throu it (dont whanna use a datagrid) Thanks / Torben
Populating a Strongly Typed DataSet (4 replies)
microsoft.public.dotnet.framework.adonet
Hi, How do I populate a strongly typed DataSet from a non typed dataset?. For example: I have a stongly typed DS called CustomerOrdersDataSet. I run a stored procedure GetCustomerOrdersByCustomerID which fills the untyped DataSet. How do I fill the CustomerIredersDataSet from the unlyped DS? Thanks, Gavin
Sorting Child Rows... (3 replies)
microsoft.public.dotnet.framework.adonet
Hi, Excuse my ignorance on this but I need to sort a table of child rows by a specified field when I do a .getchildrows on the parent row. Can anyone please advise on this ..? Is there something I can do when building the DataRelation between the tables (done in code, not throught any wizard) or something the set when executing the .getchildrows method on the parent row... I don't know ... Obvious...
Repeated Form Entry? (5 replies)
microsoft.public.dotnet.framework.adonet
I got no responses in the ASP.NET group, so I'll ask here since this is partly an ADO.NET question. If you were to make a form that asked for a company name and then names and ages like this: Company Name Age Name Age Name Age Name Age Name Age How would you go about displaying the form and how would you get that info into a database (i.e. a table of companies and a table of employees each with th...
ORACLE connection ? (2 replies)
microsoft.public.dotnet.framework.adonet
I am coding web application now by using Microsoft BETA oracle provider. It seems already open a new connction and never close the connection from ORACEL server until it reach ORACLE connection limit. The code is following: Dim objConn as new OracleConnection(connectionstring) Dim objCMD as new OracleCommand Dim objSet as DataSet() objCMD.CommandText "StoreProcedureName" objCMD.CommandType Command...
DataBinding: Bug or feature (2 replies)
microsoft.public.dotnet.framework.adonet
I found a strange behavior concerning datasets and Windows forms data binding. I have a (typed) DataSet, let's call it dsCustomer. I have several TextBoxes that are bound to columns of a table in dsCustomer using txtName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsCusomer, "Customer.Name")); When the user clicks a button dsCustomer is filled with rows from the database table. ...
DataSet and DataTypes (3 replies)
microsoft.public.dotnet.framework.adonet
Hi, My application is a Windows application connected to SQL Server 2000 database. I have a dataset generated at run time and I am binding it to the form controls. The data adapter is OLEDBDataadapter and not SQLDatadapter because we may use Oracle also. Now, assume that the dataset's select statement be, "select Column1, Column2 from Table1". The Column1 is of datatype "int" in the SQL Server dat...
DataAdapter and InsertCommand (4 replies)
microsoft.public.dotnet.framework.adonet
Hi Guys, Just a quick question. I have used the DataAdapter to create and Insert, Update, Select, Delete stored procedures. I pass all the values the input parameters and try to execute the InsertCommand but i keep on getting and error. Can anyone help me. Code enclosed below. Thanks Tim Taking in mind that the wizard has created the parameters etc in the Init code. With SQL DATA CUSTOMERS ..Inser...
Join Table In DataSet (7 replies)
microsoft.public.dotnet.framework.adonet
Hi, I fill a DataSet with 2 Tables. a) Orders OrderId CustomerId OrderDate ..... b)Customers CustomerId FirstName LastName ..... Can I Join these tables and bind the result in a datagrid. The result table i want to have OrderId,OrderDate,FirstName and LastName. George Thanks
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