- Interests
- Technology
13 Posted Topics
Re: Here is an Example of Inserting Data to Database Using VB Net 2012: this code is placed inside my Add or submit button, and i got 4 other textboxes for the data to be added in my database Fullname, Username, Password and Confirm Password. 'write a record to the database … | |
Re: Rewriting in newer version, using code from old version and upgrade some feature is better than converting the old system to the latest. | |
Re: here is a sample code: Private Sub mainform_Load(sender As Object, e As EventArgs) Handles MyBase.Load cmd.Connection = conn cmd.CommandText = "SELECT MAX(ColumnName) FROM [db_Name].[dbo].[tbl_Name]" conn.Open() dr = cmd.ExecuteReader() Do While dr.Read() 'max value showing on the textbox x.Text = x.Text & dr.GetValue(0) & vbTab Loop dr.Close() conn.Close() End Sub btw, … | |
i have listview named : listview1 and a button to export listview data presented. all i want is to export that data to an excel probably to edit or print them. Is there anyone can help me about it? i had gone into but still cant find exactly what I … | |
How to pass Listview contents to a crystal report for printing purposes using VB net..? i got 1 listview which shows the results of some queries. Now my problem is how can i pass those data in my listview to the crystal report? | |
I need help about this, I've been working for this a quiet while... I want to log-in using one login form for both admin and normal user but after log in, some of its form and/or buttons in the form should not be available for normal users. here is my … | |
Re: I used this code in getting max number of records in my database hope you got an idea with this: Private Sub mainform_Load(sender As Object, e As EventArgs) Handles MyBase.Load cmd.Connection = conn cmd.CommandText = "SELECT MAX(ColumnName) FROM [databaseName].[dbo].[tableName]" conn.Open() dr = cmd.ExecuteReader() Do While dr.Read() x.Text = x.Text & … | |
Re: Kindly check if the datatype length on your database can handle the number of characters you entered on your textboxes... To avoid such error, go to your textbox properties and set the Max length of your textbox not exceeding the length set on your database. | |
Re: hope this helps, i used to put this on my edit button BUT mine is listview and your is datagrid..... Private Sub edit_Click(sender As Object, e As EventArgs) Handles edit.Click editForm.Show() If Not Listview1.SelectedItems.Count = 0 Then '// check if item is selected. With Listview1.SelectedItems.Item(0) editForm.x.Text = .Text '// column … | |
Re: Save button codes: Private Sub save_Click(sender As Object, e As EventArgs) Handles save.Click cmd.Connection = conn cmd.CommandText = "INSERT INTO [databasename].[dbo].[tableName] VALUES ('" & TextBox1.Text & "', '" & TextBox2.Text & "', '" & TextBox3.Text & "', '" & TextBox4.Text & "', '" & TextBox5.Text & "', '" & TextBox6.Text … | |
Re: Hi, we got same problem but then found no exact answer and so I switched to listview instead of datagridview. I will just show you how I programmed my edit button for my listview data after clicking specific data to be edited, and show it on my textboxes in other … | |
Re: Hi nosfa, are you trying to view your data in a listview table or in textboxes? You may use queries attached on your searchbox like: Dim sql = "SELECT UName,Password FROM [databaseName].[dbo].[tableName] WHERE UName = '" & TextBox1.Text & "' AND Password = '" & TextBox2.Text & "'" | |
Re: Your Vb must be connected to your database to get the exact connectionstring... IF not yet: On your VB studio window click *View ->ServerExplorer* (or Ctrl+Alt+S) then click *connect to database . *Then fill in your server name and on the option stating to *connect to a database -> select … |
The End.