DataGridView Checkbox Issue

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...

Datagrid works with sql 2005?

442 byte By coder20000 at 2007-11-25 6:04:47
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...

storing many no. of labels n textboxes at one time

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...

Trapping Data Change Events

1565 byte By stevedevuk at 2007-11-25 6:10:29
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...

Create NEW database table from a DataTable

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...

Read Excel file into an Access database with ASP

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...

Filling a dataset without dataadapter

105 byte By Ishasofia at 2007-11-25 6:19:28
How can we fill a dataset without using dataadapter. <br/>This is a question asked to me in an interview.

dataset.acceptchange method

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...

Blank fields in database after dataset.update

2517 byte By chowyunli at 2007-11-25 6:20:57
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]...

About Accessing of data

561 byte By chandra_yvr at 2007-11-25 6:25:56
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...

Autoadjusting columns in SQL

273 byte By Ishasofia at 2007-11-25 6:26:00
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.

ADO.NET forum moved

76 byte By Brad Jones at 2007-11-25 6:28:36
This forum has been moved to the .NET section of dev-archive.<br/>Brad!

[RESOLVED] data adapter update error

405 byte By Mustaf kazi at 2007-11-25 6:32:00
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...

data relation in .NET with 4 tables

560 byte By mpoincare at 2007-11-25 6:33:26
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...

About Updation

328 byte By chandra_yvr at 2007-11-25 6:33:54
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...

A row is marked "changed", but it isnt?!

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...

Get old value in DataTable

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?

populate 2nd combobox based on the 1st combobox choice

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...

Very Green

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...

Cannot bind to the new value member.

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();...

Schema

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

Populate a DataGridView from Multiple Tables

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...

Reading xml document with xmlns using a strongly typed dataset

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...

what appropriate windows control to use

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

insert multiple records

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...

how to make bulk updates?

323 byte By vgvkarthik at 2007-11-25 6:55:34
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...

sql server 2005 reporting services

1131 byte By blitzkrieg78us at 2007-11-25 6:57:07
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...

Selective Splash Page Code

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...

Using DataTabe to find a record in a database

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...

Create a new DataAdapter for every query?

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...

READ THIS, GARGOYLES.. Even if you have been posting on the internet for 57 year

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...

[RESOLVED] [NOOB] Simple ado.net question

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...

Update database records

410 byte By static_blue at 2007-11-25 7:21:11
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...

ADO un XP professional and VC++2005

484 byte By jim enright at 2007-11-25 7:26:30
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...

Question about DataTable.Merge().

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...

Access/VBA Data Export

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...

Usage of remote driver

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...

DataReader Object

634 byte By ThijsBoeree at 2007-11-25 7:43:06
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...

Converting into FoxPro 2.6 Format

199 byte By curiousneo at 2007-11-25 7:44:44
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.

Setting a whole DataRow

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...

Unable to inherit from DataRow

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]; //...

Issues with creating columns of a DataType in MS access database using ADOX and

1737 byte By coolabhinav82 at 2007-11-25 7:52:10
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...

SqlDependency not working with SQL 2005 Express

584 byte By Jim Bassett at 2007-11-25 7:56:55
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...

full-text index search on attribute

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...

Bulk insert

504 byte By maheshpmallia at 2007-11-25 8:03:22
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...

Getting IDs for newinserted rows

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...

Need Help with ADO on delphi 5

714 byte By Matzan481 at 2007-11-25 8:05:40
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...

add a combobox.text value to a database

961 byte By static_blue at 2007-11-25 8:06:14
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...

My first script

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...

Updating Database Relationships Programmatically

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...