| DataAdapter UpdateCommand (4 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| Please help. Simple question. I want to update a row in an SQL table. (using VS2003) There are 2 keys: tts tkey and tts tskey and 3 fields to modify: tts activeflag tts lastmoddate tts lastmodifiedby SqlUpdateCommandTS.CommandText "UPDATE TechnicianSchedule " & "SET tts activeflag @tts activeflag, " & "tts lastmoddate @tts lastmoddate, " & "tts lastmodifiedby @tts lastmodifiedby " & "WHERE (tts tk... |
|
| Inserting Records into SQL Server Tables (2 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I am currently writting an application in VB .Net and SQL Server. I am trying to insert new records into two SQL Server tables and would like to know whether it is best to insert the records using a stored procedure or through a dataset. Currently I have a form that consists of two parts. One part of the form collects basic customer information (name, address, etc.) the second part of the form all... |
|
| Error In Update Procedure (3 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I am able to get this section of code to properly open an Access database and fill the dataset from a table within it. Then after editing certain values in the dataset attempt to update I get an unhandled exception. After trapping the code in a try it returns "Syntax Error in UPDATE Statement" however I have tried all documents and syntax appears correct. I've verified that I am not using any rese... |
|
| .Net slow, SQL tools FAST? (15 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I am running an sproc that runs in 2 3 sec using query analyzer, but takes just under 5 min using .net data providers (I've used SqlClient, OleDb, and Data block v2) t sql statement executed from QA: RptInvRoyalty 126, '2/1/2004', '2/29/2004' ..net code: System.Data.SqlClient.SqlCommand cmd; cmd new System.Data.SqlClient.SqlCommand("RptInvRoyalty 126, '2/1/2004', '2/29/2004'"); cmd.Connection new ... |
|
| Using ADO.NET to prcoess T-SQL batches (5 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| In our development process we have to create T SQL Scripts to be run against the "Live" databases (there are at least a dozen) so that any changes can be verified and/or tracked. Reading the text from the file is straight forward enough. Using SqlConnection/SqlCommand to actually execute the code is also easy. My problem is that a lot of these scripts use PRINT statements to indicate which logic h... |
|
| SQL connection opening two connections (6 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I have a question about Sql. When I run a simple open statement for a SQL database, it opens up two connections sometimes, and other times it opens up one connection. Does anyone know why this happens. Below is my source code where this is occuring. You will have to change the connection string, especially the Database and ServerName. Any help will be appreciated. When you run the code, when the m... |
|
| Automatic generation of SQL commands using a data adapter (8 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| Hi All, is there a limit to the size of an update or delete command that a data adapter will automatically create. I have just added another varchar field to my table and when I attempt to now add the modified data adapter to my form the wizard informs me that it can not generate the code for the update and delete commands. If I remove the newly added field and attempt to add the new data adapter ... |
|
| Filter Duplicate Data (2 replies) |
| microsoft.public.dotnet.framework.adonet |
| How do I remove duplicate DataRow from a DataTable? I tried the DataTable.Select but the parameter not accept the "Distinct" keyword. Please advice. Thanks |
|
| Difficult (15 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I thought .NET would make use Life easier. But i find it verry difficult to learn it. Hope i am not te only one? Regards, Jake |
|
| Dataset question... (4 replies) |
| microsoft.public.dotnet.framework.adonet |
| Is there a simple way to fill a dataset with a proper subset of a database? I can run a query on a database to get related data, but the result is a single table with all columns mashed together. I want to have a dataset with the related data, each in its original tables, with relation objects and constraints intact. The only way I know how to do it is to manually re create the database objects I ... |
|
| Oracle Boolean Values (2 replies) |
| microsoft.public.dotnet.framework.adonet |
| Hi, Using microsoft Oracle client. How do you get booleans to/from the database tables? Can write as an Oracle number OK But can't cast an Oracle number as a boolean when reading back. Thanks Bob |
|
| Master/Child ComboBoxes question (3 replies) |
| microsoft.public.dotnet.framework.adonet |
| Hi! Earlier (28.4.2004) in this NG is subject "tieing combo boxes to getchildren of a row" were message from Brian Henry. I need this kind on thing also, but I don't understand what is "FindByCustomerID" in the following C# sample below? This sample code is copied of that earlier message queue. I'm using VB.NET 2003, maybe this same sample code as VB code would help me better to figure it out. I a... |
|
| Timestamp Value - please help (5 replies) |
| microsoft.public.dotnet.framework.adonet |
| I am using a class to store values from a query, but I have found no documentation to show how to capture the actual value of a timestamp from a SQL Server 2000 database table using VB.Net. I need to use the timestamp in the Where clause of an update statement, but the value returned is "System.Byte[]", not the actual value. Here is some of my code: 'Assume I've pulled these fields from table (TS ... |
|
| Connect to AS/400 from .NET (8 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| Hello! I'm trying to write a VB.NET program that connects to a AS/400 Server. I've tried almost everything, but it will not connect. I've tried to set up a DSN using the Client Access ODBC driver (v8.00.04.08) but with no result. I've also tried a DSN less connection. From VB.NET i'm using oleDbConnection to create the connection. If I don't supply a provider in the connection string, the program ... |
|
| how to do parent-child with two comboboxes? (6 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| Hi! I have two combo boxes on windows form, and when one (parent) changes I want the other (child) to update its available items. How should I do binding for the child combo box? I also attached my test sample with Access db containing two tables to show what I'm trying to do. In that test application when I select department of the department combobox, then team combobox should update items to te... |
|
| ADO.NET Secret of eternal youth (12 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I have a web service which is syncronizing two Access (mdb) databases. The web service accepts a dataset. Adds the data to a table on the server and then returns the dataset with the server's id fields to the client, and the client is updated. Pseudo code as follows: Webservice Public function updateserver(inDS as dataset) as outDS as dataset ' all rows in inDS are in datarowstate.Added myDataAdap... |
|
| Bulk inserting into database using ADO.NET... deadly slow? (16 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I have this SQL Server 2000 database, which I want to populate with data generated from a program; the schema is quite simple (one table, seven columns, each one one byte wide), but there are plenty of data: about 450 million rows, for an estimated total of ~3 GB. So, I wrote my data generating .NET application, and then tried to put data into a DataSet and then storing it into the DB using a SqlD... |
|
| Using datatables to insert records (3 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I would like to use a stored procedure to insert records into a table in SQL Server using a datatable as the source, but I am not sure of the commands needed to do this. I have manually created two datatables with the same structure as two SQL Server tables, using VB .Net code, and have added them to a new dataset. I have set the constraints and relationships between the tables. One table is a cus... |
|
| ADO.NET Not Returning Error (10 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| If you run the following query: select 'CategoryID ' c.CategoryID from northwind.dbo.Categories c In Query Analyzer against the Northwind database, QA returns an error saying it cannot convert 'CategoryID ' to an int. However, if you execute this statement using ADO.NET, no error is returned, no infomessage event is fired, you essentially get nothing back even though there was an error. Is there a... |
|
| Subquery Problem in Query Builder (5 replies) |
| microsoft.public.dotnet.framework.adonet |
| In Visual Studio 2003 I'm not able to generate a dataset or tablemappings for an Oracle DataAdapter as long as the SQL in the DataAdapter contains subqueries (I'm using the Microsoft OLE DB Provider for Oracle and have an Oracle 8 database). The query works just fine, though, and returns correct data. Here's the query ... SELECT Equipment.*, (SELECT Equip IDs.ID NUMBER FROM Equip IDs WHERE Equip I... |
|
| Array of datarows (7 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| If I have an array of data rows, how do i bind a listbox to that array of rows and show whats in a column? right now if i bind to the array it just shows "System.Data.DataRow" as the name, but if i bind to a table with the same rows it works. |
|
| What is the best way (6 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| I've found three different ways to read an (notice proper use if an) .NET config file and display just a selected section in a DataGrid. What is the recommended way? |
|
| How to retrive 'n' records in one result pane out of many (2 replies, VIP) |
| microsoft.public.dotnet.framework.adonet |
| (Type your message here) From: mansi pasrija wanna retrive first 10 records of a data Adapter in one result pane then next 10 records in next an so on. Posted by a user from .Net Guru (http://www.dot-net-guru.com/) Id RbNkqnc6t022x8KOd8nVqw /Id |
|
| Choosing generator when creating strong typed datasets? (2 replies) |
| microsoft.public.dotnet.framework.adonet |
| Hi there! I m have read in so many places that you should be able to choose which generator to be used when creating typed datasets. The problem is that I have not been able to find where this is! I assume that I am currently using the MSDatasetCodeGenerator (I suppose it is default?), but I wan't to use xsd.se instead. I have found where the file xsd.exe is, but not where to choose it in VS.Net. ... |
|
| Update DataSet or DataTable (4 replies) |
| microsoft.public.dotnet.framework.adonet |
| Hi, Can I update a DataSet or a DataTable using something like object.Update() ??? I was looking for something and I find out this functions, but I don't know for real what they do. AcceptChanges() BeginEdit() EndEdit() I try to use them like this, to change the value of a field in first row: ds.Tables("P").Rows(0).AcceptChanges() ds.Tables("P").Rows(0).BeginEdit() ds.Tables("P").Rows(0).Item("Num... |
|