2,634 Topics

Member Avatar for
Member Avatar for tim8w

I have the folloing code using OleDB to manipulate an Access database: [CODE] Dim adpMasterRecipe As OleDb.OleDbDataAdapter Dim dsMasterRecipe As New System.Data.DataSet adpMasterRecipe = New OleDb.OleDbDataAdapter("SELECT * FROM tblMasterRecipe WHERE MasterID = @MasterID", My.Settings.RecipesConnectionString) adpMasterRecipe.SelectCommand.Parameters.AddWithValue("@MasterID", iRecipeNumber) adpMasterRecipe.Fill(dsMasterRecipe) If dsMasterRecipe.Tables(0).Rows.Count > 0 Then dsMasterRecipe.Tables(0).Rows(0).Delete() dsMasterRecipe.AcceptChanges() adpMasterRecipe.Update(dsMasterRecipe) End If [/CODE] The problem …

Member Avatar for Unhnd_Exception
0
398
Member Avatar for Josef01

does anyone has a sample code or it it possible to fix error in this code I appreciate any advice the error i get : There was an error parsing the query. [ Token line number = 1,Token line offset = 13,Token in error = user ] cmd.ExecuteNonQuery() [code] Imports …

Member Avatar for Josef01
0
705
Member Avatar for lpmike

hi, now i'm hving problem to show card number that is not currently in used. let me give the example. I have 3 card numbers (A, B and C). A & B are user card number while C is temporary card number. I want to attached C to A. so …

0
66
Member Avatar for dinesh.isuranga

this is the way that i used to fill dataset in the formloader (); [CODE] String Query; DataSet ds; SqlDataAdapter myadapter; SqlCommand mycommand; connInterface conn = new connInterface();//connection class private void Form1_Load(object sender, EventArgs e) { cmbEmpID.DataBindings.Clear(); Query = "select * from dbo.bind_tab b"; mycommand = new SqlCommand(Query, conn.createconnection()); myadapter …

Member Avatar for dinesh.isuranga
0
172
Member Avatar for luekgauc

Hi, this is the first time I am posting in such a thread so I hope I am doing it the right way. I am trying to populate a drop down menu through php however it is not returning the correct values. Here is the code: [CODE]<td> <select name="Towns"> <?php …

Member Avatar for diafol
0
61
Member Avatar for vn412

