Info Not Saving In A Database?
Apr 11, 2010
I created a database in access 2007, linked it to my project in visual studio 2008 (vb). When I enter some data using the UI, it does not save it in the database, and it's gone as soon as I run the program again. I dragged the textboxes from the datasource panel, onto the UI..
this is the code that was automatically generated by vs for the save button:
[code]Private Sub StaffBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StaffBindingNavigatorSaveItem.Click
[Code].....
View 2 Replies
ADVERTISEMENT
Jan 7, 2010
I'm making a database app. I've finish the search, add new, and add function. What I'm trying to do is to expand the functionality of the add new item function.
View 2 Replies
Jun 8, 2011
I have a database, and I am creating many forms that pull info from the db and write info to the db. I have a form that asks for a set of information. One of the box is a combobox that has a list of values. I have a button at the bottom
of the form that will allow the user to enter a new value to the values that populate the combobox if the user does not see the value they need. This will obviously populate a new form to create the new value.
I want the information on the first form to not be lost when the user hits the button to enter a new value for the combobox, yet I also want the combobox to display the new value.
Is there a way to save the information from the form and repopulate the form with the info the user entered? If I reload the form undoubtedly the form will repopulate the combobox and my new value will be there, since I have it reading and pulling info from the db on loading the form.
View 5 Replies
Dec 31, 2009
When the Users run my Program theres a tab in which you can type information,
I want them to beable to save it to an *.txt [Text File] and be able to Load it back
View 2 Replies
Jul 18, 2012
I have this form that i need to save on Mysql database but i'm stuck on what I should do.
This form needs to be done every 3 or 4 months. Every saved information stays saved in a row.
This form has alot of radiobuttons,textboxes and comboboxes that I save into mysql database But I also have a datagridview inside that form that needs to be saved as well , So here is where im stuck
I need to keep things simple and efficient. heres two example of what i can do but don't know what to use.
On MYSQL
Example 1:
-User1 Review 1-
Row1(review1) ----info--info---info---info---info----info---
Row2(review2) ----info--info---info---info---info----info---
Row3(review3) ----info--info---info---info---info----info---
[Code].....
View 1 Replies
Oct 25, 2010
I am currently working on saving some info and images. And i was looking at a game maker i used to use and it saved images as a "1rc" format. Is this custom? And can i save and load images as a "1rc" format?
View 2 Replies
Feb 23, 2012
I am trying to get my project to be able to save the data been input from a user. I have uploaded a screen shot of the dialog I am currently trying to use. You will see that I have got a combobox for member at the top. What I want is when the "new" button gets clicked then I can add the desired information then click "Ok buttton which will then save the information.
I want to be able to select members from the combobox after multiple have been recorded to be able to delete or edit them. I have got as far as "changing" the combobox to a textbox for input purposes. I have tried a few attempts to get it. I am getting "ConfigurationErrorsException was unhandled"
View 2 Replies
Nov 17, 2009
I'm making a program where the user fills out info, then they click one button and the program takes a screenshot of the form, then they click another button and the screenshot gets saved. I'm having a couple problems with my code though. For one, I'm trying to make the screenshot go to an invisible picturebox to make saving easier, but I cant figure out how to make the image go to the picturebox. The other problem is that I want it to automatically save without showing the dialog, but so far, it won't save.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TakeShotOfScreens()
Picturebox1.image=allscreenscapture
CODE:...........................
View 4 Replies
Jun 7, 2012
i am trying to make a login screen that is connect to a database(NOT MS ACCESS).i keep geting an error when i try geting it to conect to the database
"Value of type MySqlData.mySqlClient.MySqlDataReader cannot be converted to System.data.OleDb.OleDbDataReader
At rdr = MyCommand.ExecuteReader()
dose anyone know whats going on
[Code]...
View 2 Replies
Feb 15, 2010
I have 3 labels I want to populate with info from my database. I have a SELECT statement that works for only one piece of info but I need it to include the other 2 as well.
I have 3 labels: Current, YTD, and MTD My select statement is working for YTD but I don't know how to write the SELECT statement to include the others.
[Code]...
View 6 Replies
Mar 13, 2011
This code is correct...
Do While rdr.Read
issuebook.cbmember.Items.Add(rdr.Item("FName"))
Loop
Suppose i want to add both last and first name..I tried this but getting a error
Do While rdr.Read
issuebook.cbmember.Items.Add(rdr.Item("FName" & " " & "LName"))
Loop
View 4 Replies
Mar 13, 2011
I have selected the info that i want from my database but im unaware of the syntax need to be used to add them to the datagrid.The datagrid has the column...BookName, DateRetun and DateIssued.
cn.ConnectionString = "data source = RayonRayon; initial catalog = library; uid=sa; password=minnie"
cn.Open()
cmd.Connection = cn[codee]....
View 11 Replies
Feb 4, 2011
got a new problem while trying to add a new user into the database. After i've submitted all the data i get an error message saying "Conversion failed when converting the varchar value "Aron" to data type int" to be honest, im totally stumped as to what this could meen, does it meen its trying to convert string type data to an integer? Anyway heres the code im using
[Code]....
View 3 Replies
Jan 29, 2011
im trying to add a new user login to my database through my program, and i've got the procedure worked out, i just dont know how to retrieve the inputted data.
Basically i've got three text boxes that ask for "Name" "Password" "Phone Extension" but how would i work them into his statement?
CreateLogin.CommandText = ("INSERT INTO Users (UserID, Password, Phone) Values How would i follow up after "Values"??
View 7 Replies
Jun 1, 2012
I have a gridview with four template fields that I need to be able to put info into to save to the database. When I hit the edit button and my columns change into edit mode I can enter information just fine. But when I try to loop through the control to get the information it doesn't pick anything up?
Private Sub gvOLIAdj_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvOLIAdjst.RowEditing
gvOLIAdjst.EditIndex = e.NewEditIndex
BindData()
End Sub
Here is the update event that I have so far... any ideas? Am I just not doing this right?
Private Sub gvOLIAdj_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvOLIAdjst.RowUpdating
Dim dts As DataTable = DirectCast(Session("BudgetsTable"), DataTable)
Dim row As GridViewRow = gvOLIAdjst.Rows(e.RowIndex)
[Code]...
View 2 Replies
Jan 8, 2010
how do i get info from 2 different columns in an Access database and put them together in a drop down menu. (i know how to get data so that i can see it in just a textbox but i dont know how to put 2 data together and then display in a drop down.
another question is how do i save info that has been changed back into the access database i got it from
last question- how do i make a textbox only take numbers
View 9 Replies
May 4, 2010
I am working on a project for my final in vb.net and I have a weird error when I try to insert info into my database. When I run the application it errors out on command.ExecuteNonQuery()and the error is Syntax error in INSERT INTO statement. I have the fields in my database are set as text at 255 chars. I have both inmports statments at the top, and as far as I can tell my statement is right.
Here is my code.
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =../../Base/LogTextCopy.accdb;Persist Security Info=False;")
Dim StrSQL As String = "INSERT INTO TIMEANDDATE(DATE, TIME) values(@date, @time)"
Dim command As New OleDbCommand()
command.CommandText = StrSQL
[Code] .....
View 4 Replies
Apr 29, 2010
So I'm having more database problems. The specific problem I am having is that I am trying to update a DataGridView to display new information that was input into the database programmatically. I have tried several methods, but none have worked, and one actually "broke" the program. So I am in need of some more assistance.
Here is the current code that I am trying to use to update the view (this contains pretty much everything that I have tried up until this point):
[Code]...
View 3 Replies
May 1, 2011
How connect Vb.Net to MYSQL..? How to add info to database user informations using mysql database. How to call login infos using mysql.
View 8 Replies
Jan 11, 2009
I am just trying to get the information i collect from the pc's hostname and pass it into a db. All the db passwords, location etc are correct but i am getting nothing.
Imports System
Imports Microsoft.Win32
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Private Sub DB()
[Code] ......
View 14 Replies
May 9, 2012
I have been tasked by my boss to create an application that takes information from an excel database holding sales figures, margins, budgets etc calculates all the figures and exports the totalled values to a table and graph also in excel. Although this is fairly easy, there is some complications I am dealing with. In the database there are many territories, and each employee has 1 or more territories.I'm not sure what I have done wrong, however the totals are not adding up properly. My code is:
'Defines Excel Objects
Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objSheet As Excel.Worksheet
[code].....
View 3 Replies
Feb 5, 2011
I'm really new to any form of VB programming and I am trying to create a form which will allow me to take information from an attached database holding information on:
class names (i.e. Year6 Dragons)
Students names (i.e. Sarah Jessica Parker)
I want the design to look very similar to the form used in MS Access for the query wizard, which will allow me to choose a class and then specific students.
View 1 Replies
Jan 18, 2010
i am creating a booking system for my A2 project but i cant create tables or field in the database and enter information in them. I have created a ms access database in vb but after that im stuck. The database must be created in vb programatically as i get more marks for complex code.
here's my code
Imports ADOX
Module Module1
Sub Main()
[Code].....
View 3 Replies
Nov 17, 2009
What I am trying to do is get specific info from a database and what I am getting is the first entry.
I have made a database connection, made the top bar not visible and I have inserted a text box and multiple labels. My MDB database has 3 columns (street, city, postcode) and multiple rows.
What I want is when a user enters a postcode in the text field the other labels get the info related to it. I.E. when a user enters "FY1 3DL" the labels update to "King street" and "Blackpool". With the code below I get the first row from the database.
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.StreetsTableAdapter.Fill(Me.WcipcodeDataSet.Streets)
End Sub
View 1 Replies
Mar 15, 2009
When I insert a new record into my DB the same information gets two records not one. I am using A datatable and sqlcommand and sqlconnection and sqldataadapter and I'm using me.bindingcontext(datatable).position to move between records.
View 2 Replies
Aug 5, 2010
how to insert info into a database through textboxes on an asp page.
currently what I have to insert is this:
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim commandtxt As String
[Code].....
View 6 Replies
May 11, 2009
I am using the following SQL statement to retrieve information from an access 2003 database but this command keeps stripping out the proceeding 0 from the number of the month. The variable is called TBookingsDateFulldate
Dim sqlQuery As String = String.Format("SELECT [ID], [Date], [Zone], [Year], [Subject], [Teacher], [LessionID]" & _
" FROM tblBookings" & _
" WHERE (((tblBookings.[Date])={0})" & _
" AND ((tblBookings.[Zone])='{1}')" & _
" AND ((tblBookings.[Active])=0)" & _
" AND ((tblBookings.[LessionID])='{2}'));", TBookingsDateFull, TBookingZone, TBookingsTimes(B, 0))
View 1 Replies
Mar 24, 2010
Private Sub DisplayList(ByVal CusRef As Integer)
Dim ConnectionString As String
Dim SQLString As String
Dim TitleString As String
Dim conn As System.Data.OleDb.OleDbConnection
[Code]...
So that works, but how do I display multiple things, CustomerID & CustomerName on the same line?
I can't get it going, it only puts my CustomerName under the ID
View 2 Replies
Feb 15, 2012
just want to know how will i able to display the info description in my list view but the one that appears in the database is its id(using vb.net)
View 1 Replies
Feb 17, 2009
I'm writing a program in VB.Net and loading the info into a SQL database. Debugging it works fine on my machine that I am programming it on, it connects to the database and runs through all the info perfectly. However trying to get it to run on another machine it will not connect to the database. I realize the reason for this is the connection string, it's looking specifically at the file directory for the database. How do I change this so that it will function on any machine. The program is only intended to run on one machine at a time and not over the internet.
View 2 Replies