When I run this code to update my database -
Set AdVehDecp = New ADODB.Connection
-
Set RsVehDecp = New ADODB.Recordset
-
AdVehDecp.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\VEHICLE_TRACKER.mdb;"
-
AdVehDecp.Open
-
AdVehDecp.CursorLocation = adUseClient
-
RsVehDecp.Open "SELECT * FROM qryVehSearch;", AdVehDecp, adOpenDynamic, adLockPessimistic
-
VehNo = Text1(4).Text
-
StrSql = "UPDATE tblVEHLIC SET dtmVLISS = '" & Text2(0).Text & "', dtmVLEXP = '" & Text2(1).Text & "'" _
-
& "WHERE txtVEHNO = " & VehNo & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblHPERT SET dtmHPISS = '" & Text2(2).Text & "', dtmHPEXP = '" & Text2(3).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblRDWORTH SET dtmRWISS = '" & Text2(4).Text & "', dtmRWEXP = '" & Text2(5).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblINSCERT SET dtmICISS = '" & Text2(6).Text & "', dtmICEXP = '" & Text2(7).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblMBADVT SET dtmMAISS = '" & Text2(8).Text & "', dtmMAEXP = '" & Text2(9).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblHDUTY SET dtmHDISS = '" & Text2(10).Text & "', dtmHDEXP = '" & Text2(11).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
RsVehDecp.Requery
-
CheckDt
-
it gives me an error
RUN-TIME ERROR '-2147217904(8004 0E10)';
NO VALUE GIVEN FOR 1 OR MORE REQUIRED PARAMETER.
Pls which parameter does it require?
11 1514
When I run this code to update my database -
Set AdVehDecp = New ADODB.Connection
-
Set RsVehDecp = New ADODB.Recordset
-
AdVehDecp.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\VEHICLE_TRACKER.mdb;"
-
AdVehDecp.Open
-
AdVehDecp.CursorLocation = adUseClient
-
RsVehDecp.Open "SELECT * FROM qryVehSearch;", AdVehDecp, adOpenDynamic, adLockPessimistic
-
VehNo = Text1(4).Text
-
StrSql = "UPDATE tblVEHLIC SET dtmVLISS = '" & Text2(0).Text & "', dtmVLEXP = '" & Text2(1).Text & "'" _
-
& "WHERE txtVEHNO = " & VehNo & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblHPERT SET dtmHPISS = '" & Text2(2).Text & "', dtmHPEXP = '" & Text2(3).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblRDWORTH SET dtmRWISS = '" & Text2(4).Text & "', dtmRWEXP = '" & Text2(5).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblINSCERT SET dtmICISS = '" & Text2(6).Text & "', dtmICEXP = '" & Text2(7).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblMBADVT SET dtmMAISS = '" & Text2(8).Text & "', dtmMAEXP = '" & Text2(9).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
StrSql = "UPDATE tblHDUTY SET dtmHDISS = '" & Text2(10).Text & "', dtmHDEXP = '" & Text2(11).Text & "'" _
-
& "WHERE txtVEHNO = " & RsVehDecp("txtVEHNO") & ";"
-
AdVehDecp.Execute StrSql
-
RsVehDecp.Requery
-
CheckDt
-
it gives me an error
RUN-TIME ERROR '-2147217904(8004 0E10)';
NO VALUE GIVEN FOR 1 OR MORE REQUIRED PARAMETER.
Pls which parameter does it require?
Hi you need to debug this code and let it run line by line until you get the error. Then, at least, you will know which statement is causing the problem.
Hi you need to debug this code and let it run line by line until you get the error. Then, at least, you will know which statement is causing the problem.
Sorry, I forgot to state that. The error was coming from the first line of
AdVehDecp.Execu te StrSql
Dont quote me on this, as i cant check it as imnot on my main machine. but whereyou are using
AdVehDecp.Execu te StrSql
try this
AdVehDecp.Execu te StrSql, , AdCmdText.
ADO isnt my big thing, but whenever i use the execute command i put for example
set rs = AdVehDecp.Execu te(StrSql, , AdCmdText)
or
AdVehDecp.Execu te StrSql, , AdCmdText
just a suggestion,
Kind Regards
Devon.
Please ignroe the above post, i completely msread the code and i apologise for any misleading i have caused. i will look again when i ave a little more time on my main machine, i have requested removal of the above post as i believe it has no relevance to what you are trying to do.
i will say though i only get that error when i have data missing from one of the fields in the error
ill do a quick debug here -
original
-
StrSql = "UPDATE tblVEHLIC SET dtmVLISS = '" & Text2(0).Text & "', dtmVLEXP = '" & Text2(1).Text & "'" _
-
& "WHERE txtVEHNO = " & VehNo & ";"
-
-
-
i believe it is to do with this
-
& "WHERE txtVEHNO = " & VehNo & ";"
-
-
you are missing you ' symbols.
-
& "WHERE txtVEHNO = '" & VehNo & "';"
-
Sorry again bout the previous post
Kind Regards
Devon
Sorry, I forgot to state that. The error was coming from the first line of
AdVehDecp.Execu te StrSql
What type of variable is VehNo
What type of variable is VehNo
Either way, if you are going to use " & VarName & " in an sql statemet
you have to put the ' symbols
strSql = "Blah blahblah WHERE blah='" & Variable & "'"
Kind Regards
Devon.
also im not sure if you need the ; at the end of your statment like you have here
StrSql = "UPDATE tblVEHLIC SET dtmVLISS = '" & Text2(0).Text & "', dtmVLEXP = '" & Text2(1).Text & "'" _
& "WHERE txtVEHNO = " & VehNo & ";"
try replacing you sql statment with this
StrSql = "UPDATE tblVEHLIC SET dtmVLISS = '" & Text2(0).Text & "', dtmVLEXP = '" & Text2(1).Text & "'" _
"WHERE txtVEHNO = "' & VehNo & "'"
let me know how that goes.
Kind Regards
Devon.
Either way, if you are going to use " & VarName & " in an sql statemet
you have to put the ' symbols
strSql = "Blah blahblah WHERE blah='" & Variable & "'"
Kind Regards
Devon.
This information is incorrect.
In order to help you we need to know what type this VehNo variable is.
If it is numeric then your assignment is incorrect
VehNo = Text1(4).Text
Should be
VehNo = CInt(Text1(4).T ext)
If it is text then your use is incorrect
& "WHERE txtVEHNO = " & VehNo & ";"
should be
& "WHERE txtVEHNO = '" & VehNo & "';"
The semi-colon at the end of your statement will not cause an error.
This information is incorrect.
In order to help you we need to know what type this VehNo variable is.
If it is numeric then your assignment is incorrect
VehNo = Text1(4).Text
Should be
VehNo = CInt(Text1(4).T ext)
If it is text then your use is incorrect
& "WHERE txtVEHNO = " & VehNo & ";"
should be
& "WHERE txtVEHNO = '" & VehNo & "';"
The semi-colon at the end of your statement will not cause an error.
What of if it is Date?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: leroybt.rm |
last post by:
Can someone tell me how to run a script from a interactive shell
I type the following:
>>>python filename
>>>python filename.py
>>>run filename
>>>run filename.py
>>>/run filename
>>>/run filename.py
|
by: Ed |
last post by:
Hello,
I took a course in asp about 2 years ago and I was
practicing with IIS 5.0. Then I put it down for a while.
Now trying to get back to it. I can't run asp files from
subdirectories of my root directory, but I can run asp
files from the root directory of my website and I can run
htm files from the subdirectories. If I run
localhost/mytest.asp
|
by: Jenna Olson |
last post by:
Hi all-
I've never seen this particular issue addressed, but was wondering if
there's anything to support one way or another. Say I have a class:
class ManipulateData
{
public:
ManipulateData(const char* Path-To-Some-Text-File)
{ ... }
|
by: erniedude |
last post by:
Hi,
I'm a newbie and I was wondering if anyone knew a (Python) script to
run 4 batch files, one after the other (assuming the directories are
known). It would be better if all 4 batch files could run
simultaneously, but that might break Windows... ;) The problem I had
was I couldn't get the files to RUN, only to OPEN. Thanks for the
help!!!
pseudo-code looks like this
|
by: billr |
last post by:
I have developed a small API for taking care of a lot of boiler plate stuff
in a multi formed windows application, for example setting up a messaging
thread framework.
New Forms, in the appllication using the API, are subclassed to a Form
contained within the API, and they are controlled (controlled in this
instance means, kept alive, displayed and hidden) at runtime by a thread
whose responsibility is this sole task.
In order to run...
| |
by: n0sPaM |
last post by:
Is it possible to schedule an .ASPX page to run automatically, say every
hour?
N.B.
|
by: Wasi Rehman |
last post by:
hi friends,
I have one webservice which i want to run on win98 system because some reference in that webservice only run in win98, and my ASP.net application is on win2000 pro. I want to call that webservice from my ASP.net application how could i do that........ how can i publish my webservice on win98 , is it possible or not if not then what should i do ........ remember the DLL which is called by my webservice only run on Win98.
|
by: Bob Day |
last post by:
Using vs2003, vb.net
I start a thread, giving it a name before start. Code snippet:
'give each thread a unique name (for later identification)
Trunk_Thread.Name = "Trunk_0_Thread"
' allow only 1 thread per line
Trunk_Thread.ApartmentState = ApartmentState.STA
|
by: Chief |
last post by:
Hello i would like to know
which syntax do i have to use in order to make a program run other
*.exe program and also how to put inputs in it
for example i want to to make a program that run other file call
try.exe and save all the stdout into a file
thanx
|
by: Sean DiZazzo |
last post by:
Is there something special you have to do to get a wxPython app to run
remotely under xwindows? My Tkinter apps always automatically work
that way, so I was surprised to even be confronted with this problem.
~Sean
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |