I've a DataGrid Control in my application and a button. When i click a button it should display the contents of the Logins table in the DataGrid. For this I've coded the following, but its giving me an error "Rowset is not bookmarkable.". I've searched a lot, many suggestions include changing Recordset cursor type and cursor location. But those suggestions don't solve my problem.. thanks..!! My Code :: Private Sub OpenConnection() Set dbConnection = New ADODB.Connection dbConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & "G:\ShopManProject\" & "dbShopMan.mdb" dbConnection.Open Set dbCommand = New ADODB.Command Set dbCommand.ActiveConnection = dbConnection dbCommand.CommandType = adCmdText End …

Member Avatar
Member Avatar
+0 forum 3

I need to update my Microsoft Access database 2003 from my server automatically. but i don't have any idea how to do it. Please help i really need this for my thesis. Thanks!

Member Avatar
Member Avatar
+0 forum 2

i have a table employee. it has various attributes.(e_id,e_name,e_addr..) i have a data grid that displays all d values of employee..i need to now select multiple rows from the datagrid of employee such that only e_id gets inserted into another table. is there an sql or vb code that can help me do this??

Member Avatar
Member Avatar
+0 forum 3

Here is a picture of a form. http://postimage.org/image/a813nony5/ Please help: I have a form with: - 4 textboxes (textbox 11,21,311 & 41) - 4 buttons (add, delete, save, refresh) - 1 DataGridView (MS Access database connected) - 1 filter to filter the data through DatagridView Here is the story: When I use buttons to navigate the database, I have to click ten times on button "Next" to go to the tenth record. Code for that is: (...) BindingContext(DatasetTelefonija1, "Telefoni").Position = BindingContext(DatasetTelefonija1, "Telefoni").Position + 1 (...) What if I have onehundred records? So, I explored the internet and made another code: …

Member Avatar
Member Avatar
+0 forum 3

how can i view record from my mysql database in datagridview and update or delete it? can you guys help me? please share your codes. thanks in advance.

Member Avatar
Member Avatar
+0 forum 8

Hi how can I print a new document for each datarow in my datagridview?. I have the PrintDocument procedures separately. Thanks in advance

Member Avatar
+0 forum 0

Hi, I'm trying to export data from excel sheet to my grid, I'm using the foll code, but I get an error at DataGridView1.Rows.Add(), saying rows cannot be added programmatically. Private Sub btnexport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexport.Click Dim xlsApp As Microsoft.Office.Interop.Excel.Application Dim xlsbook As Microsoft.Office.Interop.Excel.Workbook Dim xlsSheet As Microsoft.Office.Interop.Excel.Worksheet Dim m_Rw As Integer Dim i As Integer Dim j As Integer xlsApp = CreateObject("Excel.Application") xlsApp.Workbooks.Open("C:\Users\finance and accounts\Desktop\sample.xlsx") xlsbook = xlsApp.ActiveWorkbook xlsSheet = xlsbook.Sheets(1) ' insert column headers... 'DataGridView1.ColumnCount = xlsSheet.UsedRange.Columns.Count 'DataGridView1.ColumnHeadersVisible = True For i = 0 To xlsSheet.UsedRange.Columns.Count - 1 DataGridView1.Columns(i).Name = xlsSheet.Cells(1, i …

Member Avatar
Member Avatar
+0 forum 3

OK friends, so I need your advice. I'm reprogramming another web app that was originally written in .Net 1.1. The page I am working on looks like simple GridView with select, update and delete enabled. But it isn't so simple. In the code I have 10, yes 10 calls to the database. 5 sets of 2 nested DataReaders. All of this data is read and used in calculations, then to populate said table one cell at a time. Example: Table MyTable = new Table(); MyTable.BorderWidth = 1; MyTable.BorderColor = Color.Gray; TableRow rowx = new TableRow(); TableRow row3 = new TableRow(); …

Member Avatar
Member Avatar
+0 forum 1

iam using vb 2010 and i want to search for any record when i enter a text in the search text box. i mean, if my records are as follows: dan,daniel,edn,steven,mary. and i just inpunt 'd' in the search box, the datagrid lists: dan,daniel,edn because they have a 'd' in them. my code is as follows. Sub search() Dim objConn As New MySqlConnection Dim objCmd As New MySqlCommand Dim strConnString,strSQL As String strConnString = "Server=localhost;User Id=root; Password=root; Database=mydatabase; Pooling=false" strSQL = "SELECT * FROM donationtype WHERE firstName like '%" & strKeyWord &"'" objConn.ConnectionString = strConnString With objCmd .Connection = objConn …

Member Avatar
Member Avatar
+0 forum 13

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() For j As Integer = 0 To DataGridView1.RowCount - 1 If DataGridView1.Rows(j).Cells(1).Value = "Lab" Then DataGridView1.Rows(j).Cells(2).Value = ds.Tables("fees").Rows(j).Item(2) End If Next End Sub when i run the above code in VB.net it shows that "There is no row at position 0."

Member Avatar
Member Avatar
+0 forum 3

