Solved

Updation query in VB.net

Posted on 2006-07-13
1
329 Views
Last Modified: 2010-04-23
Hello experts I am working on an application where I update the MsAccess database by coding. Now I am stuck with minor error but i did't able to rectify.
please tell me what's wrong in this code
Private Sub updateAppNote()
        If AppConn.State.ToString = "Closed" Then
            AppConn.Open()
        End If
       
        Dim SQL As String = "UPDATE Applicant_Note " & _
        "set Time_Stamp='" & Now.ToShortDateString & " " & Now.ToShortTimeString & "', Note='" & txtnote.txt  & _
        "' Where NID=" & CLng(dgvNoteList.CurrentRow.Cells(0).Value)

        MsgBox(SQL)
        Dim Dc As New OleDbCommand(SQL, AppConn)
        Dc.ExecuteNonQuery()
        AppConn.Close()
0
Comment
Question by:EmmanuelNwokedi
1 Comment
 
LVL 6

Accepted Solution

by:
manch earned 50 total points
ID: 17099342
what is the error or err msg if u can wrie it

use the

Try

Catch

End Try

Block with the code the and give the Message it is showing.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Limiting string to two deciamls 18 50
VB.Net - CSV to Oracle table 4 52
Protecting vb6 & .Net code Obfuscation 18 96
Help with Syntax 9 28
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now