Hi, My code is: [CODE] sqlsub = "SELECT distinct field1, field2" sqlsub += " FROM tbl I Dim da As OleDbDataAdapter Dim lsdataset As New DataSet 'populate data adapter da = New OleDbDataAdapter(sqlsub, conn) da.Fill(lsdataset, "tbl") thpr = Gettheoprac(lsdataset.Tables(0).Rows(0).Item(1).ToString, "shortform") subcombo.DataSource = lsdataset.Tables("tblname").DefaultView subcombo.DisplayMember = "snshort" + "(" + thpr …

Member Avatar for kvprajapati
0
90
Member Avatar for noel9

hi friends i m doing project in vb and database is microsoft access in my form i have 3 radiobuttons and 3 combobox when i select radio button then respective combobox enable and remainig disable i load all the data in combobox through data reader the problem is user can …

Member Avatar for lolafuertes
0
145
Member Avatar for discovery-power

Hi All, I have created a form for a user to create a booking of a meeting room, I need this form to do 3 things. have print functionality update the new booking to a dataset view the current bookings screen I seem to be struggling with the second task, …

Member Avatar for discovery-power
0
201
Member Avatar for tensai

hi, i am trying to copy all the data from two columns from two different tables to another table. the problem is when i use insert statement for the second time it does not copy the data from the two columns. i was able to insert two columns from loanTable2 …

Member Avatar for tensai
0
204
Member Avatar for Jayson83

Below is my code to call the records or save/update to the database which works fine [code] Private MasterConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Info.mdb;Persist Security Info=False;") Private daMaster As OleDb.OleDbDataAdapter Private dsMaster As DataSet Private dtMaster As New Data.DataTable [/code] I have been trying to add First Previous Next Last …

Member Avatar for Jayson83
0
71
Member Avatar for faintfascinatio

I'm using C# to run a couple stored procedures and return in dataset. I've been using: [CODE] if(dset.Tables.Count > 0) { for(int i = 0; i < dset.Tables[0].Rows.Count; i++) { //some code } } [/CODE] is there a shorter way to do this without the if statement?

Member Avatar for Rogachev
0
132
Member Avatar for Jayson83

I am trying to add a new record everytime i do my navigation gets all messed up I also need an update button... I would like so when i hit new record the record of will be(ex. If Im adding record number 30 it will say record 30 of 30, …

Member Avatar for kvprajapati
0
161
Member Avatar for Gazzmonkey

Hi all, I have a very annoying problem with adding new records to my Access Database, I'm not getting any syntax errors but there's obviously a symantic error of some kind causing this headache. I've been developing an RFID system for two months now and spent the last four weeks …

Member Avatar for Gazzmonkey
0
97
Member Avatar for Girum1

I create a simple data base table using Microfoft SQL Server 2005 and i want to display this simple table as a hole in my form.I use DataSet and DataAdapter to communicate with my SQL data base.i try to pull all the record at data base in to the DataSet …

Member Avatar for kvprajapati
0
204
Member Avatar for gspeedtech

Hello, I am working with a Windows Application that was developed in VS2008 on a SQL2000 database. I am trying to determine the Datasource of a row in an existing DataSet. I have narrowed it down to 2 possible tables that each have a row with the same identical name. …

Member Avatar for gspeedtech
0
115
Member Avatar for jonnod123

Hi All, I have two datagridviews on a form, one databound and one not (populated programmatically from Active Directory). I want to allow a user to double click on an item in the unbound DGV and have that item appear at the bottom of the bound DGV. The doubleclick event …

Member Avatar for jonnod123
0
513
Member Avatar for ryathegr8

hi this is my code for forget password module..... i dont know why its not working....:(( i have attached the snapshot as well.... plz help me.... error is while updating..... [code] string strCon = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; SqlConnection objcon = new SqlConnection(strCon); objcon.Open(); string str1 = "'"+txt_EmpFP_Uname.Text+"'"; string str2 = "'" + …

Member Avatar for kvprajapati
0
71
Member Avatar for readbanana

I am filling a dataset from a database. When there are no rows to return it still tells me that the count is 1. I can't figure out what is going wrong. if I look at a visual of the dataset, the row is blank, but the count is 1. …

Member Avatar for kvprajapati
0
130
Member Avatar for Dheerajpro

hi frnds i m doing the project in vb.net in which i want 2 add data in database i took two lebel boxes and two textbox and i want data should add in database on button click so i tried it in to microsoft access just normal table which contens …

Member Avatar for kvprajapati
0
135
Member Avatar for discovery-power

Hi All, I have had some reall problems with this. I have a form with a datagridview, now I can add new records and the dataset will update fine, but it wont update when I want to delete a record. Please see below my code. [CODE] Imports System.Data.SqlClient Public Class …

Member Avatar for discovery-power
0
94
Member Avatar for crispexops

Hi, I've been having issues with this for the last 4 hours and I don't know what to do. Basically I'm using an MS Access database to store information on a movie collection, however I do NOT want to use the crappy controls microsoft has for populating and navigating databases, …

Member Avatar for ShahanDev
-1
4K
Member Avatar for gerk45

Please Help me with my update on vb.net 2008!It's quite a simple code but when it comes to it tells me Syntax error in Update.The problem is where i highlited.Please help [code] Imports System.Data Public Class frmgoods Dim Con As New OleDb.OleDbConnection Dim dbprovider As String Dim dbsource As String …

Member Avatar for ShahanDev
0
113
Member Avatar for yasho

I am working with Visual studio 2003. Have data grid , data adapter and dataset and an access data base In access database the one field "time" is defined as date/time and format as medium date. This field stores the time properly i.e. 3.00PM But when i load the datagrid, …

Member Avatar for ShahanDev
0
112
Member Avatar for bh_superman

Just a couple of problems I'm working on-- can anyone help. Thanks. 1. You are making changes to an existing ASP.NET application. The application contains a DataSet object, dsProspect. The page you are changing displays prospect data from the dsProspect DataSet and includes an Update button. You define a new …

Member Avatar for Shoaib Siddiqui
0
256
Member Avatar for discovery-power

Hi All, I have created a form called new users, I have added my data source, draged over the objects I want from the dataset onto the form and all is well appart from the fact that I cant delete records. To add them I simply click the add button, …

Member Avatar for discovery-power
0
112
Member Avatar for Saikumar Adep
Member Avatar for haripriyamca05

I binded the gridview from database with dataset. Now i want to add new row dynamically with already existing gridview when user clicks add button

Member Avatar for malashukla
0
95
Member Avatar for Victoryy

HI, I have to calculate values and display it on the crystal report, i have entered all the values int the dataset. Now i have to design the crystal report using that dataset. Is it possible in the visual studio.... If yes, then how can i do that..\ Thanks & …

Member Avatar for virusisfound
0
113
Member Avatar for sampaw20

[code] Imports System.Data Public Class Section Dim con As New OleDb.OleDbConnection Dim ds As New DataSet Dim da As New OleDb.OleDbDataAdapter Dim dv As New DataView Dim inc As Integer Dim maxrows As Integer Dim cmd As OleDb.OleDbCommand Dim constr As String Private Sub Section_Load(ByVal sender As System.Object, ByVal e …

Member Avatar for ShahanDev
0
181
Member Avatar for winkler

Hi I consider myself fairly new to VB.NET, so maybe you could help me here. I have a bindingSource which is bound to a dataset. I have a filter on the bindingsource. My problem is that when I add a new row, with BindingSource.AddNew, even if it does not match …

Member Avatar for winkler
0
809
Member Avatar for rageke

Hi there, for a serious amount of time i've been struggling with this same issue, I did find some answers but non sufficiant. Maybe someone could lend me a hand? Allow me to illustrate my situation; I'm pretty new to VB.net, a whole lot is left for me to learn. …

0
50
Member Avatar for devloper

in vb.net to store this query in dataset ..In Sql query I have a Employee Id M 1 M 31 M 41 M 58 M 6 M 60 M 67 S 10 S 118 S 133 S 143 S 151 S 155 S 157 S 158 S 25 S 28 …

Member Avatar for jlego
0
126
Member Avatar for piotr_kast

I have general problem with bindingSource control In VS 2005 C# professional. In project I created new Form and: 1. added a BindingSource component named bindingSource1 and DataGridView control named dataGridView1. 2. binding bindingSource1 to data (DataSource), and the DataGridView controls to bindingSource1. 3. in bindingSource1 set properties DataMember to …

Member Avatar for piotr_kast
0
215
Member Avatar for mastermind8

Hello! At school we created a project and it works fine. I wanted to create my own project, it's practically identical to the school project, so i copy paste the code, and modify it to my needs. Everything works fine, i can add data in C-sharp DataSet, but when i …

Member Avatar for Mitja Bonca
0
97
Member Avatar for virusisfound

Hi, I want to save datagridview data in Excel sheet as per user spcify the location for that I write some code but It's not working properly. If I spacify the location in the code then It alway overwite the data on previous data. In Savedialog Box when I spcify …

Member Avatar for RossR
0
118
Member Avatar for tendaimare

Every time i try to run this codei get the following error: "'System.Data.DataRow.Protected Friend Sub New(builder As System.Data.DataRowBuilder)' is not accessible in this context because it is 'Protected Friend'. " this is my first time to insert using oledb and the With method. [CODE] Imports System.Data.OleDb Public Class frmAddd Dim …

Member Avatar for Mariandi
0
240
Member Avatar for zeetec

Hi, I have a datalist which contains a linkbutton. The LinkButton is populated with templatename which is a field from my Database table. My LinkButton has an onclick event which attempts to populate the clicked templatename's value into my textbox (called txttest). Here is my front-end code:- [CODE]<form id="form1" runat="server"> …

0
57
Member Avatar for kiran.madke

hi everyone i want a solution for this. i tried to check a all data from datbase table using dataset with a foreach loop. but this logic check only first row not below that so any one help me to solve this problem so i can check all rows from …

Member Avatar for CrappyCoder
0
771
Member Avatar for SusanHAllen

Hello all, I have a windows application with a DataGridView. I have successfully bound the DataGridView to a datasource (datatable based on database query). I would like one of the columns to be a ComboBox that is selected to the correct datasource value, yet upon click displays data from a …

Member Avatar for SusanHAllen
0
1K
Member Avatar for devloper
Member Avatar for madhan

Hi, I have a dataGridView that is bound to dataset.I have created a add new button for DatagridView. my problem is the studentid that is a primary key column which is already defined in the table. I am struggling to autoincrement the datatable.please review the code below and let me …

Member Avatar for kvprajapati
0
426
Member Avatar for rick.eavans

[CODE] Imports System.Data.SqlClient Imports System.Data.SqlClient.SqlDataReader Imports System.Data.SqlClient.SqlConnection Public Class Order Inherits System.Windows.Forms.Form Dim myConnection As New SqlConnection Dim myCommand As New SqlCommand Dim ds As New DataSet Dim cmdtext As Integer Dim action As String Dim view As DataView Dim dr As SqlDataReader Sub fill() Dim adp As New SqlDataAdapter …

Member Avatar for kvprajapati
0
110
Member Avatar for bklynman01

I am working on exporting some data to a DataGrid (with no luck). So far I have: [CODE] Private Sub SaveDoc() Dim MyConn As System.Data.OleDb.OleDbConnection Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Try MyConn = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source='c:\book2.xls'; Extended Properties=Excel 8.0;") MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet]", …

Member Avatar for bklynman01
0
142
Member Avatar for procomp65

Hi I have a windows form application connecting to a sql compact 3.5 database. I can add and delete records via buttons I have created. When I add a record I update the combo box and it works fine. But if I delete a record, I first have to close …

Member Avatar for kvprajapati
0
71
Member Avatar for ogsirus

Hi All, Im trying to Insert a new row into a database and refresh the dataset. This is what I have so far: [CODE]void ButtonInsert(object s, EventArgs e) { string connectionString = null; OleDbConnection connection; OleDbCommand cmd = new OleDbCommand(); string sql = null; connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;data source=Book.mdb"; connection = …

Member Avatar for ogsirus
0
177
Member Avatar for a1a4a

I am on a visual basic mysql project Here is the code : [CODE]Imports MySql.Data.MySqlClient Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim conn As MySqlConnection conn = New MySqlConnection conn.ConnectionString = "server=db4free.net;Port=3306;user id=****; password=****; database=ume_corporation" conn.Open() Dim myadapter As New MySqlDataAdapter …

Member Avatar for AndreRet
0
107
Member Avatar for abugslife

hey guys! anyone have any ideas of how I can represent my data inside a listbox? i'm currently using sql to connect my database to the program. ive got this code [CODE] SQLiteConnection^ selectConnection = gcnew SQLiteConnection("Data Source=shoesDatabase.db3;"); int i = listBox1->SelectedIndex + 1; SQLiteCommand^ selectCommand = gcnew SQLiteCommand("SELECT * …

0
46
Member Avatar for ogsirus

Hi Guys need a bit of help. I right a c# program that connects to a database and do various things. One of them is to delete a record. currently I can delete a record that i specify but i want it to delete a selected row in the dataset. …

Member Avatar for ogsirus
0
187
Member Avatar for 54uydf

I'm having problems connecting to my SQL Server so I'm forced to work with my DB using dataset only. I need to make a report that if I could use a query would be something like this: SELECT id, name FROM tablePeople WHERE tablePeople.bornIn= USA; I wasn't able to use …

0
55
Member Avatar for davemac001

Hi, I am trying to create a user login that will allow three different types of users to login...basically an admin, a student and a co-ordiantor. At the moment i have any registered user logging in and being sent to the admin.aspx page, i am not entirely how to differentiate …

Member Avatar for davemac001
0
2K

The End.