Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:44:45+00:00 2026-06-10T20:44:45+00:00

The code below works fine I just wanted to ask if I take out

  • 0

The code below works fine I just wanted to ask if I take out 2 lines of code the code still works the same but should I take it out or keep it and what does it do ?

Thanks for the help in advance.

        ' OPEN DATABASE
        dim objConn,objRS,objTRS,objUnit

'----Do I need this ? ----> Const adCmdText = &H0001

        Set objConn = Server.CreateObject("ADODB.Command") 
        objConn.ActiveConnection = "Driver={SQL Server};Server=MSSQLSrv;Database=DbTest;UID=blablabala;PWD=blablabala"

'----Do I need this ? ----> objConn.CommandType = adCmdText

        strQuery = "SELECT USERNAME,PASSWORD from CUSTOMERS where EMAIL=?"
        objConn.CommandText=strQuery 
        objConn.Parameters(0) = Request.QueryString("email")
        SET objRS = objConn.execute(strQuery)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:44:47+00:00Added an answer on June 10, 2026 at 8:44 pm

    line 1 and 2 are working together

    Const adCmdText = 1                  'Evaluate as a textual definition
    objConn.CommandType = adCmdText    ' Evaluate as textual definition, not stored procedure
    

    The CommandType can be a Stored Procdure. You can set/define your own way directly through the SP and then call (Using the SqlCommand) so there is no need to define UserDefinedFunction.

    See http://www.w3schools.com/ado/prop_comm_commandtype.asp for the complete listing of all the CommandTypeEnum Values

    Hope this helps…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The code below works fine. But it seem clunky. How would you combine the
the code below works fine but it takes an absolute age to run. How
Currently my code below works fine but it's a bit of overkill. In my
Please i need help, this code below works fine on my localhost, php5.3+ but
The code I have below works fine but I'm sure it could be more
Can anyone help me figure this out? The below code works fine and gets
The code below works just fine, however what's happening is the code limits the
It works just fine, for plain vanilla functions. The code below works just fine.
jQuery UI Autocomplete (code below) works just fine when the returned JSON is an
I have a sample code snippet below which works just fine (I trimmed the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.