473,516 Members | 3,488 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SYNTAX FOR REFERENCING SQL PARAMETER QUERIES

I am currently using VB 6.0 so I hope someone out there
can help me.
All I need is the proper syntax to reference the paramter
in a SQL query.
Here is my problem.
I created a dataenvironment called: dataenvironment1.
I then created a command called: command3
The command is a SQL query; INSERT INTO ControlTable
VALUES (?,?). The SQL builder gives the parameters the
names; param1 and param2.
Here is the problem, My freind gave me this line of code
in order to update the fields by using the parameters
referenced in the SQL query:
dataenvironment1.command3.parameters("param1").val ue= var1

The only problem is that this syntax does not work and I
cannot find the current usage in order for the program to
work.
At present I get an error saying that parameters is not
defined.
All I need is the current syntax to swap out the value
from var1 and insert into parameter1 (param1).
I would be greatful for any help anyone can give me.
Thank you.
Robert Mellott
Nov 20 '05 #1
2 5301
Hello,

"ROBERT MELLOTT" <R2*****@YAHOO.COM> schrieb:
I am currently using VB 6.0 so I hope someone out there
can help me.


This is a VB.NET language group. Please turn to the ng mentioned below:

news://news.microsoft.com/microsoft.public.vb.database

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
"ROBERT MELLOTT" <R2*****@YAHOO.COM> schrieb
I am currently using VB 6.0


This is a VB.NET group. Please turn to one of the microsoft.public.vb.*
groups.
--
Armin

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
1504
by: middletree | last post by:
What's wrogn with this query? INSERT INTO Login(Name,Password,Pastor) VALUES ('Bob','whatever','y') Seems pretty striaghtforward. Using Access 2003. My connection is good, because I am using it to do all sort of other things, but this insert statement is throwing me this message, where line 24 is the execute line: Microsoft JET Database...
7
248437
by: Dave | last post by:
I have 2 tables, one with names, and another with addresses, joined by their CIVICID number (unique to the ADDRESSINFO table) in Oracle. I need to update a field in the NAMEINFO table for a particular surname in a particular town. I can select the records fine with this syntax (testing in Oracle SQL* Plus) SELECT NAMEINFO.LASTNAME,...
2
6156
by: Aloof | last post by:
Using Access 2000 Windows Server 2003 The following code worked fine until we moved hosting companies StartDate = Request.Form("StartDateMonth") & "/" & Request.Form ("StartDateDay") & "/" & Request.Form("StartDateYear") EndDate = Request.Form("EndDateMonth") & "/" & Request.Form ("EndDateDay") & "/" & Request.Form("EndDateYear")
0
1187
by: lread | last post by:
This is a simplistic test table I am trying to create. The syntax is directly based up on the sample code from the BI Redbook: CREATE TABLE CUSDTA021/MQT_DB AS ( SELECT SUM(ML1OQ) AS TOTAL_SUM, M1PN FROM FRNDTA021/M1P M1P WHERE M1LOT# = '' GROUP BY M1PN
9
2841
by: MLH | last post by:
I have a table (tblCorrespondence) holding records with fields like , , , , , , , etc... About a dozen 's are defined and I often use queries to extract records of a given . That's pretty easy. But, recently, I wanted to list all "15" letters, a few of the above mentioned fields and one additional field: of nother letter "00" in the...
6
2678
by: FayeC | last post by:
I really need help figuring this out. i have a db with mostly text fields but 2. The user_id field is an autonumber (key) and the user_newsletter is a number (1 and 0) field meaning 1 yes the person wants to receive a newsletter and 0 no, don't want to receive it. Now.....when trying to create an UPDATE statement I am running into problems...
9
1580
by: Brett Romero | last post by:
Say I have a library (A.dll) with a method that accepts a collection of a specific type. The type is defined in B.dll. In A.dll, I need to loop through this collection and reference fields of the type. For example, a Person type. It may have arm, leg, feet, and hands. Hands is a collection containing types of fingers. The only way to...
3
4115
by: Maximus | last post by:
Can some one help me with finding the error is this statement? strSQL_Update = "UPDATE tblWJS_SuperInput SET JobNumber= '"& strJobNumber &"', " _ & "WeekendingDate = '"& strWeekEndingDate &"', "_ & "CurrentHours = '"& strCurrentHours &"', "_ & "CurrentHoursTaping = '"& strCurrentHoursTaping &"', "_ & "ReportRequired_01 = '"&...
6
3586
by: DBDriver | last post by:
I have an Access 97 database on WinXP with a linked Excel table of about 100,000 rows. I'm trying to construct a query that will give me an editable datasheet showing records where data in a pair of fields is duplicated. As an example, I constructed this query on the Employees'table in the Northwind Sample database. I appended four rows...
0
7273
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, 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...
0
7182
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...
0
7574
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7136
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...
0
7547
tracyyun
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...
0
5712
agi2029
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...
0
4769
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...
0
3265
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1620
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.