i have a datagridview in my vb.net form displaying data from ms access file A , table A , is it possible for me to export the data in the data gridview to ms access file A table B?? i'm not using sql.

Member Avatar
Member Avatar
+0 forum 3

hello ! i am working on a simple grid , i create 3 columns name , A B C , manually , now i have a table having three fields A B C , i want to show Rec A in A col , B in B Col and C in C Col. but when i give datasource to my grid , it shows 6 columns , please guid me iin this . Regards

Member Avatar
Member Avatar
+0 forum 1

Hello, Please tell me how to use datagrid in C# windows application? How to use other controls like textbox, checkbox and combobox in datagrind and populate it from database. Thanks VIMIT

Member Avatar
Member Avatar
+0 forum 2

In sql server , my query brings out more than one row of data SELECT * FROM TABLE 1 WHERE COLUMN LIKE 'PARAMETER' Now i am trying to make it in a dtagrid that the datagrid shows allpossible rows that is supposed to show .This is the code Dim objCommand As New SqlCommand("SELECT * FROM Pricelist WHERE [SECURITY] ='" & Me.cboCompany.SelectedItem & "'", objConnection) Dim Reader As SqlDataReader = objCommand.ExecuteReader() While Reader.Read Me.dtgCompanyPriceList.Rows(0).Cells(0).Value = Reader("COMPANY ID").ToString Me.dtgCompanyPriceList.Rows(0).Cells(1).Value = Reader("SYMBOL").ToString Me.dtgCompanyPriceList.Rows(0).Cells(2).Value = Reader("SECURITY").ToString Me.dtgCompanyPriceList.Rows(0).Cells(3).Value = Reader("OPENING PRICE").ToString Me.dtgCompanyPriceList.Rows(0).Cells(4).Value = Reader("CLOSING PRICE").ToString Me.dtgCompanyPriceList.Rows(0).Cells(5).Value = Reader("PUBDATE").ToString Me.dtgCompanyPriceList.Rows(0).Cells(6).Value = Reader("DESCRIPTION").ToString End While Reader.Close() objCommand.Dispose() …

Member Avatar
Member Avatar
+0 forum 2

I have a problem trying to link my my datagrid view to my sql server stored procedure. The way it should work is that when I select an item in a list from my combo box it returns a set of rows on the datagrid view specific only to that item . This is the code on the server side `CREATE PROCEDURE spCompanySearch @Comp VARCHAR(50) AS BEGIN SELECT * FROM Company WHERE [COMPANY NAME] LIKE '%' + @Comp + '%'' END ` The @comp is supposed to be each item in the combobox list but I don't know how to …

Member Avatar
Member Avatar
+0 forum 6

