998 byte By
Pat Tum at 2007-11-25 6:04:21
Hello Gentleman, I am trying to use a checkbox column in the DataGridView to identify a column so that I can extract a line of information from it to use in an SQL parameter. However, I can not find a simply way to identify when the column is in a checked state. The code below is producing the err...
Hi, I was wondering if the original .net 1.1 datagrid for winforms works with sql server express 2005? I don't really like the .net 2.0 datagridview for winforms as it seems to repaint very slowly. Also, is sql server 2005 much more secure than msde? I was wondering if it is worth it to upgrade...
704 byte By
mns01 at 2007-11-25 6:07:00
i have 1 labels, 1 text box and one check boxsuppose label contains name,in textbox user have to enter its age and checkbox is checkd if he is married.i have given conneection string using oledb in access sheetand its storing the values of label, textbox and checkbox succesfullybut nw i have problem...
Hi all, I am new to .NET and seem to be struggling with what should be simple tasks. Either that or MS have made simple tasks hard to do.What I want to do is have Save and Cancel buttons on my forms so that when the user starts editing a record they are shown that the data has been edited and they c...
388 byte By
Guy007 at 2007-11-25 6:15:14
I have a DataTable that is passed to me from an external application.I would like to save this DataTable to my database (MS SQL server) using .net (c#).How can a NEW table be automatically created from a dataset? I imagine SQLDataAdapter and SQLCommand may need to be used, but i still haven't...
2886 byte By
Ebaad at 2007-11-25 6:19:26
Hi,Just wanted to ask for some help regarding the following piece of code, I'm trying to read from the excel file and update the data into and access database. Reading from excel file works fine and I can display it on the web in HTML but when I try to update the recordset in the access databas...
How can we fill a dataset without using dataadapter. <br/>This is a question asked to me in an interview.
571 byte By
mns01 at 2007-11-25 6:20:44
i am usind dataadapter and dataset objects to bind some data from the database in the textbox control. the code i m using is as follows:<<<textbox1.databindigs.add("text",dataset.tables(0),"Name")>>>This code is able to retrieve the field 'Name' from the database and puts...
Hello All, I have empty fields in my database after calling a dataset update to upload new rows to my database. The ID is autogenerated and I can see the IDs for these rows but the other fields in the row are blank. Any ideas would be much appreciated. ThanksHere's the code: [WebMethod]...
Hi, My problem is in one page i have a field name called "TYPE".In this user enters the data dynamically.So the information is stored on "xx" table.In another page "AvailableTYPEs" field is there.So what ever data entered in the "TYPE" field by the user in the previous form that should c...
Is there any possibility to insert a column (say SL NO.) in an SQL database, which adjusts itself, even if one row in between is deleted.<br/>For example if the row containing 2 in column SL NO. is deleted, then the cell with 3 will become 2, 4 changes to 3 and so on.
This forum has been moved to the .NET section of dev-archive.<br/>Brad!
hi, I tried to update record using data table and dataadapter but I get error for line (in edit case) daadapter1.update(dtTable1) the error is Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.can any one help...
Hi everyone,I am dealing now with 4 tables in a database that need to be related in a dataset. I saw plenty of sample code about how to relate just two tables in a parent/child relationship. the 4 tables I am dealing with are related this way: table 1 is related to table 2 in a parent/child relatio...
Hi i am using vb.net with sqlserver2000 I have 10 checkboxes.All these have default value 'No' in the database.If the user selects the particular checkboxes dynamically then appropriate checkbox status changed to 'Yes' in the database .How should i update my...
559 byte By
martho at 2007-11-25 6:42:36
Hello!I have a simple form with one DataGridView and one TextBox which both are bound to a datasource. This works fine so far, but I got one problem: When I open the form, the 1st row of the DataGridView is selected. Now I just jump to row 2 WITHOUT doing anything, and now DataTable::GetChanges is t...
263 byte By
martho at 2007-11-25 6:42:38
Hello! When using a DataTable you cna use RejectChanges or Reset to restore the old value. Is there a way to get the old/original value WITHOUT overwriting the new one? Or do I have to make a copy of the DataTable in the beginning to get access to the old values?
772 byte By
yshie at 2007-11-25 6:44:32
i want to update my second combo box based on the choice on the firstcombobox. what is the simplest way to do this? i had my first combobox works. ok.. so far, this is my code for the 1st comboboxusing (SqlConnection conn = new SqlConnection(Properties.Settings.Default.dbConnectionString)){SqlDataAd...
625 byte By
NV2002 at 2007-11-25 6:44:50
Hi All, I have created a simple Database App. I created a DBF and a "DataTable"in the designer. I have also created a "DataView" in the designeras well. I am using VB.net Express and SQL 2005 Express.It automatically created the table adapter and binding source.I can view the entire table in a datag...
1092 byte By
yshie at 2007-11-25 6:45:40
i have this code... using (SqlConnection conn = new SqlConnection(Properties.Settings.Default.PEdbConnectionString)) { SqlDataAdapter daCat = new SqlDataAdapter("SELECT [CategoryName] FROM Categories",conn); DataSet ds = new DataSet();...
271 byte By
NV2002 at 2007-11-25 6:46:22
Hi All, <br/>I figured out how to use a View. How do I update the current DataGrid<br/>to follow the New Schema when I change to the new view and<br/>also allow updates to be recorded in the database. Attached is the<br/>Form code for the simple app.<br/>NV2002
663 byte By
Pat Tum at 2007-11-25 6:47:26
Using .Net 2.0 and MSSQL, I made a join to combine 3 tables in a DataAdapter. After calling da.fill(ds), I get an error (ERROR: Cannot Find Table 0). I left the table name off the "fill" due to the fact that there are multiple tables. The code is below. I used an almost identical code once before...
937 byte By
hitai at 2007-11-25 6:50:20
I hav this simply XML document<?xml version="1.0" standalone="yes"?><DSLogInfo xmlns=" http://tempuri.org/DSLogInfo.xsd"> <LogDataTable> <Source>C100.LG1</Source> <PointName>C1.0.AI00.SP</PointName> <Label>hahaha</Label> </LogDataTab...
272 byte By
yshie at 2007-11-25 6:51:00
what appropriate windows control will i use if i want the user to select for example the number of pages they want to print. just like the one seen in an ordinary print dialog box. i don't know what it is called. is it listbox? and how will i store numbers in it? tnx
384 byte By
yshie at 2007-11-25 6:54:01
i have to insert multiple records using stored procedure in a table. these are the values from my listview.. i got its items.count but i don't know how will i loop through the items. i have read about using cursor, while loop, CSV... which is better among this? i think while loop will be the si...
hi i am having more than 50k records in my table.I am having 100 values in an Excel sheet.I wants to update a column in my database table,with the values in excel.Eg:StudName --> column in SQL TableName--> Column in excel sheet.How to do this?Thanks,Karthik...
hi folks ,I have created a report using sql server 2005 RS.Ive deployed it in the server(localhost).In the subscription section of the report manager ive mentioned a emailid to whom ive to send that particular report.Ive selected the report server email delivery method from the dropdown list in the...
600 byte By
Pat Tum at 2007-11-25 7:00:29
I am trying to get a splash page to be selectable after the first visit. I have successfully created a flag in the database that indicates the user preference after the first visit, but I cannot understand how to get the entry point of the application (Main) to retrieve the data from the database b...
635 byte By
martho at 2007-11-25 7:03:23
Hello!I use a BindingSource to navigate through a DataTable with a BindingNavigator, DataGridView and several TextBoxes.I'm fetching only parts of the table from the database ("SELECT ... LIMIT x,50"), because it's a large table.Now I want to use the same TextBoxes to input a search. Lets...
404 byte By
martho at 2007-11-25 7:03:28
Hello,I got another question: When doing a query, you do something like:SqlDataAdapter adapter = new SqlDataAdapter("SELECT customers.* FROM customers WHERE...", connection);Now I have another query which should replace the first query, but runs on exactly the same table-scheme. Should I create a ne...
772 byte By
cjard at 2007-11-25 7:06:54
I'll keep this brief:.NET 1.1 (2003) and .NET 2.0 (2005) ARE VERY DIFFERENT WHEN IT COMES TO ADO.NETPlease say what version of .net you are usingAlso say what database youre using This avoids wasting the experts time giving an answer that doesnt apply to you, or drilling you for vital informati...
535 byte By
Traps at 2007-11-25 7:16:29
How do I add data that is in memory to a dataset so that I can execute sql queries on it in order to return something that I can manage in a while or foreach loop? Basically I have a file with data, that I'd like to be able to execute sql on to sort it. Something along these lines while(not EOF...
Okay i have set an oledbConnection, my adapters and datasets. Added a datagrid to my form and in the forms load event set up the connection and filled the datagrid.OleDbConnection1.ConnectionString = "Provider=Microsoft.jet.OLEDB.4.0;Data Source=dataBase.mdb"DataAdapter1.Fill(DataSet11)Now how would...
running into problems here. I have a VC++2005 app that interacts with MSAccess via ADO - w/o problems. the code is on a laptop running XP Home i think.when i move the code to a desktop with XP Professional the app will not compile. the compiler keeps complaining that a number of enums in themsado...
1249 byte By
AlexAus at 2007-11-25 7:31:37
I have a DataTable in my program. I use DataTable.Copy() to create a temporary table when I modify it in a dialog window.After finishing I call Merge() to update the orignal DataTable.After I added a new row to the original table it has rowstate as Added. Then I open the dialog again and delete this...
461 byte By
sarama at 2007-11-25 7:36:52
Hi All_I need to export data from a table to a Ascii format file called file1.251.The file name has a "." and no ".txt" When I use the DoCmd.TransferText acExportFixed, "Wy Export Specification", "tblFile", "C:\Current\file1.251"I got err message saying "Cannot update. Object or Database is read-o...
784 byte By
dwessell at 2007-11-25 7:39:55
Hi,I'm building some Excel spreadsheets, using VBA. I'm connecting to a Firebird DB, via a ADO connection.The spreadsheet will reside in a shared folder on a server, and will be accessed by clients remotely (Meaning not directly from the server).When a client opens the spreadsheet, I need...
Hi,I am doing a MCAD course and have a question about a task i have to do...They are asking me to:Create a shared public function that implements a connection to the MS-Access "Nwind.mdb" database and returns a DataReader Object.No i really don't have a clue where to start, i can make a connect...
Hi,<br/>I am displaying the data returned from stored procedure in my .aspx page using datagrid. How can I convert the displayed data into FoxPro 2.6 format using C#.<br/>Thanks in Advance.
452 byte By
martho at 2007-11-25 7:46:17
Hello. I have a DataTable and a function in which I want to put one DataRow and put the rsult back into the DataTable, something like:DataRow dr = dataTable.Rows[nRow];MyFunction(ref dr); // Could possibly change the RowdataTable.Rows[nRow] = dr; But I get: // Error: Property or indexer 'System...
591 byte By
martho at 2007-11-25 7:46:21
Hello. I want to add some new function to System.Data.DataRow. So I made a (yet empty) class which inherits DataRow: public class MyDataRow : System.Data.DataRow { public MyDataRow (DataRowBuilder builder) :base(builder) { } }Now I try to get a MyDataRow:DataRow dr = dataTable.Rows[nRow]; //...
I am having issues with creating columns in a database. I specify the data type of the column using theADOX.DataTypeEnum, but when i open my database using MS access, the column's data type is always text.In my code the "ID" column should be an integer data type and the "Date" column should be...
I can't get SqlDependency to work against an Express instance. Is it supported? I'm using the MSDN sample and it works fine against the AdventureWorks database running on a SQL 2005 Enterprise edition server. But when I change the connection string to point to the AdventureWorks database...
491 byte By
d00_ape at 2007-11-25 7:59:29
I have db filled with xml data, looks something like this:Table Cars{ Car, XML.}<car desc=blue car with two doors> <owner>Sebastian Bach</owner></car>I have made an full-text index of the xml-column and can now use the CONTAINS-keyword to search the xml-data.Select car F...
Hi,I want to do a bulk insert from an excel file to SQL 2005 database using ADO.NET. The insert code should check for duplicates and put the duplicate data in a temp table to show to the user. What is the most efficient way to do this? I feel SqlBulkCopy is the fastest, but it requires that the sour...
425 byte By
martho at 2007-11-25 8:05:30
Hello!I insert some new rows into a DataTable and then insert the rows into the database viachanges = dataTable.GetChanges();if (changes != null){ int nRowsUpdated = dataAdapter.Update(changes);}This works fine. But now I need to know to values of the "auto_incremet primary key" the database...
Hey guys need some help here.Thiis the situation.My application written in delphi 5 calls a MsSql store procedureusing the ADODB_TLB interface to Ado Commandthe DB store procedure has an exception in it and throwsit. I should catch this exception using the try except statementthat wraps the call to...
how would i add a value typed in a combobox to a database. My database is only one table of names.So basically how to add the valuetyped in combox1.text.This does not work. By the way my table only has one colum name. When i do this it inserts a blank value in my table.NB IName is the column name in...
911 byte By
cmac at 2007-11-25 8:12:18
A newbie!I copied a script off the web to connect to an access dB but not sure how to run it, by double clicking in win2000 or running from command line it opens it as a text fileThanksOn Error Resume NextConst adOpenStatic = 3Const adLockOptimistic = 3Set objConnection = CreateObject("ADODB.Connect...
371 byte By
lskuff at 2007-11-25 8:28:13
I have deployed an C# .NET2.0 application as a frontend for an Access Database. To fix a bug I need to modify 1 relationship in the Access Database to Enable Cascading Deletes. I am developing a patch to fix this bug a few others. Is there a way to programmatically change this relationship property...