S
Simon Harris
Hi All,
Being a classic ASP programmer, I'm trying to get to grips with OOP,
specifically using classes.
I have setup my class with various properties, so far so good. What I dont
quite get is the logic of using the properties.
E.g. If I want to get the RoadName property of my address class into a
database, do I do something like this...
Public function saveToDB()
strSQL = "Insert into TblName RoadName Values " & address.RoadName
bla bla bla....run the sql here!
End Function
Also, if I want to get a specific address from my DB and create an address
object from it, do I do something like this?
Public Function GetAddress(byval RoadName as String)
strsql = "select roadname fromtblname where roadname = " &
roadname
bla bla...run the SQL
address.roadname = dr("roadname")
End Function
I guess I just need someone to confirm my thinking is right on this, or if
not, point me in the right direction!
Thanks,
Simon.
Being a classic ASP programmer, I'm trying to get to grips with OOP,
specifically using classes.
I have setup my class with various properties, so far so good. What I dont
quite get is the logic of using the properties.
E.g. If I want to get the RoadName property of my address class into a
database, do I do something like this...
Public function saveToDB()
strSQL = "Insert into TblName RoadName Values " & address.RoadName
bla bla bla....run the sql here!
End Function
Also, if I want to get a specific address from my DB and create an address
object from it, do I do something like this?
Public Function GetAddress(byval RoadName as String)
strsql = "select roadname fromtblname where roadname = " &
roadname
bla bla...run the SQL
address.roadname = dr("roadname")
End Function
I guess I just need someone to confirm my thinking is right on this, or if
not, point me in the right direction!

Thanks,
Simon.