Results 1 to 7 of 7

Thread: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and '

  1. #1

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and '

    im converting an asp to aspx

    the below line of code is my next problem

    Code:
    bstrURI = "https://" & Request.ServerVariables("SERVER_NAME") & "/premium/smsmt.asp?" & Request.Form
    Line 23:
    it works 60% of the time, all the time.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and '

    I suspect the problem is this: "Request.Form" I don't thin .Form is a string, but an object....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and '

    hmmmmmmmm
    any possible solutions to this,
    im actually trying to change an asp to webform aspx
    doing one line at a time,
    been searching the web on possible solutions but nout mush happenin,
    im at line 22 now
    only another 80 to go woho
    it works 60% of the time, all the time.

  4. #4
    New Member
    Join Date
    May 2009
    Posts
    1

    Re: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' a

    For anyone who stumbles onto this post the BC30452 is a datatyping issues. When your code is compiled it is either getting confused or flat out can't do something regarding your datatypes. Try casting your variables. One way to do this is

    ctype(myVar, dataType)

    So if myVar contains a string datatype and you want to a number comparison on it
    ctype(myVar, integer)
    will convert it to an interger (as long as it is something that can be converted to a number, if not you will get an error.

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' a

    It goes a bit more beyond that.... the Form object in this case was a form posted from the previous page.... so there isn't a way to cast it to anything else... because it's going to be composed of other objects....

    Also... considering this post is three and a half years old..... I'm not sure it's a problem anymore....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' a

    Moved to the AsP.NET forum

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' a

    It's probably the querystring bit the user wanted, so you'd use Request.QueryString and its properties.

Posting Permissions

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



Click Here to Expand Forum to Full Width