
Talk2Tom11
Avatar/Signature-
Posts
146 -
Joined
-
Last visited
About Talk2Tom11
- Birthday 06/25/1985
Personal Information
-
Occupation
Pre-Med Student
-
Visual Studio .NET Version
Visual Basic .Net 2003
-
.NET Preferred Language
VB .Net
Talk2Tom11's Achievements
Newbie (1/14)
0
Reputation
-
I am wondering if anyone can direct me to a free control that is an xp style menu. I am trying to make my application have more of an xp look and feel and the regular menubar is not doing it. i am using vb.net 2003 Thanx :)
-
Error when updating access record
Talk2Tom11 replied to Talk2Tom11's topic in Database / XML / Reporting
When I have this as my code it works fine.... but Function GetInsertSQL() Dim a As Integer txtBoxNew.Text = txtBoxTotal.Text - txtAmount.Text Dim SQL As String Dim Q As String = Chr(34) SQL = "UPDATE Products SET TotalAmount = " & Trim(txtBoxNew.Text) & " WHERE ProductName = '" + cboxCat.Text + "'" Return SQL End Function but i want to add txtboxtotal and txtAmount.... when I do that.. it makes them strings and then gives me an error -
Error when updating access record
Talk2Tom11 replied to Talk2Tom11's topic in Database / XML / Reporting
How would i go about that? -
I am trying to update a record in an access database. and I am getting the following error... argument 'Prompt' cannot be converted to type 'String' My SQL statement is as the following: SQL = "UPDATE Products SET TotalAmount = " & Trim(txtBoxTotal.Text) & ", Edited = '" & Trim(a) & "' WHERE ProductName = '" & cBoxCat.Text & "'" the variable a = DataTime.Now.ToShortDateString if someone knows what i am doing wrong please help.
-
How would I go about that?
-
When i go to update a record using VB.net for a database in access I am getting the following error... "Argument 'Prompt' cannot be converted to type 'String'." when my SQL statement is as follows it works fine... SQL = "UPDATE Products SET TotalAmount = 1234 WHERE ProductName= ' " + cbocCat.text + " ' " But i want to replace the totalAmount with a variable from the form. So i changed the SQL statement to the following... SQL = "UPDATE Products SET TotalAmount =" + txtAmount.text + "WHERE ProductName= ' " + cbocCat.text + " ' " I was wondering if anyone knew why I am receiving this error. If anyone has and Idea place post.
-
ok i have a listbox with a few rows of data. I am having the data be read as a string into a word document. I want to be able to read the whole listbox as a string. So far I have only been able to get it to read one line. This is the code i used for that... listbox1.SelectedItem. Is there anyway to have it use the whole thing and not just one selected item???
-
I am writing an inventory application that uses MS access as a backend. I am having no problems accessing and obtaining information from the database through my program except in one spot. This is the code: Dim Pro As New OleDb.OleDbCommand Dim Read2 As OleDb.OleDbDataReader Dim Con3 As New OleDb.OleDbConnection Dim ID3 As New OleDb.OleDbCommand Private Sub CmbBoxProducts_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbBoxProducts.SelectedIndexChanged Con3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\subdir\database.mdb;Mode=ReadWrite;Persist Security Info=False" If txtBoxWatch.text = "Product" Then ID3.Parameters.Add("Product", Data.OleDb.OleDbType.Variant) ID3.Parameters("Product").Value = CmbBoxProducts.Text Con3.Open() Read = ID3.ExecuteReader() With Read While .Read txtBoxAmount.Items.Add(.GetValue(1)) End While End With Con3.Close() End If End Sub The error i am receiving is: ExecuteReader: Connection property has not been initialized.
-
I am trying to debug a project in Visual Basic .NET 2003. This has worked before. I recently installed Visual Studio 2005. That one works fine. But now when i go to debug an project in 2003 i get this error message. Error while trying to run project: Unable to start debugging. The debugger is not properly installed. Run setup to install or repair the debugger. If anyone can help it would be much appreciated.
-
How do I make a comboBox ReadOnly... I only want the user to be able to choose from the drop down not write in their own stuff.
-
Yes... that is exactly what i was looking for... thank you :cool:
-
I have a textboxdate with a string value in it... the string is going to be a date... for example '9/17/2006'. I want to make another combobox equal to that day plus the next. I know how to do it like this... txtbox1.text = DateTime.Now.ToShortDateString combobox1.items.add(DateTime.Now.AddDays(1).ToShortDateString) but i want to not do it off of todays date but whatever date is in the textboxdate.
-
When i use the query in mySQL directly it produces the right solution... it shows one column. stid is of type integer. How would i go about make that change that you mentioned last?
-
locationd = My.Settings.location.ToString password = My.Settings.password.ToString Dim myconnectionString As String myconnectionString = "Database=test;Data Source=" + locationd + ";User Id=root;Password=" + password Dim mySelectQuery As String = "SELECT guest.id, guest.lastname, guest.firstname FROM guest, student, trans WHERE trans.stid =" + txtBoxID.Text Dim myConnection As New MySqlConnection(myconnectionString) Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) myConnection.Open() Dim myReader As MySqlDataReader myReader = myCommand.ExecuteReader() ' Always call Read before accessing data. While myReader.Read() 'ProgressBar1.Value = ProgressBar1.Value + 5 ListBox1.Items.Add(myReader.GetString(0) + ": " + myReader.GetString(1) + ", " + myReader.GetString(2)) End While ' always call Close when done reading. myReader.Close() ' Close the connection when done with it. myConnection.Close()
-
I am reading information from a mysql database into a listbox. The query that i have should only return one column from the database. But when displayed in the listbox that same column is written 4 times. this is my code for the listbox... While myReader.Read() 'ProgressBar1.Value = ProgressBar1.Value + 5 ListBox2.Items.Add(myReader.GetString(0) + ": " + myReader.GetString(1) + ", " + myReader.GetString(2)) End While Does anyone know why this would display the same thing 4 times??? When i run the same query through mysql directly... it comes out right but only when doing it through VB is multiplies