Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8332851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:50:22+00:00 2026-06-09T02:50:22+00:00

I am created a journal program for an internship project and I am using

  • 0

I am created a journal program for an internship project and I am using a MS-Access Database. I am programming in VB.net. Now, I am trying to make it so that they can “Update” their journals, meaning that they click on their calendar date and it brings them to that journal if they have one for that date. If they have one for that date then it shows the title and journal text entry for that date. I want to make it so that any changes they have made to the journal (editing the textbox fields) are also changed in the database when they click the update button. Here’s what i have so far

    Private Sub COE_JournalBtn_Click(sender As System.Object, e As System.EventArgs) Handles COE_JournalBtn.Click

    If DateTimePicker1.Value <> Nothing Then

        If TitleTxt.Text <> "" Then

            If JournalTextRtxt.Text <> "" Then

                myConnection.Open()

                Dim DatePicked As String = DateTimePicker1.Value
                Dim cmd As OleDbCommand
                Dim str As String

                Try

                    MyJournalTitle = TitleTxt.Text
                    MyJournalText = JournalTextRtxt.Text

                    str = "UPDATE Journals SET JournalTitle='" & MyJournalTitle & "', JournalText='" & MyJournalText & "' WHERE JournalDate=" & DatePicked

                    cmd = New OleDbCommand(str, myConnection)

                    cmd.ExecuteNonQuery()

                    myConnection.Close()

                Catch ex As Exception

                    MessageBox.Show("There was an error processing your request. Please try again." & vbCrLf & vbCrLf & _
                                    "Original Error:" & vbCrLf & vbCrLf & ex.ToString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

                    myConnection.Close()

                End Try

                myConnection.Close()

            End If

        End If

    End If

End Sub

Now my update string by itself is

"UPDATE Journals SET JournalTitle='" & MyJournalTitle & "', JournalText='" & MyJournalText & "' WHERE JournalDate=" & DatePicked

Now, what happens, is absolutely nothing. No errorboxes come up. No messageboxes appear. The program doesn’t freeze. And the database remains unchanged. What am I doing wrong? Is there an error in my code or something missing? Please help me because I really want to figure this out and i’ve been looking everywhere for a solution in VB.net and cannot find one that applies to me being that I am using MS-Access and NOT SQL.

Thanks in advance,
Richard Paulicelli

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:50:24+00:00Added an answer on June 9, 2026 at 2:50 am

    You may have a problem with this part of your UPDATE statement:

    "' WHERE JournalDate=" & DatePicked
    

    If the Journals field, JournalDate, is Date/Time data type, surround the date string value with Access date delimiter characters (#).

    "' WHERE JournalDate=#" & DatePicked & "#"
    

    You can also convert your date string to yyyy-mm-dd format to avoid misinterpreting the date literal based on local.

    I agree with the suggestions to use a parameter query for this instead. I’m just trying to help you understand why the original attempt may have failed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the System.data.sqlite.dll in my vb.net program. And for the life of
How do I unit test that the journal entry was created correctly (added to
I've created a database for the iphone using sqlite and the fmdb wrapper. The
Created .NET WCF service, tested it - works. Generated schemas from Data and service
Created an OpenGraph action and object. Trying to submit my action. When I click
I created a python server on port 8000 using python -m SimpleHTTPServer . When
I created a PHP Drop Down which is populated from a MySql Database and
I am using a SQLite database to store values from a data logger. The
I understand that you can make range queries on column names. Example: Get all
Created a new Android project. Added the library (https://github.com/johannilsson/android-actionbar) for instructions http://www.jetbrains.com/idea/webhelp/sharing-android-source-code-and-resources-using-library-projects.html . In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.