2,634 Topics

Member Avatar for
Member Avatar for diana_j86

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 …

Member Avatar for kazekagerandy
0
787
Member Avatar for azam3404

Hi, i am using ASP.NET.I want to insert command in asp.net using c#.How can i do?? thanx

Member Avatar for crishlay
0
105
Member Avatar for Shantanu88d

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 …

Member Avatar for crishlay
0
377
Member Avatar for yongj

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 …

Member Avatar for ravenous
0
109
Member Avatar for studentoflife

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 …

Member Avatar for abelLazm
0
5K
Member Avatar for Arjun_Sarankulu

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]

Member Avatar for debasisdas
0
65
Member Avatar for ryan311

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 …

0
82
Member Avatar for Olivis

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 …

Member Avatar for Olivis
0
231
Member Avatar for xanawa

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?

Member Avatar for xanawa
0
88
Member Avatar for kitjo

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 …

Member Avatar for debasisdas
0
105
Member Avatar for MARKAND911

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

Member Avatar for MARKAND911
0
401
Member Avatar for niketakapoor

[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 …

Member Avatar for Mitja Bonca
0
90
Member Avatar for niketakapoor

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; …

Member Avatar for niketakapoor
0
164
Member Avatar for Sarah Lee

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

Member Avatar for egrullard
1
2K
Member Avatar for eileenc87

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

Member Avatar for arezz09
0
241
Member Avatar for ashish101

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 …

Member Avatar for ashish101
0
706
Member Avatar for Mike Bishop

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 …

Member Avatar for Momerath
0
393
Member Avatar for arezz09

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 …

0
93
Member Avatar for lukasrzeznik

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; …

Member Avatar for lukasrzeznik
0
141
Member Avatar for guru_iyer

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 …

Member Avatar for guru_iyer
0
797
Member Avatar for bahed121

Hello All, Can any one tell me how we bind data to a ComboBox from a dataset? Thanks for your precious help

Member Avatar for bahed121
0
119
Member Avatar for Drakswan

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 : " …

Member Avatar for Ancient Dragon
-1
1K
Member Avatar for crankyslap

"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 …

Member Avatar for HookDevil
0
2K
Member Avatar for CorruptionInc

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 …

Member Avatar for CorruptionInc
0
1K
Member Avatar for techturtle

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 …

Member Avatar for techturtle
0
197
Member Avatar for michaelzip

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] …

Member Avatar for michaelzip
0
1K
Member Avatar for Farhad.idrees

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"); } …

Member Avatar for arsheena.alam
0
159
Member Avatar for lpmike

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 …

0
74
Member Avatar for bklynman01

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 …

Member Avatar for bklynman01
0
112
Member Avatar for crankyslap

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 …

0
105
Member Avatar for Shantanu88d

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 …

Member Avatar for sarifah n
0
202
Member Avatar for minkzzzzzzz

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 …

Member Avatar for Akash Saikia
0
614
Member Avatar for aniperiye

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.

Member Avatar for aniperiye
0
112
Member Avatar for Nat_xo

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 …

Member Avatar for debasisdas
0
158
Member Avatar for RobertKramers

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 { …

Member Avatar for samuelmac
0
3K
Member Avatar for abhay1234

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 …

0
56
Member Avatar for Vbs88

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 …

Member Avatar for Vbs88
0
178
Member Avatar for ChaosCoder

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 …

Member Avatar for ChaosCoder
0
2K
Member Avatar for emaduddeen

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 …

0
61
Member Avatar for Eekhoorn

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 …

Member Avatar for Eekhoorn
0
182
Member Avatar for hdaccess

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 …

0
96
Member Avatar for AngelicOne

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.

Member Avatar for OnePostWonder
0
96
Member Avatar for Nat_xo

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 …

Member Avatar for Nat_xo
0
221
Member Avatar for bluerdanblue08

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' …

Member Avatar for debasisdas
0
401
Member Avatar for lianpiau

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 …

Member Avatar for lianpiau
0
2K
Member Avatar for soumya_mjmder

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" …

Member Avatar for mrame
0
763
Member Avatar for Farhad.idrees

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 …

Member Avatar for CsharpChico
0
140
Member Avatar for m_wylie85

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 …

Member Avatar for m_wylie85
0
198
Member Avatar for crankyslap

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) …

0
109
Member Avatar for vinayak.v

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 …

Member Avatar for Vigneshjvm
0
313

The End.