.NETGURU
microsoft.public.dotnet.framework.adonet
Up to: Discussion Lists

  • RSS Syndication
  • Post a new message to this list...
    Latest Discussions Archive
    DataAdapter.Update is not working (10 replies)
    microsoft.public.dotnet.framework.adonet
    Hi Gurus, I am using OleDBDataAdapter to update the data in the DB2. I am only taking the Modified Data in a Datatable using Datatable.GetChanges() method and passing the modified data to the DataAdapter's Update method. I am specifying the UpdateCommand for the Dataadapter by my own. All is fine when I execute the DataAdapter.Update statement, it is not giving me any error.. but when I check the ...
    DataSet : Error when trying to use ReadXml the 2nd time (7 replies)
    microsoft.public.dotnet.framework.adonet
    Hi, On my application, i'm using this : dataSet1.ReadXml(textBox1.Text, XmlReadMode.Auto); This works fine the first time but the second time, if i changed the value of textBox1.Text, dataSet1 is not reading the XML file which is in textBox1.Text, but it's reading the XML file i've used the first time.... Do you know how to solve this ? Thank You. LEBRUN Thomas http://morpheus.developpez.com
    Batch update problem (6 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I have a winform datagrid where a user can modify more than one row at a time. A button calls theDatapter.Update() to persist changes to db. I wrap the Update in a client side transaction and commit on success/rolllback on failure. In addition, exception handler code invokes RejectChanges to undo user modifications to the DataTable. Now, here's the problematic scenario: a user modified two rows wh...
    Updating a dataset from a datalist control (6 replies)
    microsoft.public.dotnet.framework.adonet
    I am using the editItem templates of the datalist control. I have a problem as to transferring the changes made by the user to the dataset. As I am reading the results form a database to a dataset then using the dataset to fill the datalist. The problem is I am not sure how to transfer changes back to the dataset as I plan on using the update method of the dataset to change the database. Is this p...
    System.Data.OracleClient.OracleConnection - Internal Pooler Error (8 replies)
    microsoft.public.dotnet.framework.adonet
    I notice that every now and then the Close method of System.Data.OracleClient.OracleConnection causes: An unhandled exception of type 'System.Exception' occurred in system.data.oracleclient.dll Additional information: Internal Pooler Error: 2 I searched and couldn't find any hits on this. What's a good way to start figuring out what's going on? Thanks... Assembly System.Data.OracleClient, Version ...
    SqlCommandBuilder.DeriveParameters against SQL 2005 Beta (11 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, I'm testing work against SQL 2005. I encounter InvalidCastException in System.Data.SqlClient.SqlCommand.DeriveParameters when attempting to call on SqlCommandBuilder.DeriveParameters. Is this familiar? If so, what workaround did you implement? Thank you, Gad. I think I will implement something with the use of sp procedure params rowset.
    Best Practices - Connecting to Oracle from a fat client (9 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hello all I'm currently working on a program that connects to both an Oracle 9i data warehouse as well as a SQL Server 2k server. The application will be used mainly by 30 50 people internally, and will connect directly to the respective servers (ie, not using remote objects via remoting or web services). In addition, the Oracle server is simply going to have single selects against it, retrieving ...
    spaces and special characters in field names, brackets don't work (8 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    When I had non standard field names I used to be able to do this in VB6 and Access97. Now using Access2002 and VB.net. I inherited this data base and have to use the field names with special characters and spaces. Now in VB.net it gives me and error. If I don't use the fields that have brackets, things work OK, if I use * instead of naming fields it fails in the same way because of the space and t...
    Breaking change in .NET 1.1 SP1 DataTable - Repro provided (6 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    The following piece of code will run fine in .NET 1.1 without SP1, but will throw a NullReferenceException in SP1. Sadly, our app no longer runs with SP1, since it uses the same pattern (changing another row of data inside a ListChanged event of a DataView). Could please someone from Microsoft confirm this as a bug, and/or provide a workaround? Regards, Urs run the following as a console app: [VB....
    OLEDB Provider throws exception "Specified cast is not valid" (5 replies)
    microsoft.public.dotnet.framework.adonet
    We are trying to use a 3rd party OLEDB driver that apparently works well under VB6. The driver appears to be installed correctly, as we can access data via the driver using Excell. Just excecuting the following lines... dim oledbCnctn as New OleDbConnection( CnctnString ) oldedbCnctn.Open() throws the exception "Specified cast is not valid" (please see details below). All connection string paramet...
    Error: Can't create child list (6 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I have a master table named keywwordsets and two child tables keywords and searchphrase. I created relations in the xsd file: ID to KeywordSetID in both cases. In the underlying Access database these same relationships are also defined. The KeywordSet table is bound to 3 textboxes and a checkbox. The child tables are bound to grids. The datasources are the dataset dsWKS1 and the datamembers are th...
    Best practice for inserting new DataRows with lots of 'not null'-columns (5 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi again, I'm pretty new to Winforms & DataBinding and I'm currently running into a lot of issues. Sorry if this has been explained before. I have a DataSet containing a table 'Member' that holds a lot of columns with info about members. Most of these columns are declared to be 'not null' in the DB. My WinForm for displaying members consists of a Listbox showing basic info (full name) of a member,...
    How to fill a dataset from an inline function ? (12 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I want to read a table into a dataset using an SQL inline function (which returns a table). Can anyone tell me how to do it ... have been trying all sorts of combinations with no luck.
    how to get database list? (4 replies)
    microsoft.public.dotnet.framework.adonet
    I have some connection problem and wonder if I do everything correctly. I'm trying: I created a SqlConnection with the ConnectionString: Address myIp,myPort;User ID sa;Pwd password and with this connection i "PLAN" to run sp databases stored procedures. However when I open the connection I get: SqlException: SQL Server does not exist or access denied. Although I checked myDatabase property securit...
    DataTable.Select method bug (?) with .net framework 1.1 SP1 (6 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I was using the Select method without any problem, but when I installed SP1 for the Framework 1.1 I got into troubles: the overloaded method: Overloads Public Function Select(String) As DataRow() doesn't seem to work correctly. It seems to forget some of the final where conditions, not all... If I compile the code or run on a PC without SP1 it works correctly. the following is the code where dtDL ...
    Getting a subset from a Dataset in a new Dataset (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hello, I'm facing with the the following problem: I have dataset with several datatables (5). The first Table t1 contains the parent objects of the second table t2 (relation) and the second table has parent relations the other 3 tables (t3,t4,t5). Now I want to copy only one row of t1 with all sub elements of the other tables into a new dataset of the same type. I found no performant answer to thi...
    Postback issues (6 replies)
    microsoft.public.dotnet.framework.adonet
    Dim index As Integer index e.Item.ItemIndex DsSchedule1.Monday Schedule.Rows(index).Delete() OleDbDataAdapter2.Update(DsSchedule1, "Monday Schedule") dgMonday.DataBind() now everytime i run this say in a datagrid with three items everytime time i refresh after deleting say teh top item all subsequent items get deleted. How do i stop this?
    Issue binding a DateTimePicker to a DataView (6 replies)
    microsoft.public.dotnet.framework.adonet
    Hi, when I'm trying to bind a DateTimePicker to a DataView I receive a System.Exception when the form loads. I don't get an error when binding it to a DataSet.Table that is representing exactly the same data. The error message is in German saying: "DataBinding konnte keine Zeile in der Liste finden, die für alle Bindungen verwendet werden kann." I'll try to translate that: "DataBinding wasn't able...
    newbie question (7 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi all, I've been working a little with data binding in ASP.NET, but know I have to make a console application using C#. The way of filling a DataGrid seems a bit different. I can't see a DataBind() method for the DataGrid object. What I have is the following code: / * start code snippet */ string connectionString "..."; OleDbConnection dbConnection new OleDbConnection(connectionString); OleDbComm...
    Clearing a Date filed in an Access DB ? (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, I am using Webmatrix, and I have a Date field in an Access database that I would like to let the user clear. However, when the filed is cleared on a web form, and the values are submitted, there is an error to the effect of: System.InvalidCastException: Cast from string "" to type 'Date' is not valid Any ideas? Thanks, David
    Opinions on fastest data lookup methods? (5 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Am working on a system that processes lots of records. Each record requires maybe a dozen lookups into different SQL Server tables, some containing 100,000 records. Since there are a lot of records to process, I need these lookups to be as quick as possible. Which option do you think would be the fastest? 1. Constantly query for the data out of SQL Server? 2. Download the tables into local DataSet...
    Escaping a single quote in DataTable select expresssion (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I am adding data to a DateTable in a DataSet and need to verify if a row already exists with a specific column value: string aName "O'Connor"; string filter "Name '" aName "'"; DataRow [] drs MyDataset.MyTable.Select(filter); if( drs.Length 0 ) { // Add a row for this name } Note the name (O'Connor) contains a single quote. How should I escape the aName value so the filter works? Disclaimers: 1. T...
    Parameters wont work on SQL Server sproc (4 replies)
    microsoft.public.dotnet.framework.adonet
    Help! Ive been searching google, msdn, trying every which way i can and cannot get this to work. I am new to SQL Svr, coming from an Oracle background. I have a stored proc which given an input param of state returns the count of records in that state. I know the proc works, because if i run it from Query Analyzer, i get the proper results, so somehow, im doing something wrong in my ADO.NET code. ...
    Extended Properties Not Showing Up (5 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I have created a table in MSSQL2K and added an Extended Property to it. I want the Extended Property to show up in the result DataSet. What should I change to make this happen? TSQL: Create Table dbo.ZTestTable ( "ZTestTable Id" int not null, "Col 1" varchar(184) null, "Col 2" varchar(238) null ) Go Exec sp addextendedproperty 'TableType', 'A test table.', 'user', dbo, 'table', [ZTestTable] Go Exe...
    DataSet Tables into Access tables with Oledb? (7 replies)
    microsoft.public.dotnet.framework.adonet
    I've got several datatables in a dataset that I've filled programattically. The structure of the datatables match the structure of tables in an access database. What is an easy, programmatic way to insert all those datatable records into the tables in Access without manually generating parameterized InsertCommands for an OleDBDataAdapter? I tried the following using an OleDbCommandBuilder to try a...
    output parameter values not displaying properly (4 replies)
    microsoft.public.dotnet.framework.adonet
    I have a SQL Server stored procedure that outputs 4 parameters and a recordset. They are outputting just fine in Query Analyzer, but come out as [@gcLatestNav] 1/1/0001 [@pubLatestNav] 0 [@gcPreviousNav] 1/1/0001 [@pubPreviousNav] 0 Here is my stored procedure Create Procedure fn3MainNav @gcLatestNav int 1 output, @pubLatestNav smalldatetime '5/5/2002' output, @gcPreviousNav int 1 output, @pubPrev...
    Connection Timeout (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, Can I define connection's timeout in SqlConnection's connection string ? Thanks, Alan
    Weird SqlDataReader: Invalid attempt to read when no data is present. (5 replies)
    microsoft.public.dotnet.framework.adonet
    I'm having a strange problem with the SqlDataReader and it is as follows. First of all I have a stored procedure called sr companies, it searches a table for entries matching the given criteria. When I execute the stored procedure using the Query Analyser (exec sr company @Type 40) I get a list of matching rows. I know my stored procedure is working ok. I used the SQL Profiler to see how the store...
    db grid (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi all, I have populated my grid from a dataSet. 1) I want to enter certain values and in Caps in my second col. Like I want to enter only 'PAT' or 'SAT'. is this possible. 2) When my Grid populatyes the fourth col is not fully visible. I will have to increase the width each time when it displays. Is it possible to set the width of the 4th col only. 3) In my fifth col I want to enter date in this ...
    Finding the Number of a New Row (3 replies)
    microsoft.public.dotnet.framework.adonet
    If I have a table ("tbl") in a dataset ("ds") with these three fields: pk autoincrement, seed 1, step 1 fld0 fld1 and I add a new row, how can I find its row number for the default view? Here's some sample code: dim dr as datarow dim lngIndex as long dr ds.tables("tbl").newrow dr("fld0") 100 dr("fld1") "Hello World" ds.tables("tbl").rows.add(dr) lngIndex getNumberOfTheRowIJustAdded What do I repla...
    Storing only timepart in Sql server datetime (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, How do I store only the time part in a sql server datetime field? I've tried using .... Params.Add("@MyField", SqlDbType.DateTime, DateTime.Parse("00:05:00")) .... but it stores this value "01 09 2004 00:05:00". I want to store "00:05:00". Any idea??? Thanks!!! M O J O
    Determining cost of a query (8 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    G'day, I've had a decent look around, and cant seem to find any way to get the cost of a query from anything in the System.Data namespace. I hope I am missing something obvious. What we want to do is have an optional step where we prepare a query and/or somehow obtain the cost (or estimated rows returned?) prior to execution and retrieval, and have an escape route if too high. TIA Radek
    Execute Query on Dataset (7 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hello, this is my first post in this newsgroup. Easy question: I have a Dataset which I populate by reading tables from Excel (i.e. I don't have an underlying Database). I would like to query this Dataset and get a new Datatable as result. I need my query to select only certain coloumns from certain datatables (i.e. I want my sql statement to include Inner Joins). I've looked at Dataview but it wo...
    Connection Problem (3 replies)
    microsoft.public.dotnet.framework.adonet
    I suspect I am missing the obvious here but I don't see it. I am trying to establish a connection to an SQL Server from an ASP.NET page I have defined the subroutines shown below, I have myConn defined at the top of the page as: Friend myConn As SqlClient.SqlConnection and then when I try to execute the following code I get an error that "Object reference not set to an instance of an object" Creat...
    Stupid beginner question... (13 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, With every click on Button1 i want to change (increase) number written on it, and i try to do it with this simple code: private void Button1 Click(object sender, System.EventArgs e) { string a u.ToString(); Button1.Text a; u u 1; } With first click i get initial value "0" written on Button1, but with next clicks nothing changes: "0" stays all the time... Why? Must I do some "refreshing" or wha...
    SP fails, but OleDbCommand does not throw error! (4 replies)
    microsoft.public.dotnet.framework.adonet
    BlankI have found a major problem with the OleDb portion of ADO.NET. If you are using it to call a stored procedure and the procedure has an internal error of some type, the sp will fail, but the OleDbCommand object will not throw any type of error. For example, I have a proc that does an insert and I pass in a value for one of the parameters that will cause a foreign key violation. The call the p...
    How to get ADO.NET DataTable off a SqlServer SProc? (5 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Help! Ive been searching google, msdn, trying every which way i can and cannot get this to work. I am new to SQL Svr, coming from an Oracle background. I have a stored proc which given an input param of state returns the records in that state. I know the proc works, because if i run it from Query Analyzer, i get the proper results, so somehow, im doing something wrong in my ADO.NET code. The only ...
    oledb version problem in connection string vb.net (5 replies)
    microsoft.public.dotnet.framework.adonet
    I have a program where i connect to an access database and get some information out of it. I'm using the oledb.3.51 version, my computer doesn't seem to have the 4.0 version, but the computer that is trying to run it only have the 4.0 version. So as you will see with the code below, i first try to open the 4.0 version... if that doesn't work, do the 3.51 version. When i run the program from my com...
    Deriving from DataTable and adding rows in a different thread. (3 replies)
    microsoft.public.dotnet.framework.adonet
    Hello, not even sure if this is the right forum for this question but here goes.. :) I'm writing a NET Data Provider for our DBMS and got everything working except one thing. Populating a DataGrid.. All other parts of the Data Provider framework are all interface based and therefore rather easy to implement/override as needed, but the DataTable isn't! So when my TTDataTable (derived from DataTable...
    Using a dataset's rowstate functionality in .net (4 replies)
    microsoft.public.dotnet.framework.adonet
    I tend to use the SqlDataAdapter class in WinForms projects because once the inital data is loaded any modifications can be easily added/updated through a call to the Update() method. I've found in aspnet that the same thing is possible but because of the stateless nature of the web in order to do this I have to go through the following steps: 1. First visit to page loads DataSet and binds DataLis...
    ASPX pages failing when SQL Server busy (7 replies)
    microsoft.public.dotnet.framework.adonet
    I have a single server running SQL Server 2000 sp3a, and acting as a ASP.NET webserver (.net 1.1 sp1). W2k sp4. Dual Xeon processor, 2 gigs RAM. Everything works fine, but sometimes when I execute a particular stored procedure (on server console using command line, nothing .net), my webapps will fail intermitently. Custom errors are turned on, so at this stage I can't give you error codes! But my ...
    Problem with binding Oracle-BLOB to SQL-Parameters (5 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, First of all, I am a newbie to .NET and Oracle. I would appreciate any help or hints which lead me in the right direction. I am building a Database converter. Basically what it should do, is take a table (schema and content) from MS SQL server and transfer it to an Oracle 10g Database. Creating a table in Oracle is not a problem. In MS SQL I have a column of type "TEXT" which I map to a "BLOB"...
    Updating Database (8 replies)
    microsoft.public.dotnet.framework.adonet
    I need help. I am trying to figure out the best way to uodate a database with information. I am gathering my information from text fields on a form and I just want to insert them into the database that I have. I tried builing the SQL string and then adding it to a command object and then executing a non query but .NET does not seem to like this approach. I have been reviewing the various VB .NET m...
    Query Problems (3 replies)
    microsoft.public.dotnet.framework.adonet
    Hi, I'm trying to port the IGo Portal on the gotdotnet site from vb.net to c#. I'm having problems with the following: public DataSet GetAnnouncements(int moduleId) { // Create Instance of Connection and Command Object SqlConnection myConnection new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]); SqlDataAdapter myCommand new SqlDataAdapter("SELECT ItemID, CreatedByUser, Creat...
    dataset to database not updating (3 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    http://support.microsoft.com/default.aspx?scid kb;EN US;815660 on this online tutorial i have thi line that i do not understand... To update the original database with all of these changes, pass the DataSet into the Update method of the DataAdapter object. However, before you can call Update, you must set the InsertCommand, UpdateCommand, and DeleteCommand properties of the DataAdapter object. You...
    OleDbReader, can I short circuit for performance? (6 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    Hi, I am experimenting with the OleDbReader. Here is snippet of my code. I want to close the reader after reading 1 row in code. (the "reading 1 row" is a mere example. In actual application, the sampling generator determines which rows (the selected samples) and how many (sample size) to accept for processing.) OleDbReader reader cmd.ExecuteReader(Command.Behavior.CloseConnection); int done 0; st...
    ADO.Net and Left outer join (3 replies)
    microsoft.public.dotnet.framework.adonet
    Hi, I created a stored proc in SQL Server 2000 that returns the result of a left outer join. For example: CREATE PROCEDURE MyProc ... AS BEGIN SELECT ... FROM TableA AS A LEFT OUTER JOIN TableB AS B ON A.KeyA B.KeyB WHERE ... END When I call the stored procedure in the query analyser, I get the correct result. When I use an ADO.Net in my C# application, I only get the rows for which no match was f...
    file path issues in reading an xml file using XMLDataDocument (5 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I would like another pair of eyes to look at this. Any comments really appreciated. Here is my code snippet.... Label Header new Label(); Header.ForeColor System.Drawing.Color.RoyalBlue; Header.Font.Size 14; Header.Font.Italic false; Header.Text "Test Table "; Header.RenderControl(output); Table ATable new Table(); XmlDataDocument XMLD new XmlDataDocument (); try { XMLD.DataSet.ReadXml(Location); ...
    DB2 managed provider problems during a FILL (3 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    I'm having a problem trying to fill a dataset with the managed DB2 provider. My Fill command executes with no exception, but when I try to query the number of rows returned back in the dataset inside the immediate window during debugging, I get the following: ?ds.Tables(0).Rows.Count 'ds.Tables' is not declared or the module containing it is not loaded in the debugging session. Before my Fill stat...
    Dataset Thread Safety (4 replies, VIP)
    microsoft.public.dotnet.framework.adonet
    $ Thread Safety $ This type is safe for multithreaded read operations. You must synchronize any write operations. I am trying to figure out exactly what this statement means. So if I have multiple threads accessing an ADO.Net dataset and only one of those threads ever writes to the database but multiple threads are reading from it. Do I have to write code to synchronize access to the ADO.Net datas...
    Visit the archive for messages from this site.
  • October 2001 (146 items)
  • November 2001 (118 items)
  • December 2001 (163 items)
  • January 2002 (235 items)
  • February 2002 (371 items)
  • March 2002 (314 items)
  • April 2002 (391 items)
  • May 2002 (362 items)
  • June 2002 (327 items)
  • July 2002 (252 items)
  • August 2002 (145 items)
  • October 2002 (157 items)
  • January 2003 (69 items)
  • February 2003 (87 items)
  • March 2003 (39 items)
  • July 2003 (147 items)
  • January 2004 (1093 items)
  • February 2004 (569 items)
  • March 2004 (350 items)
  • April 2004 (836 items)
  • May 2004 (404 items)
  • June 2004 (442 items)
  • July 2004 (342 items)
  • August 2004 (804 items)
  • September 2004 (259 items)
    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