2,634 Topics
![]() | |
First I am new to C#. I attempting to build a simple windows form where you can send textbox info to an access database on the machine. When viewing online tutorials and book, I notice their is a step, form missing from my Visual Studio 2010 program when I try … | |
I am trying to create a Gridview that allows me to add to a database. I think I have the Gridview formatted correctly and I do not want to use the <emptydatarowstyle>. I have been playing around with different solutions to displaying a header and footer in a gridview with … | |
I can clear the content of the datagridview by clearing the dataset [CODE]ds.Clear();[/CODE] Then reset the datasource [CODE]datagridview.datasource = ds.Tables[0];[/CODE] Now I will do a select statement that has different columns from the current datagridview. What happens is, the column from the previous datasource is still intact. As if the … | |
Dim mm As New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=Integrated Security=True;Connect Timeout=30;User Instance=True") mm.Open() Dim mm1 As New SqlDataAdapter("select * from Area_type order by Area_name", mm) Dim ds As New DataSet mmm1.Fill(ds) With ComboBox1 .DataSource = ds.Tables(0) .DisplayMember = "Area_name" .ValueMember = "Area_name" .SelectedIndex = 0 End With mm.Close() 'hi i am student and … | |
Hi first of all am new to progarmming. Am using using combo box control in vb.net combo box getting filled properly Public Sub new_entry_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cn As New SqlClient.SqlConnection("Data Source=KAU-4A76A124FB9;Initial Catalog=SRRY;Integrated Security=True") cn.Open() Dim adp As New SqlDataAdapter("select * from Bank_Details … | |
I have a dataset with the following data: account_number,master_code,score 100000023,UL189PU,1 100000025,UK120PU,1 100000026,AAL004PU,1 100000026,UL221PU,1 100000026,YHL003PU,1 100000034,UL246PP,1 100000043,1198112CS,1 100000060,182112JS,1 100000060,996211CS,1 100000060,AAL012PU,1 100000074,UI136PU,1 100000074,UK131PU,1 100000074,UL178SU,2 I've started a master loop where I loop through the accounts. I now need to do a sub loop and compare this account to the rest of the … | |
Dear All; I would like to suggest for a function name getDataToGrid(). Example: I have table name tblStaff(StaffID,StaffName),tblPosition(PositionID,PositionName) and DataGridView anem dgvStaff. For my purpose is, I don't want to write the same code for each forms. That's why I want a function, just call to each form. It can … | |
I am using the code below to bind my Gridview to a datatable and the code works well. However I now want to add data to the datable and its giving me an error "Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound.". So … | |
Hello, I have an annoying little problem. i am wanting to display data in a chart on my web form. The X axis is the Op Number The Y axis is Competence (1 to 5) Say the Op Numbers for a certain stage are 10 30 55 80 the X … | |
Hey guys, I'm struggling writing some linq. Basically I've got a search method which takes boolean values and decides what results should be included / excluded from the search. Eg Search (bool IncludeStatus1, bool IncludeStatus2, bool includeStatus3...) Now on the back of that I need to create a linq statement … | |
Trying to figure out the best way to do create a CSV export file from my source files and need some input. I'm trying to build a CSV export file for import to an Accounting System where there are 3 different tables mapped to a single field in the main … | |
hi, i'm trying to do some appointment book so i decided to use MonthCalendar control and date changed event for choose the date i tried dataset.table.rows.find() function on other tables which have int primary key and it works its finds my row/s i need but when i tried this func. … | |
HI i am getting error on lbl.Visible = true and command.ExecuteNonQuery(); plz check and paste correct coding i doing new project plz help me. protected void Button1_Click1(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=RAVI-PCSQLEXPRESS;Initial Catalog=personals;User ID=sa;password=sa;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter(" select * from table_2", conn); … | |
Hello, I have a dataset populated with data from my database as follows con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = ../SR.mdb" sql = "Select Description from " & TheBm & " where OpNo = " & myOp & " " DSeS = ESDatCon.SelectData(sql, con) i have a string vairable called OpDesc i … | |
I am trying to overlay a moving average over a OHLC chart but I get no results. Any ideas on what am I doing wrong ? private static OHLCDataset createPriceDataset(String filename) { //the following data is taken from http://finance.yahoo.com/ //for demo purposes... OHLCSeries s1 = new OHLCSeries(filename); try { BufferedReader … | |
For some reason, before the selectedindexchanged sub routine finishes, combobox Description is still pointing on the last selectedindex changed and the combobox Image is on the actual current selected index changed. Once it exits the routine both combobox are in the current value. I cant see why this is happening, … | |
Hello, I would like to tie a dropdown list to my dataset that i have populated from my database. however, there are repeated values in the datatable. my table is as below... BMNO CellName 123 office 242 office 678 production 290 production 101 productiom 890 stores 512 Goods In 514 … | |
I am working with CSVfile program. I have already calculate something from it. Name,Age,Sex,Pincode,Disease 1. aaa,4,M,35265,flu 2. bbb,4,M,35652,Gastric 3. eee,6,F,35265,Brain 4. sss,7,M,32564,flu I have made program for calculating no. of age,sex and pincode as attached in the code. In this i have calculated that age=4 comes how many times and … | |
I got error of ArrayIndexOutOfBounds Exception in following code. Please help me to how to solve the error.I also used String tokenizer class. import java.io.*; import java.lang.*; import java.util.Arrays; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.StringTokenizer; public class CSV{ public static void main(String[] … | |
Hello everyone.... I would like to display data from my database in a chart. I don't seem to be able to figure out how to get it working though! I have tried the following code to bind the chart to my dataset but no joy! con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = … | |
hello to all and thanks for giving all help to newbees, i have a form in visual basic 2010 with these specification 1 datagridview 7 textboxes 7 comboboxes 2 datepicker i use a connection with code to ms access. i am using this code to load data in DGV and … | |
Following the "Head First eBook". First Chapter has a contacts excercise where controls are added. The attached image shows a drop down option for the people table. Although I found it by chance in Visual Studio 2008 Team System, I have not been so fortunate with C# 2010 express. An … | |
hi i am getting error plz error SqlConnection conn = new SqlConnection("Data Source=RAVI-PC\\SQLEXPRESS;Initial Catalog=personals;User ID=sa;password=sa;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter(" select * from table_2", conn); DataSet ds = new DataSet(); da.Fill(ds, "table_1"); conn.Open(); SqlCommand SQLINSERT =new SqlCommand(); command.Parameters = "insert into table_1(ID,name,address,phone,city)values('@id','@name','@address','@phone','@city')" ; SQLINSERT.Parameters.Add(("@ID",Textbox1.Text.ToLower) SQLINSERT.Parameters.Add(("@name",Textbox1.Text.ToLower) SQLINSERT.Parameters.Add(("@address",Textbox1.Text.ToLower) SQLINSERT.Parameters.Add(("@phone",Textbox1.Text.ToLower) SQLINSERT.Parameters.Add(("@city",Textbox1.Text.ToLower) SQLINSERT.ExecuteNonQuery() | |
Hello, is it possible to refresh my gridview table without reloading the page? i'm inserting/updating data on a button click and would like the gridview to refresh when the data has been updated. it is bound to a database, so i guess i could just run the select command again … | |
Question: Does anyone have any recommendations that are likely to keep a large database healthy/speedy? I'm designing a database that is going to retrieve around thirty million data points a year, up to around three hundred million to a billion in a few years time when all of the sensors … | |
I know this question has been asked many of times about how to create a search button. I am very new to C# programming and I am having a hard time creating a search and just haven't found what I am looking for from other posts. So I hope someone … | |
Hi everyone, In a nutshell...I have developed a site in ASP.Net and VB.Net which allows a user to create an order and submit it to a SQL Server backend database. When the order is placed...an xml file is also produced, showing the items that have been ordered...which is then loaded … | |
Can someone please help me on this problem. I am trying to send the updated changes to the sql database when I remove a row. I use the delete method to delete the numbered row through a dataview and then use the upate command to update the changes to the … | |
**hello all, i am creating a programme for my institute which helps in their administrative process. i am using visual studio(basic) 2010. which is connected with ms access database (abcdata.accdb) the database is having table called session with columns sessionID,sessioncode,sessionname. * sessionID data = 1,2,3,4 * sessioncode data = 13,14,15,16 … | |
Hello, I am new to asp.net i have had some experience making windows in vb.net (VS2010) I am trying to get my web to query a database then I want to display some of the returned data. the code I have is.. Imports System.Data.OleDb Partial Class Demos_Iain Inherits System.Web.UI.Page Protected … | |
plsss I need help!! I have problem with my insert data into database this is my code Public Sub doSave() Dim con As New OleDb.OleDbConnection(My.Settings.SystemDataConnectionString) Dim cmd As New OleDb.OleDbCommand Dim adap As New OleDb.OleDbDataAdapter Dim ds As New DataSet Dim dr As OleDb.OleDbDataReader con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\D_S_S - … | |
i am getting "Unhandled Null referenceException "--object reference not set to an instance of an object at below mentioned code in bracket (return System.Configuration.ConfigurationManager.ConnectionStrings["unitmoduleconnectionstring"].ConnectionString) and below is the total code help me to get out of this bug.... namespace TIMS { public partial class Form1: Form { public Form1() { … ![]() | |
hi this is my connection string SqlConnection conn = new SqlConnection("Data Source=RAVI-PC\\SQLEXPRESS;Initial Catalog=personals;User ID=sa;password=sa;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter(" select * from table_2", conn); DataSet ds = new DataSet(); da.Fill(ds, "table_1"); conn.Open(); Actually my doubt is how to insert(data entered in texbox) and delete and update view record from … | |
Hello Friends, One help needed.... I have a product database....in which I have productid,prodname,inventoryvalue,reordervalue I have to design a email system that as soon as the product reaches the reorder level it shud generate an email.... but the condition is there will be many products in the database....and on one … | |
I have a program where am trying to access a dataset in the main form from a 2nd Winfrom. I have created a form 1 ref but when I use this to access the datatable in the dataset it doesnt seem to work. The following code is for Form 2 … | |
hi all, I have a asp page. In that i am displaying some data in a grid view from database.In grid view i am displaying TicketNo,TicketName and status. Now my problem is that when page loads if the status have a value as 'OPEN' that row should be in red … | |
I am trying to save database after inserting the records into dataset from external file.... But when I insert records and then try to save it, it does not save...No error comes up though.??? Can you please look into the code and help?? If file_path = Nothing Then Msgbox.Show ("Database … | |
Hi.. i'm new in vb.net and i have problem with my project. can anyone help me with this problem.. -update button Dim con As New OleDb.OleDbConnection(My.Settings.TREViS_03_ConnectionString) Dim com As New OleDb.OleDbCommand Dim adap As New OleDb.OleDbDataAdapter Dim ds As New DataSet con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Yaya\Desktop\TREViS(03).mdb;Persist Security Info=True") con.Open() Dim … | |
I consider myself a very patient guy with a whole lot of determination to get things working within say, a program i'm working on. However, I feel that I am only wasting precious time that I could be using to actually gain knowledge in something rather than hitting my head … | |
Imports System.Data.SqlClient Imports System Imports System.Data Imports System.Collections Imports System.Windows.Forms Imports System.Resources Imports System.Data.OleDb Imports System.Drawing Imports System.Net.Mail Imports System.Configuration Imports System.Web Imports System.Web.Security Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls.WebParts Imports System.Web.UI.HtmlControls Public Class Form1 Inherits System.Windows.Forms.Form Dim counter As Int32 = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal … | |
Hi There; I am writing a basic ASP.NET code. This code has worked properly before, but when I has changed "EnableViewState" to false, saved it it and operated it, code didn't work. When I have changed the "EnableViewState" to true again, it didn't work either. I couldn't imagine the reason … | |
Hi all, I am using DataList and when i run my project the table of the datalist doesn't appear?!!! aspx.vb file Imports System.Data.SqlClient Public Class SLP_1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' TextBox1.Text = Session(logAccount) End Sub Protected Sub DataList1_SelectedIndexChanged(ByVal sender … | |
anyone can help? i want to check whether the data has been exist or not. but its shows some error in this code. error :No value given for one or more required parameters. Public Sub doSave() Dim con As New OleDb.OleDbConnection(My.Settings.KK3DB) Dim cmd As New OleDb.OleDbCommand Dim adap As New … | |
Hi, I am trying to delete data from dataGridview, and update my Access database, but I am having trouble withe these code it keep stated that I have "Object not set to an instance of an object" and I don't know where my code went wrong, please help, I am … | |
I have a problem that seems so simple to fix but I cannot figure out why this is not working. I have done this in other apps with no problem. I have an ASPX page that displays data at the top for info only and a Gridview to show related … | |
Hi all, Please solve my Problem: I have DataGridView and Dataset. I want to add data from dataset to datagridview row by row and not by using DataGridView.DataSource method. For ex. following is the way to do the same using Vb.net [CODE] dgClient.Columns.Add("client", "Client") dgClient.Columns("client").Width = 150 dgClient.Columns.Add("comments", "Comments") dgClient.Columns("comments").Width … | |
Hi again guys... Right, Having issue with a ADODB connection as I have never used one before. Currently trying to read files out of a folder using the ODBC connection that comes with the Software I want to extract data from. I have managed to get the connection to the … | |
I am new to dealing with SQL Express DB tables. I have a Windows application that gives the user a textbox that is bound to a value in my dataset (ds) which reflects my SQL table (Specs) field. The user can change the numeric value of the textbox and I … | |
i have problem with query the database. i want to add data into two table that share same Primary key. here my code error message :The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the … | |
Hello people. Ive got a problem with a listbox of mine. I have three lisboxes, one listbox1 is for product category, another lisbox2 is for the product itself in which it will appear after the user has chosen a product category AND another listbox3 which acts like a shopping cart … |
The End.