2,634 Topics
![]() | |
I make datagridview export to excel, but Headcolumn don't show in excel files. **Sample** result (in Excel) 1 | mani | 213/435 | 0-892-342234-09 2 | ware | 1/67 | 053-36-49 **But i need resuult (in Excel)** ID | Name | Address | Tel. >>> Headcolumn 1 | mani | … | |
Hi, i'm a newbie and get stuck with this problem for a few days. I have datatable with two column, line and duration. I want to sum the duration based on the line group. For example: LINE DURATION A1 00:05:20 A1 00:07:00 A1 00:02:10 A1 00:01:50 A2 00:02:01 A2 00:03:45 … | |
Hello, i have encountered with a problem in one of methods comparing string from database to the string named pword that i initialized from textbox. Can anyone know the easiest for begginer to fix it? I would be very very greatful. SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=D:\\Studijos\\c#\\KursinisDarbas\\BazineAplikacija\\BazineAplikacija\\DuomenuBaze.mdf;Integrated … | |
Hi can anyone see what the problem is below I am new to c# so not sure why this code does not excute? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Eight_Stage { public partial class Form1 : Form … | |
hi to all I have list of names in list view with corresponding unique employee id. The user could select more rows. In each employee id I will find it in database in retrieve all the details information and print it using crystal report. What I want is in each … | |
Hi, need help on finding why code won't run. Keep getting code error: No overload for 'DisplayXML' matches delegate 'System.Web.UI.WebControls.SqlDataSourceSelectingEventHandler' Would appreciate any help...... System pointing to the following code saying its the cause, but don't know how to fix it: <asp:SqlDataSource id="srcProducts" SelectCommand="SELECT * FROM PRODUCT" ConnectionString="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|MyDatabase.mdf;Integrated Security=True;User … | |
I am making a page which allows the user to edit a specific row based on the querystring value. What is the best way to load data into the textboxes and to reflect the changes back to the database. **Example:** Request -> example.com/editpage.aspx?id=123 The page should display data from row … | |
Hi need help i setting up both Adding and Updating datagrid cells in the Save_Click event. Right i used seperate click events for Add_Click and Updating_Click but i want to both of them in the Save_Click event rather than seperately. Thanks in advance Here is my code using System; using … | |
Hi Guys, I have a form with a DGV and some text boxes.. I am trying to get the program to update the rows shown on the DGV by using the values in the text boxes. Below is my code so far: private void btnOrderEdit_Click(object sender, EventArgs e) { System.Data.OleDb.OleDbCommandBuilder … | |
Hi, i am having problem in updating my database although i can upadate my dataset private void btnSave_Click(object sender, EventArgs e) { DataRow dRow = ds1.Tables["ContainerID"].NewRow(); dRow[1] = textBox1.Text; dRow[2] = textBox2.Text; dRow[3] = textBox3.Text; ds1.Tables["ContainerID"].Rows.Add(dRow); MaxRows = MaxRows + 1; inc = MaxRows - 1; MessageBox.Show("Entry Added"); } but … | |
Hi Guys, **<-- Newbie Here!** I seem to have an issue with an INSERT INTO statement when trying to add some textbox data into a DataSet and then update the backend table called 'cashOrders' in a Access Databse. The Following code is being run from the 'Save Button' private void … | |
Pls let me know how to add a record in a database using a dataset. vidhya[COLOR="green"][/COLOR] | |
Hi Guys... I seem to be having an issue when trying to create a new row in a Dataset. Below is the following Connection Details to the Access DB. private void radioButton3_CheckedChanged(object sender, EventArgs e) { cashCustom.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Orders.mdb"; cashCustomerDS = new DataSet(); cashcTable = new DataTable(); cashCustomerDS.Tables.Add(cashcTable); cashCustom.Open(); … | |
Hi guys, I hope someone can help. I have a list view being populated by a Table (cashCustomers) in an Access DB which has customers Information. * CashAccRef * CashName * CashAddress1 * CashAddress2 * CashTown * CashAddress3 * CashAddress4 * CashAddress5 and the following Orders table (cashOrders) * ID … | |
private void button4_Click(object sender, EventArgs e) { { SqlConnection conn = new SqlConnection("Data Source=user-PC;Initial Catalog=URBAN-AUTO-CLINIC;Integrated Security=True;User Instance=False"); SqlDataAdapter adaptor = new SqlDataAdapter(); DataTable table = new DataTable(); DataSet ds = new DataSet(); adaptor.SelectCommand = new SqlCommand("SELECT FirstName,LastName FROM ClientNCar WHERE FirstName ='" +txtFName.Text +"'AND LastName='"+txtLName.Text+"'",conn); adaptor.Fill(ds); ClientSearchDisplay.DataSource = ds.Tables[0]; } … | |
numbers = [] line = int(raw_input('Enter number: ')) while line != '': numbers.append(line) line = raw_input('Enter number: ') print "Size:" + " " + str(len(numbers)) Hey guys, once again I need some help with a challege. http://pokit.org/get/img/c00a1897d52de5b36329564861fadb1b.jpg For your homework, you are given a set of integer data readings, and … | |
CAN anybody help m please i need it fast create interface where user can enter animals that he/she is buying from list of partner on a single cattle receipt. All data must be stored into temporary data container where data will always be available to view and edit. Maximum width … | |
Hi guys, Currently I have a list view which is populated from a table in a Access database. It currently shows 3 columns of data which is fine. When I click on the item It populates the left hand side whith is full off text boxes such as 'Name', 'Address … | |
i used this code to delete row from datagridview but it dosnt delete the selected row it delete the first row , where is the problem?? Dim sCommand As SqlCommand Dim sAdapter As SqlDataAdapter Dim sBuilder As SqlCommandBuilder Dim sDs As DataSet Dim sTable As DataTable ***** Dim connectionString As … | |
Someone can tell me where i m doing mistake in order to show Autogenerate Id everytime with increasing of one. string conn = @"Data Source=FARHAD-PC\SQLEXPRESS;Initial Catalog=shop;Integrated Security=True"; myconnection = new SqlConnection(conn); myconnection.Open(); string query_Id = "select * from tblEmployee"; mydataadapter = new SqlDataAdapter(query_Id, myconnection); mydataset = new DataSet(); mydataadapter.Fill(mydataset); try … | |
I have one CSV file containing so many attribute but i want max and min values of particular specified columns. I have write following code for finding minimum value from each specified column,but i got only minimum of last column, not all column. In dataset.csv file contains 25,185,98,65 15,-20,6,95 17,20005,63,-78 … | |
Hi Everyone, I have a access db in which i can add, or remove tables dynamically. i want to create crystal report for each table dynamically. i can generate crystal report iff the table is already added into dataset and bind with CrystalReport, When i create new table and add … | |
i have write a code for making a string that is being read from CSV file. i want to make a string from particular location of each and every line. i have attached a code what i have done.but i want it as it for any number of location. In … | |
I got a datgridview. I add 1 more column to get difference of Meter 2 and meter 1. private void Loads() { ConnectionStringSettings conSettings = ConfigurationManager.ConnectionStrings["MyDBConnectionString"]; string name = conSettings.ProviderName; string providerName = conSettings.ProviderName; string ConnectionString = conSettings.ConnectionString; string sql = "SELECT * FROM WaterRecord Order by RecordID DESC"; SqlConnection … | |
I have written a program which allows agents of a call centre the ability to access a database (ms access) containing names of solicitors to allocate to. the database is stored centrally and i need a way to update the local dataset on the agents machine when a change is … | |
Hi, I've been working on getting a GUI connected to a database so I can input data into the database. However when getting to the 'making a save button' I get this problem on line 14: Private da As New SqlDataAdapter("Select Name, Number, Email From Contacts", cs) Private ds As … | |
Hi Guys, I have an xml file contains the imagedata attribute. now while reading xml file using dataset i was setting this field to string and insert it to another table that have also image field. when i am tring to retrive this image it's not a actual image. <ImageData>/9j/4AAQSkZJRgABAQAAAQABAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK</ImageData> … | |
Hi we are developing the KNN data mining classification algorithm and are unable to proceed after a point. We have been able to calculate the Euclidean distance metric and find the three closest neighbours to an instance and ordered them in ascending order. However, with the help of the distance … | |
Good day everyone, so here, i have a problem with my repeater control's sql query, what i would really want to happen, is i have a randomized number from 1 to 60, that will tell the database which test question to select, (if it's only one, it's not a problem, … | |
gud day. I have 2 collumn from my database. DateHired ( datarow.item(5)) and EndofContract (datarow.item(6)) on my form i have 2 datetimepicker to record the employees previous jobs, i need to avoid overlapping on the employees recent recorded jobs. e.g if date hired is 01/02/2012 and end of contract is … | |
Hi everyone, I am now having problem with the First,Previous,Next,Last button to retrieve data. > Public Class DailyExpenses > > Dim connection As New SqlClient.SqlConnection > Dim cmd As New SqlClient.SqlCommand > Dim da As New SqlClient.SqlDataAdapter > Dim ds As New DataSet > Dim i As Integer = 0 … | |
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick frmDisplayLockerInfo.Show() frmDisplayLockerInfo.TextBox2.ReadOnly = False frmDisplayLockerInfo.TextBox3.ReadOnly = False frmDisplayLockerInfo.TextBox4.ReadOnly = False frmDisplayLockerInfo.TextBox5.ReadOnly = False frmDisplayLockerInfo.TextBox6.ReadOnly = False frmDisplayLockerInfo.TextBox7.ReadOnly = False frmDisplayLockerInfo.TextBox8.ReadOnly = False frmDisplayLockerInfo.TextBox9.ReadOnly = False frmDisplayLockerInfo.TextBox10.ReadOnly = False frmDisplayLockerInfo.TextBox11.ReadOnly = False frmDisplayLockerInfo.TextBox12.ReadOnly = False frmDisplayLockerInfo.TextBox13.ReadOnly = False frmDisplayLockerInfo.TextBox15.ReadOnly … | |
Hi There; I have a ASPX file and a code-behind cs file. I try to connect to a postgresql, perfom some database issue, and disconnect from it finally. To name a few, I print all records of database to the html file, add some new records. All these operations are … | |
I have a dataset (GrindItems) with 4 datatables successfully populated from dbf files. If I understand the concept of a dataset, I no longer need an open connection to the source db and I should be able to query my dataset. My first question is whether I need a Connection … | |
I want the btnLogin_Click event to verify the username/password from the ms access database, if it matches it will take them to a certain page, if not it will give a message that user/password is incorrect try again. I really don't know where to start, can you please help first … | |
Im having trouble with nested for loops. I have have a SQL database with a few tables i need data pulled from. So in my first for loop i search for all materials in a product, i insert the data into a datatable then i do the for each dr … | |
I am having problems accessing the Data Set, when i would type DataSet ds = new DataSet(); i will always get the red arrow line underneith, I then right clicked on the data > choose items in the toolbox and it is already checked yet i cant create it in … | |
I am trying to read the following xml file into my datagridview <?xml version="1.0" encoding="utf-8" ?> <DEFLECTIONS_TABLE> <Deflections number="1"> <Service_Class>A</Service_Class> <Verticle>600</Verticle> <Horizontal>400</Horizontal> <Service_Class>B</Service_Class> <Verticle>600</Verticle> <Horizontal>400</Horizontal> <Service_Class>C</Service_Class> <Verticle>600</Verticle> <Horizontal>400</Horizontal> <Service_Class>D</Service_Class> <Verticle>800</Verticle> <Horizontal>400</Horizontal> <Service_Class>E</Service_Class> <Verticle>1000</Verticle> <Horizontal>400</Horizontal> <Service_Class>F</Service_Class> <Verticle>1000</Verticle> <Horizontal>400</Horizontal> </Deflections> </DEFLECTIONS_TABLE> I made my windowsform and put a datagridview inside called deflection_datagrid. … | |
Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in File C:\Users\puy\AppData\Local\Temp\temp_30b1c203-656f-4baa-bcf0-1f3973082664 {7558C8AA-A85C-410E-993A-CA4CCADB14E6}.rpt: Unable to connect: incorrect log on parameters Please help me:( using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Data.Common; … | |
hi every one i'm writing a program in vb.net in visualstudio i want to know how can i update my database by using dataadapter dataset dataconnection and command builder can you give me an example thank you | |
Hi everyone, I'm trying to make a little applet that reads text files. I was planning to load some data into a class and use it later. However, I seem to having a few problems with it. // DataSet.java package com.someone.something; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class DataSet … | |
I wanna just a beginning for my coding. (The application running with VB.NET and SQL server) I did this code and it not shown any error. After this process it is displayed the message "Successfully updated". But data is not update on the table. Please tell me, how to update … | |
I have a small problem with printing reports (made by crystal reports). In Form1 I have a list of customers in a ListView (with checkboxes). If the users selects one customer (checkes ONE checkBox) the report is shown - and the report it self has on option to print. If … | |
dim x as integer = 0 str = "SELECT uname, full_name FROM EMPLOYEE" cmd = New MySqlCommand(str, cn) ds = New DataSet da = New MySqlDataAdapter(str, cn) da.Fill(ds, "employee") Dim uname As String = ds.Tables(0).Rows(0)("uname").ToString Dim emp_name As String = ds.Tables(0).Rows(0)("full_name").ToString While x <= ds.Tables(0).Rows.Count If ds.Tables(0).Rows.Count <> 0 Then … | |
Hi I am using the following code to retrieve all the members of a specific active directory group. The code works but the problem is that the code returns all users in "distinguishedName" form which has a lot of extra info I don't need. I need the users to be … | |
I have been searching for a way to retrieve records from my database. I was able to find and create a function specific to my program, but it wont work. Will someone advise me on how I can go about this task? I catch error in binding source and error … | |
Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged Dim con As New SqlClient.SqlConnection("data source=GOLDA2\GOLDA;initial catalog=school;Integrated Security=True") Dim sql As String = "Select * from fees where particulars=" & "'DataGridView1.Rows(0).Cells(1).Value'" & "" Dim dataadapter As New SqlDataAdapter(sql, con) Dim ds As New DataSet() con.Open() dataadapter.Fill(ds, "fees") con.Close() … | |
Dear Daniweb members. I am having quite a troublesome time here with OleDb. What I am trying to achieve is to allow my users to connect to an uploaded Excel workbook, then to be able to select data from the sheets. I have a query designer in the front end … | |
Hi, I am new to programming and I am struggling with an sql select statement. I would really appreciate any help anyone can offer me! What I am trying to do is populate a textbox (using code and without creating a dataset) with data retrieved from an sql database. I … | |
HI. I have a situation where we need to pull data from multiple data sources into one dataset. Once we have the data in one dataset we would like to somehow manage to execute some sort of [complex] select query on the data in order to generate a new DataTable … |
The End.