473,408 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Error while executing query from VB.Net

Hi All,
I am trying to execute a query from my VB.Net application but it throwing an error as "Syntax error in update statement".
The query is:-
Dim UpdQuery As String = "Update tblDefectData set DefectDesc= '" & rtbDefectDesc.Text & "' ,Module= '" & cbModule.Text & "' where DefectId= " & txtDefectId.Text

DB is MS-Access.
What is wrong with this query??

Thanks in advance.
Hussain
Jul 20 '07 #1
2 1466
Plater
7,872 Expert 4TB
Hmm that all looks correct.
I would debug and see what the ACTUAL string is becoming
(like maybe one of those boxes is empty and it's messing with SQL)
So set a breakpoint after that string gets populated with the values from the textboxes and see if you see any errors.
Also, are you checking and trapping any illegal characters in those values?
Jul 20 '07 #2
Thanks!!!!!!!!!!!

Hussain.
Jul 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: David Berry | last post by:
Hi All. I have a SQL Statement on an ASP page that only returns 4 records. When I run it in SQL Server or Query Analyzer it runs in less than a second. When I run it from my ASP page I get: ...
3
by: Dean g | last post by:
Hi, I have a problem with running multiple sql statements using asp. Basically if there is an error with any of the statements inside the query a rollback is done. the sql and rollback work fine,...
4
by: Bryan Tang | last post by:
I built an ASP to search the content in index server. It is ok if search in English. Whenever I search in Chinese, I will got the following error message, CreateRecordset ?u?~ '80004005' ...
2
by: Mal | last post by:
Greetings. I have a perplexing problem....please help. I am having a problem with an insert query. (SQL below) When I run the query via code (executing the SQL string) it crashes Access and...
3
by: Pravin A. Sable | last post by:
Dear All I am trying to execute following cod Sub SubmitBtn_Click(ByVal Sender As Object, ByVal E As EventArgs Dim DBConn As OleDbConnectio Dim DBInsert As New OleDbComman DBConn = New...
1
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
2
ak1dnar
by: ak1dnar | last post by:
Hi, I am getting some sql errors when trying to insert a record to mysql table using asp.net application. Let me explain the scenario for your reference. This asp.net web form is executing...
0
by: hi4murali | last post by:
Facing a strange error in MS SQL Management Studio 2005, when trying to open a new query window, open a table to view data or even run and existing SQL query file. The error text is: An error...
1
by: Roger Trask | last post by:
Web Server: IIS6 PHP Version: 5.2.5 Database: MS SQLEXPRESS 2005 Loaded PDO Drivers: MSSQL, MySQL, ODBC When executing the following script ($dbName, $username, $pw, $myDSN have been changed in...
15
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. This is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.