none
Creating dot notation, Pls. Help! RRS feed

  • Question

  • Hello,

    I'm aiming to create my own sub like insert statement, but suddenly i 'em thinking if it possible to create it into a dot notation event

    Public Sub SQLquery(sString as String)
          sString = "Insert..."
    End if

    So, probably what I'm flattering is to combine my insert and update so when i called it with parameter ,presumption :

    SQLquery.Insert(parameter......)
    SQLquery.Update(parameter.........)

    Thank you in advance!!!

    Monday, March 3, 2014 7:51 AM

Answers

  • Hi,

    The easiest way to create your own dot notation is to add a module then rename it into SQLquery,

    So probably, if you have an experience in creating Functions you can include it,

    Like this:

    Module SQLquery
    
        Public Function Insert(<your parameter>)
           Return Insert.......
        End Function
       
        Public Function Update(<your parameter>)
           Return Update...
        End Funtion
    End Module

    You can compile your different functions and sub event, but don't forget to declare as Global variable like Public

    • Marked as answer by brunettecoder Monday, March 3, 2014 8:49 AM
    Monday, March 3, 2014 8:23 AM

All replies

  • hi

    you can try some third party tools like codesmith

    or Coding Helper

    Mark as Ans if you find it useful


    Shridhar J Joshi Thanks a lot

    Monday, March 3, 2014 7:54 AM
  • Hi Thanks for your reply, I've seen your sample but I'm kinda beginner, it doesn't help me out with my problem, then am'a looking for a sub event like what i'm looking for, that composed with dot notation,
    Monday, March 3, 2014 8:03 AM
  • Hi,

    The easiest way to create your own dot notation is to add a module then rename it into SQLquery,

    So probably, if you have an experience in creating Functions you can include it,

    Like this:

    Module SQLquery
    
        Public Function Insert(<your parameter>)
           Return Insert.......
        End Function
       
        Public Function Update(<your parameter>)
           Return Update...
        End Funtion
    End Module

    You can compile your different functions and sub event, but don't forget to declare as Global variable like Public

    • Marked as answer by brunettecoder Monday, March 3, 2014 8:49 AM
    Monday, March 3, 2014 8:23 AM