Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Posts
    183

    Unanswered: ADO parameter type

    I've got a stored procedure that requires a bit parameter, and used to use DAO for calling stored procedures. I've changed to ADO and am currently defining the parameter for the stored procedure.

    Code:
        SPparam.Type =
        SPparam.Size = 1
    
        SPparam.value = kryds_ipdmatch.Value
       
        kommando.CommandText = "ket.MATCH_match"
        kommando.CommandType = adCmdStoredProc
        kommando.Parameters 
        kommando.ActiveConnection = connectionstr
    The annoying thing is, using SPparam.Type doesn't seem to support the type Bit or its VB alternative Bool.

    What then to use?

    Thanks in advance,

    Cheers
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Trinsan

    I'm sure you know your code is very incomplete there.

    You don't actually need to specify the type - just validate your value to make sure it is either 1, 0 or NULL (if your sproc handles NULL bits) before assigning it.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    BTW - nice command object naming convention there
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    BTW (2) - there is the adBoolean paramater type
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Oct 2005
    Posts
    183
    Thanks Pootie... lol, yeah, code is very incomplete, copying the entire procedure would make me very unpopular with the owners of the site I suppose... at least until I begin copying out stuff into smaller function calls.

    And yeah... weird, didn't get the adBoolean when I posted this.. t'was friday though, isn't that an excuse?
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •