2,634 Topics
![]() | |
How to fill a combobox with a data stored in a table in sql server?.... Can we use stored procedure to do so? I tryed this code but it keeps giving an error message: "An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll" What does that mean???? My code: Private … | |
Hi, i am using ASP.NET.I want to insert command in asp.net using c#.How can i do?? thanx | |
Hi, I have a web form. On it I am generating a gridview through a stored procedure. Now it has it's DataSource set to dataset object ds. After generating this gridview. I want to generate an xls file. The code for that is correct. But since I am calling a … | |
I've been trying to code an array where its size is dynamically allocated. It's been a while since I've coded and so I was wondering if you guys could give me some help? There's also a randomize function that allocates the array with a random set of numbers (the quantity … | |
I'm returning over 30 tables in a sql stored procedure which come back in a dataset. I store this in session state and hold for 20 mins before refreshing. My problem is, I need to be able to search the dataset for a particular table by name. At the moment … | |
I have two dataset One contain the input parameter and other doesnt And integrating two dataset into 1 report But Giving error [B]object'xxxx.rem' has been disconnected or doesnot exist on at the server[/B] | |
i manage to put a data in listview. i have a problem in searching a data. here is my code: [CODE]Dim sda As New SqlDataAdapter Dim ds As New DataSet Dim dt As New DataTable Dim NumberRow As DataRow objCon = New SqlConnection(conStr) objCon.Open() obj = objCon.CreateCommand() strSQL = "(Select … | |
Hey! So i just started reading through some Database tuts, because i needed it for a project that i am making. I am using the HomeandLearn tutorial. So i have a database called "AdressBook" and then this code. [CODE]Public Class Form1 Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As … | |
Hi, I have a combobox which gets data from a dataset called cmbItemType, now i would like to let the user add another item type in the combo boc withot haveing to create another form. can u help me pls? | |
2 Days Ago different datatable update i have a big problem yet ihave to present this project on monday my database which i have to present next week. i have tried to play with the codes but still it has failed to retrive and update data. i need a code … | |
I have added a .xml file to application resources. Now I want to access that xml file and fill dataset using that xml file in c#.net Can anyone help that how can i do this in C#.net | |
[CODE]private void Form_AddMember_Load(object sender, EventArgs e) { da.SelectCommand = new SqlCommand("SELECT * from dbo.membership_details", cs); DataSet ds = new DataSet(); da.Fill(ds, "membership_details"); comboBox1.DataSource = ds.Tables["membership_details"]; comboBox1.DisplayMember = "membership_desc"; comboBox1.ValueMember = "membershiptype_id"; da.SelectCommand = new SqlCommand("select membership_fees from dbo.membership_details where membership_desc='" + comboBox1.SelectedValue + "'", cs); SqlCommand cmd = new SqlCommand("select … | |
i want due date comes automatically as by adding after 15 days from date of issue................. [code] private void btnIssueBk_Click(object sender, EventArgs e) { SqlConnection cs = new SqlConnection("Data Source=IRIS-CSG-174;Initial Catalog=library_system;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter(); cs.Open(); da.InsertCommand = new SqlCommand("Insert into Lib_issue_details Values(@book_tag_id,@member_id,@book_issue_on,@book_due_date)", cs); da.InsertCommand.Parameters.Add("@book_tag_id", SqlDbType.VarChar).Value = textBox2.Text; … | |
Hi Everybody How can i display in the gridview. "there is no data for this request" if the binded dataset is empty? Can anyone give some ideas? Thanks | |
hi All, Why when I drag the datagridview in my designer, they don't give me a selection on which data source? How can i declare my datsource, dataset? URGENT..HELPPP | |
I'm doing connectivity of my sql server database with C sharp code. In sql server 2005 i made two tables person(empid,citycode,name,salary) and city(name,citycode)and entered few records. i haven't set any constraint on any column. Person 11 Ashish 101 99000 12 XYZ111 110 993939 13 yuuuuu 101 88484 14 hdhfhh 101 … | |
i am trying to create a dataset for use with crystal reports. i have a dataset called dataset.xsd with two tables BatchHeader and BatchDetail these have a relationship of BatchID on both tables. (see picture1) I have this working when there is only one table in the dataset with this … | |
i using datagrid and all contents in datagrid from accessdatabase (using dataset) i hve this in query builder.. SELECT product, model, stockIn, dateIn, allQuantity, stockOut, dateOut FROM Product_list WHERE (model LIKE ? + '%') can i search by multiple column like product & model in 1 texbox & 1 more … | |
I have problem with printing Crystalreports from Dataset as a source. I have a Dataset fullfilled with data from query and CrystalRaports doesn't show any data from dataset on the report. Do you haeve any ideas what is the problem. My Code: [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; … | |
Hey I am trying to do a project on Test Engine. I need to retrieve random rows of questions from access database. I did the following code, but every time I once close and run it again, the sequence of questions is same. How can I change the sequence every … | |
Hello All, Can any one tell me how we bind data to a ComboBox from a dataset? Thanks for your precious help | |
Hey there , I have a problem about saving information, which is read from a text file, to an char array.I have to read the file character by character.I could't use getline() function and string, I have to use get() function.There is a sample of the all data : " … | |
"Cross-thread operation not valid: Control 'DataGridView1' accessed from a thread other than the thread it was created on." I've been avoiding multithreading because of this since I started with vb.net a couple of weeks ago but it looks like I have to start using it now. I simply don't understand … | |
So here's my assignment: Define a class Quiz that implements the Measurable interface. A quiz has a score and a letter grade (such as B+). Use the implementation of the DataSet class in Section 9.1 to process a collection of quizzes. Display the average score and the quiz with the … | |
I’m fairly new to C#, especially with databases. I’ve worked in VBA and Delphi doing databases, so I was hoping to just use this like a RecordSet or a Tcursor, but so far it’s not panning out like that. I have a SQL database added as a dataset in my … | |
Hi, I'm quite new with Data Adapter on VB.NET. I'm having a problem with retrieving data on different tables. Example database: [QUOTE][B]BookInfo[/B][INDENT]BookID: HSD993Z Title: Introduction to SQL[/INDENT] [INDENT]BookID: LDJA293 Title: Advance Computer Programming[/INDENT] [INDENT]BookID: KSKL194 Title: Object Oriented Programming[/INDENT] [B]StudentInfo[/B] [INDENT]StudentID: 2938485 FullName: Michael Zip[/INDENT] [INDENT]StudentID: 2949284 FullName: Ray Williams[/INDENT] … | |
i have to show data in datagrid using store procedure...but remember...i m using store procure in seprate class so i m facing difficulties.. how to do it.. thats my class coding... but how to pass it in main form? public Searching() { Myconnection = new SqlConnection("Data Source=.;Initial Catalog=Bahria_Managment;Integrated Security=True"); } … | |
Hi all, actually i want to populate datagridview and it's include with date. i used calendar cell as in [url]http://msdn.microsoft.com/en-us/library/7tas5c80.aspx[/url]. now want to show date from database into the calendar cell. this is my coding to populate the information from the database. [CODE]Private Sub PopulateData() Dim DBClass As New clsDB.clsDatabase … | |
Hello, I have two DataGridViews in one window. The first one displays 2 columns, itemNo and task. When I click on a row in this grid, I want to populate the second grid with corresponding material. It is organized so that the itemNo in grid1 is 1, 2, 3, and … | |
Hey guys, I got my application working fine but it's using a constant 50%-ish of my CPU power, which is way too much I believe. Can any of you figure out what's causing this, or tell me how I can find out myself? :) What we're doing is reading a … | |
I am binding a DataSet objetc as a datasource to my GridView. However i want to omit first column from being displayed. If i write [CODE]GridView1.Columns(0).Visible = False[/CODE] then i get error saying there was some indexing error. How can this be acheived ??? Also a weird thing is that … | |
I create website on asp.net, is name ExpenseReport First, I create 'DBConnect' class in App_Code by using namespace ExpenseReport [CODE]using System; using System.Data; using System.Configuration; using System.Collections; using System.Data.SqlClient; namespace ExpenseReport { public partial class DBConnect { private SqlConnection objConn; private SqlCommand objCmd; private SqlTransaction Trans; private String strConnString; private … | |
i have a problem. i want to import multiple tables from a same excel sheet to a datalist or more.how can i identify different tables.please help anyone. advance thanks to all. | |
Okay, so I was originally having problems even saving the data, but I can now get it to stay in the dataset, and when I switch to another page it stays there when I go back to it. Although when I close the form and reopen it, the changed data … | |
Hi there, Im getting the error above, when i run my code. [code] string myCommand = "SELECT * FROM Manager WHERE UserName=" + ID; SqlDataAdapter da = new SqlDataAdapter(myCommand, con); DataSet ds = new DataSet(); try { con.Open(); da.Fill(ds); [B]// <- highlighting this part of the code..[/B] } finally { … | |
Hello I tried a lot however I have not been able to update data entered in the datagridview into the database table Any suggestions [code] Imports System.Data.OleDb Public Class Form1 Dim conn As OleDbConnection Dim icount As Integer Dim datagrid1 As New DataGrid Dim da As OleDbDataAdapter Dim ds As … | |
Hi guys, I'm new here and in dire need of help for a problem that I've worked on hours. I created a table 'tblProductCat' in the webform and wanted to populate the table with the code below: [CODE]Imports System.Data Imports System.Data.SqlClient Partial Class ProductCategories Inherits System.Web.UI.Page 'Define DA and DS … | |
What I'm trying to do is parse a CSV file that has column headers, and map those headers - ideally to a class. The tricky part is that I need to be able to support various mappings because it will be interacting with different systems that give the headers different … | |
Hi Everyone. Can you show me what the most effecient way to load data from a data adapter in textboxes would be? I heard that binding data to the textboxes is a better way but this is how I have been doing it so far: [CODE] ' Compose the SELECT … | |
I have this litle problem, which is propably very futile, but still I cant't find the solution. I have this function which scans a directory for all kinds of files and returns all the filenames with the right extention. After that I cut of the directory string, put it into … | |
Good day! This is the code I've done in saving and retrieving an image to and from a database...I have encountered an error in retrieving the image.....how can i solve this? can u help me..thanks...hope you reply soon... Imports System.Data Imports System.IO Imports MySql.Data.MySqlClient Public Class frmMain Dim cnString As … | |
I got an error saying "There is already an open DataReader associated with this Command which must be closed first". I have only used datareader once while using the same connection for my dataset. Would that make some conflict? Need help. | |
Okay, So I'm currently working on my A2 computing project, and I am having slight difficulties updating and saving the data in my database when it is entered on a form in VB. I cannot find any reason why it wouldn't work, but if someone could suggest a better way … | |
Hi to everyone! I am new in programming and I'm making an application that can filter records on datagrid from the user's input in textbox..I tried this code that I also got here.. But I'm getting an error..please help me..thanks in advance.. ERROR MESSAGE: An unhandled exception of type 'System.InvalidOperationException' … | |
who can help me?? I got a datagridview, one of column in datagridview is checkbox call Finish. So that, when the Finish checkbox is checkbox, I want certain row background color become yellow color. when each time I run the program, it will display yellow color when that row Finish … | |
HI guys, i have split and xml in two parts, and in the root element element of the second one(which in this case is the output) want to add an attribute...but do not have any idea how to do this... my XML:[CODE]<DataSet> <Input> <Order OrderNo="tesco10" DocumentTYpe="0001"/> </Input> <Output> <Order OrderNo="Order1" … | |
Hi i want to read xml.. i have two combo boxes one is showing Prgorrames Name and 2nd will show Semester No with respected to Programme.. For example if I select Programme BBa so another combobox will show all the semesters of BBa...and when i select semester 5 so data … | |
Hi all i am havin a problem with my Jet oleDB connection i am getting an error and i am not sure if my code is completly wrong or it is a small problem any help would be great. This is the erorr i get: An unhandled exception of type … | |
Hey guys, I'm seriously breaking my head over this one. This project should have been finished 10 hours ago but I've been stuck on this for ages. First I set the DataSources / Dataviews of all the things I need; [CODE] Dim dsPubs As New DataSet() dsPubs.ReadXml(pathdone) DataGridView2.DataSource = dsPubs.Tables(0) … | |
Error 2 'System.Web.HttpApplicationState' does not contain a definition for 'startuppath' and no extension method 'startuppath' accepting a first argument of type 'System.Web.HttpApplicationState' could be found (are you missing a using directive or an assembly reference?) E:\Report1\global\Default.aspx.cs 77 36 E:\Report1\global\ please help me.. i want to override the connection string of … |
The End.