Any way I can populate a datagrid in vb.net with the ff xml data. ` <?xml version="1.0" encoding="utf-8"?> <pricelist> <item> <symbol>7UP</symbol> <security>7-UP BOTTLING PLC</security> <opening price>41.75</opening price> <closing price>41.75</closing price> <description>Symbol:7UP, Security:7-UP BOTTLING PLC, Opening price:41.75, Closing price:41.75</description> <pubDate>Sun, 15 Apr 2012 01:00:10 GMT</pubDate> </item> <item> <symbol>AGLEVENT</symbol> <security>A.G.LEVENTIS(NIGERIA) PLC</security> <opening price>1.44</opening price> <closing price>1.44</closing price> <description>Symbol:AGLEVENT, Security:A.G.LEVENTIS(NIGERIA) PLC, Opening price:1.44, Closing price:1.44</description> <pubDate>Sun, 15 Apr 2012 01:00:10 GMT</pubDate> </item> </pricelist> any help will be appreciated. Thank you

Member Avatar
Member Avatar
+0 forum 7

can any body help me by giving me a guideline on how to insert data from a populated datagrid into sql server table and how to make the values conform to the specified datatypes constructe in the sql server side...assuming the datagrid headings have already been created in the sql server side. Thanks.

Member Avatar
Member Avatar
+0 forum 6

Hi All, I know this may seam odd but I'm getting an error navigating through a datagrid of an invalid cast. The trouble is it is of the same types!! I working on customising some Sage code and in the form there is a datagrid that is populated by a series of Sage.Accounting.Stock.TraceableSOPAllocationItems (a batched stock item allocated to an SOP). I want to give the user some further information on each item so they can decide which batch and bin to use. I want to go through each item in the grid and then go find this extra information …

Member Avatar
Member Avatar
+0 forum 4

dear friends following is the code for export data from data grid to excel .. problem which i m facing that .. i could not export the last coloum values.. kindly give sulotion.. `Inline Code Example Here` Private Sub btnExcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExcel.Click Dim rowsTotal, colsTotal As Short Dim I, j, iC As Short System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor Dim xlApp As New excel.Application Try Dim excelBook As excel.Workbook = xlApp.Workbooks.Add Dim excelWorksheet As excel.Worksheet = CType(excelBook.Worksheets(1), excel.Worksheet) xlApp.Visible = True rowsTotal = DataGridView1.RowCount - 1 colsTotal = DataGridView1.Columns.Count - 1 With excelWorksheet .Cells.Select() .Cells.Delete() For …

Member Avatar
Member Avatar
+0 forum 1

Hey guys, i need to know if i can find a FREE excel like datagrid that will allow inline editing and has drop down boxes for some fields. Also filed may be able to collect their default data from a session variable. I have tried this: [url]http://azgtech.wordpress.com/2010/08/01/jqgrid-php-datagrid/[/url] Thanks, Marais

Member Avatar
Member Avatar
+0 forum 6

Hi, I am creating a form application that should display information from one dataset into individual textboxes (ie. system name, system id, location name, location id). The textboxes populate upon the selection of a pair of cascading combo boxes. So, the user first selects a system name from the first combobox, then that selection will populate the second combo box for the locations of that system. (This means that each system may have more than one location.) Once the location is selected, each of the 4 textbox should populate with the corresponding data but I'm not quite sure how to …

Member Avatar
Member Avatar
+0 forum 5

hi i'm a beguiner in visual basic i have a datagrid view filled with a dataset table thats combined by 2 tables 1-persons 2- actions i want to select a row in the grid view and get the person table where personid is selected in datagridview i assume that it is pretty simple but i can't get it thanks

Member Avatar
Member Avatar
+0 forum 6

In a data grid, I have a data grid with a column like this: [CODE]Dim colAdd As New HeaderAndDataAlignColumn With colAdd .MappingName = "Address" .HeaderText = "Nationality" .Width = 150 .Alignment = HorizontalAlignment.Center .TextBox.Enabled = False .ReadOnly = True .NullText = "" End With[/CODE] How can I disable this column entirely, I mean even disable focus event (can't click, can't use Tab or arrow keys, etc.)

Member Avatar
Member Avatar
+0 forum 3

I have a DataGrid table like this: [img]http://ni8.upanh.com/b1.s24.d1/f869170161faa9e6ad2c272d6f66228e_40513398.capture.png[/img] How could I change the plain-looking arrows in the RowHeader into row number (Like 1,2,3...)??? Thanks for any help from you guys!

Member Avatar
Member Avatar
+0 forum 4

Hi, I'm creating a form application using vb. I'm still new to this and I'm teaching myself via the internet so please don't be too mean. I wrote my code using queries that I created in visual studio. I don't quite remember how to create an update query and write the code to update different datagrids. I tried searching the forums, and I can't find anything that fits into the way I wrote my code. I have an update button that I want to use to save all the edited data in the form. Here's my code so far: [CODE]Public …

Member Avatar
Member Avatar
+0 forum 2

Hi friends., Actually I use datagrid to show my result from XML file.I load my data from XML file easily.But i need Sorting method for that and i don`t know how to solve it Please give me solution for that My code is [CODE] Imports System.Data Imports System.Xml Imports System.IO.StringReader Partial Class _Default Inherits System.Web.UI.Page Dim ds As DataSet = New DataSet Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IsPostBack = False Then Dim dataset As DataSet = New DataSet() dataset.ReadXml(Server.MapPath("~\book.xml")) bookgrid.DataSource = dataset bookgrid.DataBind() End If End Sub Protected Sub bookgrid_SelectedIndexChanged(sender As Object, …

Member Avatar
Member Avatar
-1 forum 6

Hello This is my first post so I’m sorry if I ramble and don’t explain my issue clearly. I am binding a dataset (dsTest) with a table called “TempResult” to a datagrid (DatagridView1). The purpose of the datagrid is to display test labels (set elsewhere in the software) and to allow the user to enter results into an empty column titled results. To achieve this I’ve filled the dataset with the required test labels then added a column called “Result” with a default value of 0.00. The user can enter numbers into the “Result” column on the grid then click …

Member Avatar
Member Avatar
+0 forum 1

Hi all, I have been messing around with datagrid styling for a couple of days now, and I am having one issue left which I can not seem to solve. I want to highligt the text of the row on which I hover with the mouse. Well this seems like an easy task, but at the same time I want custom selection color of the row background and foreground. This combination seems impossible for me to solve. If I override the datagridrow style I can get everything but the selection style on the row. If I also override the datagridcell …

Member Avatar
Member Avatar
+0 forum 1

Guys I need help. I am doing a system (project) entitled “Automatic Examination Scheduling System”. This system as it stressed in its title, aim to automate the assigning of proctors, rooms and times to subjects. So it must be triggered with only one button all at once. I have tables in my database named Subject, Professor (as proctors) and Room. I am having a trouble as of assigning a proctor to a subject. Here is what I’ve done: [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click Dim connect As New ADODB.Connection Dim rs As New ADODB.Recordset …

Member Avatar
+0 forum 0

First, I did search the forum and I found a few topics about this but none of the information seemed to be applicable to what I'm doing. Anyways. What I'm working on now is a basic telephone directory. a Directory text file contains the names of all of the subdirectories. The subdirectory files contain the names and numbers of all of the students/employees etc. Anyways. I've actually completed the program itself I just need to get the output formatted properly. Which leaves me with my problem. I want to output the data to some sort of grid. I'm going to …

Member Avatar
Member Avatar
+0 forum 1

The End.