hi all,
i get a run-time error '424': Object Required on the last line below, and i can't figure out why... - Dim adoConn As New ADODB.Connection
-
Dim adoCmd As New ADODB.Command
-
Dim adoRecSet As New ADODB.Recordset
-
-
' "SELECT dbDescription,dbExternal FROM EuroPrice WHERE dbFAB = '" & Format(txtFAB.Text, "@@@ @@@ @@@@") & "'"
-
-
adoConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\qtomlyc\My Documents\PriceList.mdb" & ";User ID=Admin;Password=;"
-
adoConn.Open
-
-
adoCmd.CommandText = "spGetEuro"
-
adoCmd.CommandType = adCmdStoredProc
-
-
Dim adoParam As New ADODB.Parameter
-
adoParam.Name = "@FAB"
-
adoParam.Type = adVarChar
-
adoParam.Value = Format(Replace(txtFAB.Text, " ", ""), "@@@ @@@ @@@@")
-
-
adoCmd.Parameters.Append (adoParam)
i got the idea to the adoCmd.Parameters.Append (adoParam) command from asp.net, where i would have used .Parameters.Add (adoParam), and figured append would be the same as add here. is it not?
6 6491
Usualy this error will come if the object is not there
debug which line you are getting this error and check for that object.
Usualy this error will come if the object is not there
debug which line you are getting this error and check for that object.
as i said, i get the error on the last line, which is line 18. since i have used both adoCmd and adoParam before, i find it strange that any of them would not be there... but what is the easiest way to "check for an object"?
Where you are declaring adoParam - adoCmd.Parameters.Append (adoParam)
I see it's there then check for regi
Okay try like this. - adoCmd.Parameters.Append adoParam
Where you are declaring adoParam - adoCmd.Parameters.Append (adoParam)
I see it's there then check for some other object.
i have now checked for both adoCmd and adoParam by inserting - MsgBox adoParam.Name
-
MsgBox adoCmd.CommandText
-
Exit Sub
on which both dialog boxes showed up. their messages were "@FAB" and "{ call spGetEuro }" respectively. What other objects could be needed for this line to work?
Okay try like this. -
adoCmd.Parameters.Append adoParam
-
hi all,
i get a run-time error '424': Object Required on the last line below, and i can't figure out why... - Dim adoConn As New ADODB.Connection
-
Dim adoCmd As New ADODB.Command
-
Dim adoRecSet As New ADODB.Recordset
-
-
' "SELECT dbDescription,dbExternal FROM EuroPrice WHERE dbFAB = '" & Format(txtFAB.Text, "@@@ @@@ @@@@") & "'"
-
-
adoConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\qtomlyc\My Documents\PriceList.mdb" & ";User ID=Admin;Password=;"
-
adoConn.Open
-
-
adoCmd.CommandText = "spGetEuro"
-
adoCmd.CommandType = adCmdStoredProc
-
-
Dim adoParam As New ADODB.Parameter
-
adoParam.Name = "@FAB"
-
adoParam.Type = adVarChar
-
adoParam.Value = Format(Replace(txtFAB.Text, " ", ""), "@@@ @@@ @@@@")
-
-
adoCmd.Parameters.Append (adoParam)
i got the idea to the adoCmd.Parameters.Append (adoParam) command from asp.net, where i would have used .Parameters.Add (adoParam), and figured append would be the same as add here. is it not?
Hi,
use "Set" keyword to set Text of Command Object : -
Set adoCmd.CommandText = "spGetEuro"
-
U have to use "CreateParameter" of command object -
Dim adoParam As New ADODB.Parameter
-
Set adoParam = adoCmd.CreateParameter
-
adoParam.Name = "FAB"
-
adoParam.Type = adVarChar
-
adoParam.Value = Format(Replace(txtFAB.Text, " ", ""), "@@@ @@@ @@@@")
-
-
adoCmd.Parameters.Append (adoParam)
-
Regards
Veena
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dave Hammond |
last post by:
I've got what should be a simple assignment of either an element value
or a default string to a variable, but when the element doesn't exist I
get an "Object required" error rather than an...
|
by: chacquard |
last post by:
Hi,
I've been working on a form that contains a subform. The fields in
the main form are EvendId, EventName, Date, time, place, etc.. These
fields cannot be edited (locked = yes and...
|
by: Brent |
last post by:
This AJAX stuff is all new to me. To try it out, I borrowed this code
from a website:
========================
var http_request = false;
function makeRequest(url) {
http_request = false;
|
by: DaFallus |
last post by:
I'm trying to write a somewhat simple page with dependent drop-down
boxes. Unfortunately the entire page is written through PL/SQL so that
makes it even more difficult for me to trouble shoot. I...
|
by: Phil |
last post by:
Hi,
This code gives an javascript error: "Object required" and never let see the
Alert window.
in code-behind:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As...
|
by: Anette |
last post by:
Hi,
When I load pages through the db, e.g.: ovrigt.php?typ=disco and after that go to the menu I get an error message from IE6: "Object required" (translated from swedish IE). Part of menu:
<div...
|
by: Nilam2477 |
last post by:
I'm invoking COM dll method from VB program.
COM interface method takes one of the parameter as IUnknown as below
HRESULT SetMethod( long samNumber, IUnknown* List);
When i try to call this...
|
by: dougmeece |
last post by:
Good Morning Experts,
I spent all weekend working on this and got absolutely no where.
I have a database with an input form that runs an append query to append to a table.
Form Name: ...
|
by: andersond |
last post by:
On a webpage that has a variety of questions I get an "object required" error on lines like this...
document.getElementById('tableQuestion17').style.visibility="visible";
This is the code...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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...
|
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...
| |