473,387 Members | 1,575 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,387 software developers and data experts.

Silly Question - SQL conn.execute

I feel a bit silly asking this because I use this code all the time, but
what does the ",,129" mean? Are there other parameters that one might use
(I only do fairly simple SQL commands).

conn.execute strSQL,,129
Jul 19 '05 #1
2 4522
michaaal wrote:
I feel a bit silly asking this because I use this code all the time,
but what does the ",,129" mean? Are there other parameters that one
might use (I only do fairly simple SQL commands).

conn.execute strSQL,,129


The ADO online help can be found here:
http://msdn.microsoft.com/library/en...dooverview.asp

There are two versions of the Execute command.
The Command object's Execute method:
command.Execute RecordsAffected, Parameters, Options

and the Connection object's Execute method:
connection.Execute CommandText, RecordsAffected, Options

Notice that they both have an Options argument. This argument is " ... A
Long value that indicates how the provider should evaluate the CommandText
argument. Can be a bitmask of one or more CommandTypeEnum or
ExecuteOptionEnum values."

You can specify more than one value by adding them together. 129 is the
combination of two values: 1 and 128.

The 1 is enumerated by the adCmdText constant and tells the provider to
treat the CommandText as a string containing a SQL statement. You should
always provide the CommandType option - don't make the provider guess what
the command type is: it wastes programming cycles and, in rare instances, it
can make the wrong guess.

The 128 is enumerated by adExecuteNoRecords, and tells the provider not to
construct a recordset object because the query being executed will not
return any records.

I will leave it up to you to look in the online help and find the other
possible values allowed for the Options argument.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
You're the best, Bob.
Jul 19 '05 #3

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

Similar topics

3
by: Kenneth McDonald | last post by:
After looking around at various editors, I've finally decided on (I think :-) ) Vim for my future work. (jed is a great editor, but doesn't do neat things like allow me to write python code to add...
1
by: PJ | last post by:
<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.open application("dtat_motor_connectionstring") set rs = new adodb.recordset 'Set RS = Conn.Execute(' "exec spcn_update_transactions &...
2
by: Colin Steadman | last post by:
What is the best way to control is a transaction? I've done a little test and both of the examples below seem to do the job, but I was wondering which is the better method, this: If err.number <>...
6
by: Des Perado | last post by:
I have just tried this, and it works: Global.asa contains: sub Session_OnStart set Session("conn")=Server.CreateObject("ADODB.Connection") dsntemp="driver={sql Server}; server=master1;...
2
by: Empire City | last post by:
Set Conn = Server.CreateObject( "ADODB.Connection" ) Conn.Open( "DSN = mydsn; UID = myuserid; PWD = mypassword;" ) sql = "select * from customers" Set RS = Conn.Execute( sql ) Preferably with a...
1
by: liju | last post by:
Hi, I am facing a problem while trying to execute a simple mdx query using C# and OLEDB conn. The code I am using is as: // Create a OleDb(!!)-connection OleDbConnection oleDbConn = new...
3
by: FC | last post by:
Hello All: I am getting the following error: Compiler Error Message: CS0246: The type or namespace name 'conn' could not be found (are you missing a using directive or an assembly reference?) ...
1
by: j2ibeo | last post by:
Hi, I was wondering about this statement Rs=conn.execute("Select * from table where id=232") what is the result of Rs if id 232 is not found? And how do I catch this exception like : If not...
6
by: jeddiki | last post by:
Hi, I am stuck again over something silly that I can not resolve. I am using a link to create a dynamic page. the link is itself written from the same same table that the dynamic page is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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
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...

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.