I still don't get the point of using nameservers. The fuss that's been
going on because PHP didn't have support for them is still unclear to
me. Having functions and classes with the same names, but on different
containers? What is it useful for? Besides having all MySQL functions
in a MySQL namespace, SQLite on another, etc... I don't see further
uses.
Re: Nameservers? Why?
am 27.09.2007 03:10:18 von luiheidsgoeroe
On Thu, 27 Sep 2007 03:02:46 +0200, RageARC wrote:
> I still don't get the point of using nameservers. The fuss that's been
> going on because PHP didn't have support for them is still unclear to
> me. Having functions and classes with the same names, but on different
> containers? What is it useful for? Besides having all MySQL functions
> in a MySQL namespace, SQLite on another, etc... I don't see further
> uses.
Nameservers? I'd almost think you were talking about DNS.
Namespaces on the contrary, are very very good... It ensures different
packages and code can work together, without most of the problems of
clashing function/class/constant names. Often there's similar
functionality within the packages, and developers imagination of what
something should be called is limited (an should be descriptive).
A function called isError for instance is quite common, different
functions in different packages with the same name would cause a fatal
error in php. With namespaces, it would not be a problem (well, as long as
the developer realizes what namespace (s)he's working in).
--
Rik Wasmus
Re: Nameservers? Why?
am 27.09.2007 09:38:26 von nc
On Sep 26, 6:02 pm, RageARC wrote:
>
> I still don't get the point of using nameservers.
You mean, namespaces? :)
> What is it useful for?
Preventing name collisions. Say, you need to use two third-party
libraries, and each of them contains a function named authenticate().
Cheers,
NC
Namespaces? Why?
am 27.09.2007 11:30:04 von ragearc
Yes i was thinking in the website hosting mumbo jumbo and I said it
wrong.
So it is only useful if you want to use others' codes x). It's not
even worth the fuss.
Re: Namespaces? Why?
am 27.09.2007 11:43:00 von Captain Paralytic
On 27 Sep, 10:30, RageARC wrote:
> Yes i was thinking in the website hosting mumbo jumbo and I said it
> wrong.
>
> So it is only useful if you want to use others' codes x). It's not
> even worth the fuss.
So you're an "expert" php developer and you ask questions like this
and have this attitude to development?
I don't think it will be the lack of degree that causes you problems
in getting work!
Re: Namespaces? Why?
am 27.09.2007 11:51:25 von ragearc
I mean the fuss that has been generated due to the fact that PHP
didn't support namespaces. Even XML supports them, and I kinda don't
see why it is so important, that's why I posted this topic ;).
And this has nothing to do with PHP (Well in later PHP versions, they
have said they are going to make a rudimentary approach of it (google
PHP 6 and read the meeting notes), but it will not be called
namespaces :P) nor with my work.
Re: Namespaces? Why?
am 27.09.2007 14:59:21 von Jerry Stuckle
RageARC wrote:
> Yes i was thinking in the website hosting mumbo jumbo and I said it
> wrong.
>
> So it is only useful if you want to use others' codes x). It's not
> even worth the fuss.
>
Not at all. It's good to use in your own code, also.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Namespaces? Why?
am 27.09.2007 15:24:27 von Steve
"Jerry Stuckle" wrote in message
news:BPqdne0pQvs-NGbbnZ2dneKdnZydnZ2d@comcast.com...
> RageARC wrote:
>> Yes i was thinking in the website hosting mumbo jumbo and I said it
>> wrong.
>>
>> So it is only useful if you want to use others' codes x). It's not
>> even worth the fuss.
>>
>
> Not at all. It's good to use in your own code, also.
the lights will click eventually, he's just got to resist the urge to reject
the unknown. it's good that he at least is questioning it now though.
Re: Namespaces? Why?
am 27.09.2007 16:09:40 von ragearc
I use other people's libraries often, but I never had libraries
clashing with each other because of that, so I don't understand what's
the fuss about. An example:
http://www.petitiononline.com/phpns/
Quote:
"We implore you to add support for Namespaces in the next possible
release and to not wait until PHP6."
This is what I don't understand! Why people are so crazy about it.
Re: Namespaces? Why?
am 27.09.2007 17:11:01 von Bucky Kaufman
"RageARC" wrote in message
news:1190902180.451714.139430@d55g2000hsg.googlegroups.com.. .
>I use other people's libraries often, but I never had libraries
> clashing with each other because of that, so I don't understand what's
> the fuss about. An example:
>
> http://www.petitiononline.com/phpns/
>
> Quote:
> "We implore you to add support for Namespaces in the next possible
> release and to not wait until PHP6."
>
> This is what I don't understand! Why people are so crazy about it.
Gosh, how stupid can you be that you don't know people in web discussion
groups can get crazy?
What - are you a Communist? ;)
No - seriously.
Consider the source - PetitionOnline.com.
It's site for crusaders, not engineers.
It might as well say - CrackpotsAreUs.com
Re: Namespaces? Why?
am 27.09.2007 18:09:40 von Steve
"RageARC" wrote in message
news:1190902180.451714.139430@d55g2000hsg.googlegroups.com.. .
>I use other people's libraries often, but I never had libraries
> clashing with each other because of that, so I don't understand what's
> the fuss about. An example:
>
> http://www.petitiononline.com/phpns/
>
> Quote:
> "We implore you to add support for Namespaces in the next possible
> release and to not wait until PHP6."
>
> This is what I don't understand! Why people are so crazy about it.
isolation...a key aim in oop in any language. it helps php know what
resource you're wanting. if you've ever worked on a project with a couple of
other developers, did you ever have it happen that a DEFINE was done with
the same name as another was using? you probably found out when both
resources were used at the same time (i.e. one script calling two classes,
each doing the define). namespaces help avoid things like that - as someone
said, collision.
Re: Namespaces? Why?
am 27.09.2007 22:27:15 von ragearc
On 27 Sep, 17:09, "Steve" wrote:
> "RageARC" wrote in message
>
> news:1190902180.451714.139430@d55g2000hsg.googlegroups.com.. .
>
> >I use other people's libraries often, but I never had libraries
> > clashing with each other because of that, so I don't understand what's
> > the fuss about. An example:
>
> >http://www.petitiononline.com/phpns/
>
> > Quote:
> > "We implore you to add support for Namespaces in the next possible
> > release and to not wait until PHP6."
>
> > This is what I don't understand! Why people are so crazy about it.
>
> isolation...a key aim in oop in any language. it helps php know what
> resource you're wanting. if you've ever worked on a project with a couple of
> other developers, did you ever have it happen that a DEFINE was done with
> the same name as another was using? you probably found out when both
> resources were used at the same time (i.e. one script calling two classes,
> each doing the define). namespaces help avoid things like that - as someone
> said, collision.
For Database Servers it would be nice to have a namespace for each
server, and all the functions names in all of them would be exactly
the same (Come to think of it, that would be awesome xD), what would
change would be the namespace:
MYSQL::connect...
:)
> Gosh, how stupid can you be that you don't know people in web discussion
> groups can get crazy?
> What - are you a Communist? ;)
>
> No - seriously.
> Consider the source - PetitionOnline.com.
> It's site for crusaders, not engineers.
> It might as well say - CrackpotsAreUs.com
Duh, I know that, just the fruit of a quick google search. You google
it :). And no I'm not a Communist.
Re: Namespaces? Why?
am 27.09.2007 22:35:57 von Steve
"RageARC" wrote in message
news:1190924835.291494.316860@y42g2000hsy.googlegroups.com.. .
> On 27 Sep, 17:09, "Steve" wrote:
>> "RageARC" wrote in message
>>
>> news:1190902180.451714.139430@d55g2000hsg.googlegroups.com.. .
>>
>> >I use other people's libraries often, but I never had libraries
>> > clashing with each other because of that, so I don't understand what's
>> > the fuss about. An example:
>>
>> >http://www.petitiononline.com/phpns/
>>
>> > Quote:
>> > "We implore you to add support for Namespaces in the next possible
>> > release and to not wait until PHP6."
>>
>> > This is what I don't understand! Why people are so crazy about it.
>>
>> isolation...a key aim in oop in any language. it helps php know what
>> resource you're wanting. if you've ever worked on a project with a couple
>> of
>> other developers, did you ever have it happen that a DEFINE was done with
>> the same name as another was using? you probably found out when both
>> resources were used at the same time (i.e. one script calling two
>> classes,
>> each doing the define). namespaces help avoid things like that - as
>> someone
>> said, collision.
>
> For Database Servers it would be nice to have a namespace for each
> server, and all the functions names in all of them would be exactly
> the same (Come to think of it, that would be awesome xD), what would
> change would be the namespace:
>
> MYSQL::connect...
you're catching on, however that is NOT the way to go architecturally.
specifically, you want an abstract class that defines all of the methods
that will be shared by all db objects. next, you would create your specific
db implementations, implementing the base, abstract db class. finally, you
would create a concrete db class that too, implemented the base, abstract db
class. you would initialize this static concrete db class with a value to
indicate what kind of db it should connect with.
internally, the concrete db class creates an instance of a specific db class
(like mysql) and defers all of it's interfaces (functions, etc.) to the
specific db class...returning values when needed, from the specific db class
to the caller...having the concrete db class as the middle man.
all of that is easier done than said...and is already doable in php.
this kind of isolation is NOT a namespace. it is more considered
'implementation'...the side-effect though, like namespaces, can be
isolation.
clear as mud?
Re: Namespaces? Why?
am 27.09.2007 23:04:45 von ragearc
Somewhat. Apparently, what you mean is that the way I'm doing Libri
(My Database Handler for ALL database servers supported by PHP and
some more) wouldn't profit from namespaces, but here's another
example:
X is a package that has a class called DB.
Y is a package that has a class called DB.
I want to use both packages in my code. There will be a collision. I
can then use:
X:: ...
Y:: ...
And safely execute both packages without seeing problems happening.
Re: Namespaces? Why?
am 27.09.2007 23:20:48 von Steve
"RageARC" wrote in message
news:1190927085.689670.284400@w3g2000hsg.googlegroups.com...
> Somewhat. Apparently, what you mean is that the way I'm doing Libri
> (My Database Handler for ALL database servers supported by PHP and
> some more) wouldn't profit from namespaces, but here's another
> example:
jesus no! that's not at all what i'm saying. i'm saying they have NOTHING to
do with eachother! MYQSL is a CLASS OBJECT. connect is an INTERFACE. though
a namespace may look the same in syntax when being reference, that certainly
do not at all mean they are! you can have namespaces that define a host of
classes to avoid not being able to create another class with the exact same
name (that may or may not be in a namespace of its own). namespaces are
invaluable, if you know what they are and how to use them.
> X is a package that has a class called DB.
> Y is a package that has a class called DB.
>
> I want to use both packages in my code. There will be a collision. I
> can then use:
>
> X:: ...
> Y:: ...
>
> And safely execute both packages without seeing problems happening.
that is a primary benefit of a namespace, but certainly not the only one.
;^)
Re: Namespaces? Why?
am 27.09.2007 23:33:06 von ragearc
> namespaces are
> invaluable, if you know what they are and how to use them.
Of course, that's what I've been asking since my first post :S.
> that is a primary benefit of a namespace, but certainly not the only one.
Call me a hard headed guy, but that's the only one I saw from the
posts I received from here:
>> What is it useful for?
>
> Preventing name collisions. Say, you need to use two third-party
> libraries, and each of them contains a function named authenticate().
Re: Namespaces? Why?
am 27.09.2007 23:41:37 von Steve
"RageARC" wrote in message
news:1190928786.269812.158460@57g2000hsv.googlegroups.com...
>> namespaces are
>> invaluable, if you know what they are and how to use them.
>
> Of course, that's what I've been asking since my first post :S.
i know, i know...but with your last post re. collision, i think you
understand their primary function. now, it's understanding when using them
will aid your development. i'd google the web, were i you. i'm not gunna
burn up my keyboard here over that part of the quandry. ;^)
>> that is a primary benefit of a namespace, but certainly not the only one.
>
> Call me a hard headed guy, but that's the only one I saw from the
> posts I received from here:
again, i defer to google. you'll get it.
>>> What is it useful for?
>>
>> Preventing name collisions. Say, you need to use two third-party
>> libraries, and each of them contains a function named authenticate().
cheers
Re: Namespaces? Why?
am 28.09.2007 15:55:48 von ragearc
On 27 Sep, 22:41, "Steve" wrote:
> "RageARC" wrote in message
>
> news:1190928786.269812.158460@57g2000hsv.googlegroups.com...
>
> >> namespaces are
> >> invaluable, if you know what they are and how to use them.
>
> > Of course, that's what I've been asking since my first post :S.
>
> i know, i know...but with your last post re. collision, i think you
> understand their primary function. now, it's understanding when using them
> will aid your development. i'd google the web, were i you. i'm not gunna
> burn up my keyboard here over that part of the quandry. ;^)
>
> >> that is a primary benefit of a namespace, but certainly not the only one.
>
> > Call me a hard headed guy, but that's the only one I saw from the
> > posts I received from here:
>
> again, i defer to google. you'll get it.
>
> >>> What is it useful for?
>
> >> Preventing name collisions. Say, you need to use two third-party
> >> libraries, and each of them contains a function named authenticate().
>
> cheers
AHA I believe I found the trick:
All PHP extensions have their functions with the prefix of the
extension.
curl_init...
curl_exec...
curl_close...
This has a major drawback: The names of the functions become extremely
big and that is completely useless. In C++ (I know that because I know
C++, but I never used namespaces other than std), I would do the
following:
--
using namespace curl;
init...
exec...
close...
--
It's like with ZEND Framework (Just thought of that while reading
their documentation):
using namespace zend;
And then all ZEND functions would not need ZEND prefixing them.
That should be the best part, I guess. Completely separating EVERY
single thing in a package to make it completely independent. That's
what is wanted in OOP, and namespaces are not needed if you have only
one class, but if you have 200 or 300, odds are they will clash with
other classes from other libs or even classes made by the users.
Re: Namespaces? Why?
am 28.09.2007 16:09:52 von Steve
"RageARC" wrote in message
news:1190987748.408888.185590@g4g2000hsf.googlegroups.com...
> On 27 Sep, 22:41, "Steve" wrote:
>> "RageARC" wrote in message
>>
>> news:1190928786.269812.158460@57g2000hsv.googlegroups.com...
>>
>> >> namespaces are
>> >> invaluable, if you know what they are and how to use them.
>>
>> > Of course, that's what I've been asking since my first post :S.
>>
>> i know, i know...but with your last post re. collision, i think you
>> understand their primary function. now, it's understanding when using
>> them
>> will aid your development. i'd google the web, were i you. i'm not gunna
>> burn up my keyboard here over that part of the quandry. ;^)
>>
>> >> that is a primary benefit of a namespace, but certainly not the only
>> >> one.
>>
>> > Call me a hard headed guy, but that's the only one I saw from the
>> > posts I received from here:
>>
>> again, i defer to google. you'll get it.
>>
>> >>> What is it useful for?
>>
>> >> Preventing name collisions. Say, you need to use two third-party
>> >> libraries, and each of them contains a function named authenticate().
>>
>> cheers
>
> AHA I believe I found the trick:
>
> All PHP extensions have their functions with the prefix of the
> extension.
>
> curl_init...
> curl_exec...
> curl_close...
>
> This has a major drawback: The names of the functions become extremely
> big and that is completely useless. In C++ (I know that because I know
> C++, but I never used namespaces other than std), I would do the
> following:
>
> --
> using namespace curl;
>
> init...
> exec...
> close...
>
> --
>
> It's like with ZEND Framework (Just thought of that while reading
> their documentation):
>
> using namespace zend;
>
> And then all ZEND functions would not need ZEND prefixing them.
>
> That should be the best part, I guess. Completely separating EVERY
> single thing in a package to make it completely independent. That's
> what is wanted in OOP, and namespaces are not needed if you have only
> one class, but if you have 200 or 300, odds are they will clash with
> other classes from other libs or even classes made by the users.
;^)
Re: Namespaces? Why?
am 28.09.2007 22:10:54 von ragearc
On 28 Sep, 15:09, "Steve" wrote:
> "RageARC" wrote in message
>
> news:1190987748.408888.185590@g4g2000hsf.googlegroups.com...
>
>
>
> > On 27 Sep, 22:41, "Steve" wrote:
> >> "RageARC" wrote in message
>
> >>news:1190928786.269812.158460@57g2000hsv.googlegroups.com. ..
>
> >> >> namespaces are
> >> >> invaluable, if you know what they are and how to use them.
>
> >> > Of course, that's what I've been asking since my first post :S.
>
> >> i know, i know...but with your last post re. collision, i think you
> >> understand their primary function. now, it's understanding when using
> >> them
> >> will aid your development. i'd google the web, were i you. i'm not gunna
> >> burn up my keyboard here over that part of the quandry. ;^)
>
> >> >> that is a primary benefit of a namespace, but certainly not the only
> >> >> one.
>
> >> > Call me a hard headed guy, but that's the only one I saw from the
> >> > posts I received from here:
>
> >> again, i defer to google. you'll get it.
>
> >> >>> What is it useful for?
>
> >> >> Preventing name collisions. Say, you need to use two third-party
> >> >> libraries, and each of them contains a function named authenticate().
>
> >> cheers
>
> > AHA I believe I found the trick:
>
> > All PHP extensions have their functions with the prefix of the
> > extension.
>
> > curl_init...
> > curl_exec...
> > curl_close...
>
> > This has a major drawback: The names of the functions become extremely
> > big and that is completely useless. In C++ (I know that because I know
> > C++, but I never used namespaces other than std), I would do the
> > following:
>
> > --
> > using namespace curl;
>
> > init...
> > exec...
> > close...
>
> > --
>
> > It's like with ZEND Framework (Just thought of that while reading
> > their documentation):
>
> > using namespace zend;
>
> > And then all ZEND functions would not need ZEND prefixing them.
>
> > That should be the best part, I guess. Completely separating EVERY
> > single thing in a package to make it completely independent. That's
> > what is wanted in OOP, and namespaces are not needed if you have only
> > one class, but if you have 200 or 300, odds are they will clash with
> > other classes from other libs or even classes made by the users.
>
> ;^)
Was that the thumbs up for me? xD
Re: Namespaces? Why?
am 29.09.2007 00:15:17 von Steve
"RageARC" wrote in message
news:1191010254.706267.75870@g4g2000hsf.googlegroups.com...
> On 28 Sep, 15:09, "Steve" wrote:
>> "RageARC" wrote in message
>>
>> news:1190987748.408888.185590@g4g2000hsf.googlegroups.com...
>>
>>
>>
>> > On 27 Sep, 22:41, "Steve" wrote:
>> >> "RageARC" wrote in message
>>
>> >>news:1190928786.269812.158460@57g2000hsv.googlegroups.com. ..
>>
>> >> >> namespaces are
>> >> >> invaluable, if you know what they are and how to use them.
>>
>> >> > Of course, that's what I've been asking since my first post :S.
>>
>> >> i know, i know...but with your last post re. collision, i think you
>> >> understand their primary function. now, it's understanding when using
>> >> them
>> >> will aid your development. i'd google the web, were i you. i'm not
>> >> gunna
>> >> burn up my keyboard here over that part of the quandry. ;^)
>>
>> >> >> that is a primary benefit of a namespace, but certainly not the
>> >> >> only
>> >> >> one.
>>
>> >> > Call me a hard headed guy, but that's the only one I saw from the
>> >> > posts I received from here:
>>
>> >> again, i defer to google. you'll get it.
>>
>> >> >>> What is it useful for?
>>
>> >> >> Preventing name collisions. Say, you need to use two third-party
>> >> >> libraries, and each of them contains a function named
>> >> >> authenticate().
>>
>> >> cheers
>>
>> > AHA I believe I found the trick:
>>
>> > All PHP extensions have their functions with the prefix of the
>> > extension.
>>
>> > curl_init...
>> > curl_exec...
>> > curl_close...
>>
>> > This has a major drawback: The names of the functions become extremely
>> > big and that is completely useless. In C++ (I know that because I know
>> > C++, but I never used namespaces other than std), I would do the
>> > following:
>>
>> > --
>> > using namespace curl;
>>
>> > init...
>> > exec...
>> > close...
>>
>> > --
>>
>> > It's like with ZEND Framework (Just thought of that while reading
>> > their documentation):
>>
>> > using namespace zend;
>>
>> > And then all ZEND functions would not need ZEND prefixing them.
>>
>> > That should be the best part, I guess. Completely separating EVERY
>> > single thing in a package to make it completely independent. That's
>> > what is wanted in OOP, and namespaces are not needed if you have only
>> > one class, but if you have 200 or 300, odds are they will clash with
>> > other classes from other libs or even classes made by the users.
>>
>> ;^)
>
> Was that the thumbs up for me? xD
two.
keep 'em truck'n
Re: Namespaces? Why?
am 30.09.2007 12:01:38 von oliver.graetz
RageARC schrieb:
> I mean the fuss that has been generated due to the fact that PHP
> didn't support namespaces. Even XML supports them, and I kinda don't
> see why it is so important, that's why I posted this topic ;).
Why? Because a good share of applications using PEAR stopped working
when PHP 5.1.0 came out and featured a class called "date". Version
5.1.1 had to be released in a hassle just four days later as a hotfix.
That wouldn't have happened with namespaces. That's why. The big crash
has already happened once! How about the next version of PHP featuring
native classes like "Output", "Log", "Users" and so on and so on?
PHP already encourages every programmer to use a name prefix for all
classes. Instead of "Date" the PEAR people should have used "PEAR_Date"
and the problem wouldn't have occurred. This time. Name prefixes work
against symptoms but they don't cure the disease. Not having namespaces
as safety net is a timebomb.
And these considerations don't even take the benefits of namespaces
regarding shorter names into account.
For all PHP4 coding style evangelists: PHP with namespace support will
gladly execute code not using them. So please go away, nothing to see here.
On 30 Sep, 11:01, Oliver Grätz wrote:
> RageARC schrieb:
>
> > I mean the fuss that has been generated due to the fact that PHP
> > didn't support namespaces. Even XML supports them, and I kinda don't
> > see why it is so important, that's why I posted this topic ;).
>
> Why? Because a good share of applications using PEAR stopped working
> when PHP 5.1.0 came out and featured a class called "date". Version
> 5.1.1 had to be released in a hassle just four days later as a hotfix.
> That wouldn't have happened with namespaces. That's why. The big crash
> has already happened once! How about the next version of PHP featuring
> native classes like "Output", "Log", "Users" and so on and so on?
>
> PHP already encourages every programmer to use a name prefix for all
> classes. Instead of "Date" the PEAR people should have used "PEAR_Date"
> and the problem wouldn't have occurred. This time. Name prefixes work
> against symptoms but they don't cure the disease. Not having namespaces
> as safety net is a timebomb.
>
> And these considerations don't even take the benefits of namespaces
> regarding shorter names into account.
>
> For all PHP4 coding style evangelists: PHP with namespace support will
> gladly execute code not using them. So please go away, nothing to see her=
e
>
> OLLi
>
> --
> Boone:"Red Shirt."
> Lark:"Hu?"
> Boone:"Red Shirt. Ever watched Star Trek?"
> [LOST 111]
You just made see something I had never seen before ;). I understand
your point :).
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sSQL As String
sSQL = "Select * From customers;"
With DAO
Set db = .OpenDatabase("mydata.mdb")
Set rs = .OpenRecordset(sSQL)
End With
'... rest of the code
Except I think it works a little better with the "With" in
Visual Basic.
What's the advantage of a namespace if you have 5 different
databases to connect to?
Anyone have a good example of using namespaces?
--
Jim Carlock
Swimming Pool, Spa And Water Feature Builders
http://www.aquaticcreationsnc.com/
Re: Namespaces? Why?
am 02.10.2007 04:37:28 von Jerry Stuckle
Jim Carlock wrote:
> "RageARC" wrote...
>> using namespace curl;
>> init...
>> exec...
>> close...
>
> That looks like Visual Basic 3/4/5/6...
>
> Dim db As DAO.Database
> Dim rs As DAO.Recordset
> Dim sSQL As String
>
> sSQL = "Select * From customers;"
> With DAO
> Set db = .OpenDatabase("mydata.mdb")
> Set rs = .OpenRecordset(sSQL)
> End With
>
> '... rest of the code
>
> Except I think it works a little better with the "With" in
> Visual Basic.
>
> What's the advantage of a namespace if you have 5 different
> databases to connect to?
>
Absolutely nothing. Namespaces are for source code separation, not
database selection.
> Anyone have a good example of using namespaces?
>
Let's say you have two different packages, each with:
class ExampleClass
Now if you include both packages in the same PHP file, you'll get a
parsing error for the second instance of ExampleClass.
So, you have two different namespaces. Put each one in its own
namespace and you can use both.
Think if it as an implicit prefix to everything defined within the
namespace.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Namespaces? Why?
am 02.10.2007 12:05:13 von ragearc
On 1 Oct, 23:45, "Jim Carlock" wrote:
> "RageARC" wrote...
> > using namespace curl;
> > init...
> > exec...
> > close...
>
> That looks like Visual Basic 3/4/5/6...
I was thinking more of C++ xD
Re: Namespaces? Why?
am 02.10.2007 15:28:41 von Steve
"Jerry Stuckle" wrote in message
news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
> Jim Carlock wrote:
>> "RageARC" wrote...
>>> using namespace curl;
>>> init...
>>> exec...
>>> close...
>>
>> That looks like Visual Basic 3/4/5/6...
>>
>> Dim db As DAO.Database
>> Dim rs As DAO.Recordset
>> Dim sSQL As String
>>
>> sSQL = "Select * From customers;"
>> With DAO
>> Set db = .OpenDatabase("mydata.mdb")
>> Set rs = .OpenRecordset(sSQL)
>> End With
>>
>> '... rest of the code
>>
>> Except I think it works a little better with the "With" in
>> Visual Basic.
>>
>> What's the advantage of a namespace if you have 5 different
>> databases to connect to?
>>
>
> Absolutely nothing. Namespaces are for source code separation, not
> database selection.
jerry, i think he meant the DAO used in the 'with' statement...which is NOT
a namespace but an object instance. i believe his code sample above would
fail anyway since i don't recall DAO being a static class - static was
introduced to vb in vb.net.
Re: Namespaces? Why?
am 02.10.2007 15:29:36 von Steve
"Bruno Barros" wrote in message
news:1191319513.372833.56710@22g2000hsm.googlegroups.com...
> On 1 Oct, 23:45, "Jim Carlock" wrote:
>> "RageARC" wrote...
>> > using namespace curl;
>> > init...
>> > exec...
>> > close...
>>
>> That looks like Visual Basic 3/4/5/6...
>
> I was thinking more of C++ xD
which is more appropriate since you can't create a namespace in these
versions of vb. ;^)
Re: Namespaces? Why?
am 02.10.2007 16:08:13 von Jerry Stuckle
Steve wrote:
> "Jerry Stuckle" wrote in message
> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>> Jim Carlock wrote:
>>> "RageARC" wrote...
>>>> using namespace curl;
>>>> init...
>>>> exec...
>>>> close...
>>> That looks like Visual Basic 3/4/5/6...
>>>
>>> Dim db As DAO.Database
>>> Dim rs As DAO.Recordset
>>> Dim sSQL As String
>>>
>>> sSQL = "Select * From customers;"
>>> With DAO
>>> Set db = .OpenDatabase("mydata.mdb")
>>> Set rs = .OpenRecordset(sSQL)
>>> End With
>>>
>>> '... rest of the code
>>>
>>> Except I think it works a little better with the "With" in
>>> Visual Basic.
>>>
>>> What's the advantage of a namespace if you have 5 different
>>> databases to connect to?
>>>
>> Absolutely nothing. Namespaces are for source code separation, not
>> database selection.
>
> jerry, i think he meant the DAO used in the 'with' statement...which is NOT
> a namespace but an object instance. i believe his code sample above would
> fail anyway since i don't recall DAO being a static class - static was
> introduced to vb in vb.net.
>
>
OK, that makes sense. Not being familiar with DAO, I wouldn't know (or
care ;-) ).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Namespaces? Why?
am 02.10.2007 16:47:06 von Steve
"Jerry Stuckle" wrote in message
news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>> Jim Carlock wrote:
>>>> "RageARC" wrote...
>>>>> using namespace curl;
>>>>> init...
>>>>> exec...
>>>>> close...
>>>> That looks like Visual Basic 3/4/5/6...
>>>>
>>>> Dim db As DAO.Database
>>>> Dim rs As DAO.Recordset
>>>> Dim sSQL As String
>>>>
>>>> sSQL = "Select * From customers;"
>>>> With DAO
>>>> Set db = .OpenDatabase("mydata.mdb")
>>>> Set rs = .OpenRecordset(sSQL)
>>>> End With
>>>>
>>>> '... rest of the code
>>>>
>>>> Except I think it works a little better with the "With" in
>>>> Visual Basic.
>>>>
>>>> What's the advantage of a namespace if you have 5 different
>>>> databases to connect to?
>>>>
>>> Absolutely nothing. Namespaces are for source code separation, not
>>> database selection.
>>
>> jerry, i think he meant the DAO used in the 'with' statement...which is
>> NOT a namespace but an object instance. i believe his code sample above
>> would fail anyway since i don't recall DAO being a static class - static
>> was introduced to vb in vb.net.
>
> OK, that makes sense. Not being familiar with DAO, I wouldn't know (or
> care ;-) ).
dude, all he had to say was 'vb' and i completely lost interest from there.
;^)
what's worse is that he's probably more likely using vb 3/4 since data
access objects were obsoleted in later versions for the alimighty (laughs)
adodb class(es). that would also explain why he has no idea that
dao.interface is not the same as namespace::resource
later.
Re: Namespaces? Why?
am 02.10.2007 21:51:49 von Jerry Stuckle
Steve wrote:
> "Jerry Stuckle" wrote in message
> news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
>> Steve wrote:
>>> "Jerry Stuckle" wrote in message
>>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>>> Jim Carlock wrote:
>>>>> "RageARC" wrote...
>>>>>> using namespace curl;
>>>>>> init...
>>>>>> exec...
>>>>>> close...
>>>>> That looks like Visual Basic 3/4/5/6...
>>>>>
>>>>> Dim db As DAO.Database
>>>>> Dim rs As DAO.Recordset
>>>>> Dim sSQL As String
>>>>>
>>>>> sSQL = "Select * From customers;"
>>>>> With DAO
>>>>> Set db = .OpenDatabase("mydata.mdb")
>>>>> Set rs = .OpenRecordset(sSQL)
>>>>> End With
>>>>>
>>>>> '... rest of the code
>>>>>
>>>>> Except I think it works a little better with the "With" in
>>>>> Visual Basic.
>>>>>
>>>>> What's the advantage of a namespace if you have 5 different
>>>>> databases to connect to?
>>>>>
>>>> Absolutely nothing. Namespaces are for source code separation, not
>>>> database selection.
>>> jerry, i think he meant the DAO used in the 'with' statement...which is
>>> NOT a namespace but an object instance. i believe his code sample above
>>> would fail anyway since i don't recall DAO being a static class - static
>>> was introduced to vb in vb.net.
>> OK, that makes sense. Not being familiar with DAO, I wouldn't know (or
>> care ;-) ).
>
> dude, all he had to say was 'vb' and i completely lost interest from there.
> ;^)
>
:-) Unfortunately, I need to do some VB work still.
> what's worse is that he's probably more likely using vb 3/4 since data
> access objects were obsoleted in later versions for the alimighty (laughs)
> adodb class(es). that would also explain why he has no idea that
> dao.interface is not the same as namespace::resource
>
> later.
>
>
Yep, I understand. I use the adodb interface in VB, though - it really
is better.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Namespaces? Why?
am 02.10.2007 23:23:35 von Steve
"Jerry Stuckle" wrote in message
news:wLadnevBs7BCPJ_anZ2dnUVZ_tjinZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
>>> Steve wrote:
>>>> "Jerry Stuckle" wrote in message
>>>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>>>> Jim Carlock wrote:
>>>>>> "RageARC" wrote...
>>>>>>> using namespace curl;
>>>>>>> init...
>>>>>>> exec...
>>>>>>> close...
>>>>>> That looks like Visual Basic 3/4/5/6...
>>>>>>
>>>>>> Dim db As DAO.Database
>>>>>> Dim rs As DAO.Recordset
>>>>>> Dim sSQL As String
>>>>>>
>>>>>> sSQL = "Select * From customers;"
>>>>>> With DAO
>>>>>> Set db = .OpenDatabase("mydata.mdb")
>>>>>> Set rs = .OpenRecordset(sSQL)
>>>>>> End With
>>>>>>
>>>>>> '... rest of the code
>>>>>>
>>>>>> Except I think it works a little better with the "With" in
>>>>>> Visual Basic.
>>>>>>
>>>>>> What's the advantage of a namespace if you have 5 different
>>>>>> databases to connect to?
>>>>>>
>>>>> Absolutely nothing. Namespaces are for source code separation, not
>>>>> database selection.
>>>> jerry, i think he meant the DAO used in the 'with' statement...which is
>>>> NOT a namespace but an object instance. i believe his code sample above
>>>> would fail anyway since i don't recall DAO being a static class -
>>>> static was introduced to vb in vb.net.
>>> OK, that makes sense. Not being familiar with DAO, I wouldn't know (or
>>> care ;-) ).
>>
>> dude, all he had to say was 'vb' and i completely lost interest from
>> there. ;^)
>>
>
> :-) Unfortunately, I need to do some VB work still.
don't get me wrong...i use vb.net all the time. however, it's more like a
programming language than whatever they call vb < .net these days.
>> what's worse is that he's probably more likely using vb 3/4 since data
>> access objects were obsoleted in later versions for the alimighty
>> (laughs) adodb class(es). that would also explain why he has no idea that
>> dao.interface is not the same as namespace::resource
>>
>> later.
>
> Yep, I understand. I use the adodb interface in VB, though - it really is
> better.
worlds better...just don't bind form controls to it. vb.net's adodb is
supposed to have fixed all the crap that happened doing that in the past.
however, i was so frustrated with 'the past' that i still keep a middle man
(my o.m.) inbetween the ui and db layers.
Re: Namespaces? Why?
am 03.10.2007 00:24:59 von Jim Carlock
"Steve" wrote...
: i think he meant the DAO used in the 'with' statement...
: which is NOT a namespace but an object instance. i believe
: his code sample above would fail anyway since i don't recall
: DAO being a static class - static was introduced to vb in
: vb.net.
You're right. I've got to use a user-defined type, object or
Variant with the With statement.
Private Function ConnectToDb(sFQFN As String) As DAO.Database
Dim oDb As DAO.Database
With oDb
Set oDb = DAO.OpenDatabase(sDb)
'Doesn't do much or show much here.
'But if we were to include an oRs As DAO.Recordset we then
'could use the following...
'
'Set oRs = .OpenRecordset(sSQL)
'
'And if so desired, we could return a DAO.Recordset.
End With
Set ConnectToDb = oDb
End Function
Good catch, Steve. I encoded it to confirm it.
--
Jim Carlock
Swimming Pool, Spa And Water Feature Builders
http://www.aquaticcreationsnc.com/
Re: Namespaces? Why?
am 03.10.2007 00:34:02 von Steve
"Jim Carlock" wrote in message
news:4702c543$0$20585$4c368faf@roadrunner.com...
> "Steve" wrote...
> : i think he meant the DAO used in the 'with' statement...
> : which is NOT a namespace but an object instance. i believe
> : his code sample above would fail anyway since i don't recall
> : DAO being a static class - static was introduced to vb in
> : vb.net.
>
> You're right. I've got to use a user-defined type, object or
> Variant with the With statement.
>
> Private Function ConnectToDb(sFQFN As String) As DAO.Database
> Dim oDb As DAO.Database
>
> With oDb
> Set oDb = DAO.OpenDatabase(sDb)
> 'Doesn't do much or show much here.
> 'But if we were to include an oRs As DAO.Recordset we then
> 'could use the following...
> '
> 'Set oRs = .OpenRecordset(sSQL)
> '
> 'And if so desired, we could return a DAO.Recordset.
> End With
> Set ConnectToDb = oDb
> End Function
>
> Good catch, Steve. I encoded it to confirm it.
i've spent years in many languages, paid to make the hell-marries. ;^)
here's one for you that i'm suprised you didn't come back with. in vb <
..net, you can create global objects that simulate static classes - in that
when the app is initialized, one instance of it is created. however, you
only call its methods and cannot refer to it as object.interface...just
interface. afaikr. either way, vb.net is the first version that has both
static classes and namespace support.
cheers.
Re: Namespaces? Why?
am 03.10.2007 00:38:51 von Steve
"Jim Carlock" wrote in message
news:4702c543$0$20585$4c368faf@roadrunner.com...
> "Steve" wrote...
> : i think he meant the DAO used in the 'with' statement...
> : which is NOT a namespace but an object instance. i believe
> : his code sample above would fail anyway since i don't recall
> : DAO being a static class - static was introduced to vb in
> : vb.net.
>
> You're right. I've got to use a user-defined type, object or
> Variant with the With statement.
>
> Private Function ConnectToDb(sFQFN As String) As DAO.Database
> Dim oDb As DAO.Database
>
> With oDb
> Set oDb = DAO.OpenDatabase(sDb)
btw, you don't need to use DAO.OpenDatabase unless you have another class
with the same interface...which is 'collision'. even though you specify
DAO.OpenDatabase and avoid the collision, it only resembles namespaces here
because you are trying to acheive the same thing as a namespace. however, i
have to keep saying, they are NOT the same.
make sense?
Re: Namespaces? Why?
am 03.10.2007 01:15:12 von Jim Carlock
"Steve" wrote...
: btw, you don't need to use DAO.OpenDatabase unless you have
: another class with the same interface...which is 'collision'.
: even though you specify DAO.OpenDatabase and avoid the
: collision, it only resembles namespaces here because you are
: trying to acheive the same thing as a namespace. however, i
: have to keep saying, they are NOT the same.
:
: make sense?
Right. I knew that I did not need DAO.
Re: Namespaces? Why?
am 03.10.2007 03:44:04 von Steve
"Jim Carlock" wrote in message
news:4702d105$0$9559$4c368faf@roadrunner.com...
> "Steve" wrote...
> : btw, you don't need to use DAO.OpenDatabase unless you have
> : another class with the same interface...which is 'collision'.
> : even though you specify DAO.OpenDatabase and avoid the
> : collision, it only resembles namespaces here because you are
> : trying to acheive the same thing as a namespace. however, i
> : have to keep saying, they are NOT the same.
> :
> : make sense?
>
> Right. I knew that I did not need DAO.
Re: Namespaces? Why?
am 03.10.2007 05:36:48 von Jerry Stuckle
Steve wrote:
> "Jerry Stuckle" wrote in message
> news:wLadnevBs7BCPJ_anZ2dnUVZ_tjinZ2d@comcast.com...
>> Steve wrote:
>>> "Jerry Stuckle" wrote in message
>>> news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
>>>> Steve wrote:
>>>>> "Jerry Stuckle" wrote in message
>>>>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>>>>> Jim Carlock wrote:
>>>>>>> "RageARC" wrote...
>>>>>>>> using namespace curl;
>>>>>>>> init...
>>>>>>>> exec...
>>>>>>>> close...
>>>>>>> That looks like Visual Basic 3/4/5/6...
>>>>>>>
>>>>>>> Dim db As DAO.Database
>>>>>>> Dim rs As DAO.Recordset
>>>>>>> Dim sSQL As String
>>>>>>>
>>>>>>> sSQL = "Select * From customers;"
>>>>>>> With DAO
>>>>>>> Set db = .OpenDatabase("mydata.mdb")
>>>>>>> Set rs = .OpenRecordset(sSQL)
>>>>>>> End With
>>>>>>>
>>>>>>> '... rest of the code
>>>>>>>
>>>>>>> Except I think it works a little better with the "With" in
>>>>>>> Visual Basic.
>>>>>>>
>>>>>>> What's the advantage of a namespace if you have 5 different
>>>>>>> databases to connect to?
>>>>>>>
>>>>>> Absolutely nothing. Namespaces are for source code separation, not
>>>>>> database selection.
>>>>> jerry, i think he meant the DAO used in the 'with' statement...which is
>>>>> NOT a namespace but an object instance. i believe his code sample above
>>>>> would fail anyway since i don't recall DAO being a static class -
>>>>> static was introduced to vb in vb.net.
>>>> OK, that makes sense. Not being familiar with DAO, I wouldn't know (or
>>>> care ;-) ).
>>> dude, all he had to say was 'vb' and i completely lost interest from
>>> there. ;^)
>>>
>> :-) Unfortunately, I need to do some VB work still.
>
> don't get me wrong...i use vb.net all the time. however, it's more like a
> programming language than whatever they call vb < .net these days.
>
>>> what's worse is that he's probably more likely using vb 3/4 since data
>>> access objects were obsoleted in later versions for the alimighty
>>> (laughs) adodb class(es). that would also explain why he has no idea that
>>> dao.interface is not the same as namespace::resource
>>>
>>> later.
>> Yep, I understand. I use the adodb interface in VB, though - it really is
>> better.
>
> worlds better...just don't bind form controls to it. vb.net's adodb is
> supposed to have fixed all the crap that happened doing that in the past.
> however, i was so frustrated with 'the past' that i still keep a middle man
> (my o.m.) inbetween the ui and db layers.
>
>
Sounds interesting. But I don't do vb.net. Rather, I'm trying to get my
last vb customer converted to MySQL/PHP.
Unfortunately, it's a non-profit with a large (and VERY POORLY written)
site. It's going to be expensive to do it right, even if I give them a
discount.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Namespaces? Why?
am 03.10.2007 07:43:55 von Steve
"Jerry Stuckle" wrote in message
news:uf6dnf6WwM5ek57anZ2dnUVZ_gWdnZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:wLadnevBs7BCPJ_anZ2dnUVZ_tjinZ2d@comcast.com...
>>> Steve wrote:
>>>> "Jerry Stuckle" wrote in message
>>>> news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
>>>>> Steve wrote:
>>>>>> "Jerry Stuckle" wrote in message
>>>>>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>>>>>> Jim Carlock wrote:
>>>>>>>> "RageARC" wrote...
>>>>>>>>> using namespace curl;
>>>>>>>>> init...
>>>>>>>>> exec...
>>>>>>>>> close...
>>>>>>>> That looks like Visual Basic 3/4/5/6...
>>>>>>>>
>>>>>>>> Dim db As DAO.Database
>>>>>>>> Dim rs As DAO.Recordset
>>>>>>>> Dim sSQL As String
>>>>>>>>
>>>>>>>> sSQL = "Select * From customers;"
>>>>>>>> With DAO
>>>>>>>> Set db = .OpenDatabase("mydata.mdb")
>>>>>>>> Set rs = .OpenRecordset(sSQL)
>>>>>>>> End With
>>>>>>>>
>>>>>>>> '... rest of the code
>>>>>>>>
>>>>>>>> Except I think it works a little better with the "With" in
>>>>>>>> Visual Basic.
>>>>>>>>
>>>>>>>> What's the advantage of a namespace if you have 5 different
>>>>>>>> databases to connect to?
>>>>>>>>
>>>>>>> Absolutely nothing. Namespaces are for source code separation, not
>>>>>>> database selection.
>>>>>> jerry, i think he meant the DAO used in the 'with' statement...which
>>>>>> is NOT a namespace but an object instance. i believe his code sample
>>>>>> above would fail anyway since i don't recall DAO being a static
>>>>>> class - static was introduced to vb in vb.net.
>>>>> OK, that makes sense. Not being familiar with DAO, I wouldn't know
>>>>> (or care ;-) ).
>>>> dude, all he had to say was 'vb' and i completely lost interest from
>>>> there. ;^)
>>>>
>>> :-) Unfortunately, I need to do some VB work still.
>>
>> don't get me wrong...i use vb.net all the time. however, it's more like a
>> programming language than whatever they call vb < .net these days.
>>
>>>> what's worse is that he's probably more likely using vb 3/4 since data
>>>> access objects were obsoleted in later versions for the alimighty
>>>> (laughs) adodb class(es). that would also explain why he has no idea
>>>> that dao.interface is not the same as namespace::resource
>>>>
>>>> later.
>>> Yep, I understand. I use the adodb interface in VB, though - it really
>>> is better.
>>
>> worlds better...just don't bind form controls to it. vb.net's adodb is
>> supposed to have fixed all the crap that happened doing that in the past.
>> however, i was so frustrated with 'the past' that i still keep a middle
>> man (my o.m.) inbetween the ui and db layers.
>
> Sounds interesting. But I don't do vb.net. Rather, I'm trying to get my
> last vb customer converted to MySQL/PHP.
>
> Unfortunately, it's a non-profit with a large (and VERY POORLY written)
> site. It's going to be expensive to do it right, even if I give them a
> discount.
have fun with that. ;^)
Re: Namespaces? Why?
am 03.10.2007 13:23:49 von Jerry Stuckle
Steve wrote:
> "Jerry Stuckle" wrote in message
> news:uf6dnf6WwM5ek57anZ2dnUVZ_gWdnZ2d@comcast.com...
>> Steve wrote:
>>> "Jerry Stuckle" wrote in message
>>> news:wLadnevBs7BCPJ_anZ2dnUVZ_tjinZ2d@comcast.com...
>>>> Steve wrote:
>>>>> "Jerry Stuckle" wrote in message
>>>>> news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
>>>>>> Steve wrote:
>>>>>>> "Jerry Stuckle" wrote in message
>>>>>>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>>>>>>> Jim Carlock wrote:
>>>>>>>>> "RageARC" wrote...
>>>>>>>>>> using namespace curl;
>>>>>>>>>> init...
>>>>>>>>>> exec...
>>>>>>>>>> close...
>>>>>>>>> That looks like Visual Basic 3/4/5/6...
>>>>>>>>>
>>>>>>>>> Dim db As DAO.Database
>>>>>>>>> Dim rs As DAO.Recordset
>>>>>>>>> Dim sSQL As String
>>>>>>>>>
>>>>>>>>> sSQL = "Select * From customers;"
>>>>>>>>> With DAO
>>>>>>>>> Set db = .OpenDatabase("mydata.mdb")
>>>>>>>>> Set rs = .OpenRecordset(sSQL)
>>>>>>>>> End With
>>>>>>>>>
>>>>>>>>> '... rest of the code
>>>>>>>>>
>>>>>>>>> Except I think it works a little better with the "With" in
>>>>>>>>> Visual Basic.
>>>>>>>>>
>>>>>>>>> What's the advantage of a namespace if you have 5 different
>>>>>>>>> databases to connect to?
>>>>>>>>>
>>>>>>>> Absolutely nothing. Namespaces are for source code separation, not
>>>>>>>> database selection.
>>>>>>> jerry, i think he meant the DAO used in the 'with' statement...which
>>>>>>> is NOT a namespace but an object instance. i believe his code sample
>>>>>>> above would fail anyway since i don't recall DAO being a static
>>>>>>> class - static was introduced to vb in vb.net.
>>>>>> OK, that makes sense. Not being familiar with DAO, I wouldn't know
>>>>>> (or care ;-) ).
>>>>> dude, all he had to say was 'vb' and i completely lost interest from
>>>>> there. ;^)
>>>>>
>>>> :-) Unfortunately, I need to do some VB work still.
>>> don't get me wrong...i use vb.net all the time. however, it's more like a
>>> programming language than whatever they call vb < .net these days.
>>>
>>>>> what's worse is that he's probably more likely using vb 3/4 since data
>>>>> access objects were obsoleted in later versions for the alimighty
>>>>> (laughs) adodb class(es). that would also explain why he has no idea
>>>>> that dao.interface is not the same as namespace::resource
>>>>>
>>>>> later.
>>>> Yep, I understand. I use the adodb interface in VB, though - it really
>>>> is better.
>>> worlds better...just don't bind form controls to it. vb.net's adodb is
>>> supposed to have fixed all the crap that happened doing that in the past.
>>> however, i was so frustrated with 'the past' that i still keep a middle
>>> man (my o.m.) inbetween the ui and db layers.
>> Sounds interesting. But I don't do vb.net. Rather, I'm trying to get my
>> last vb customer converted to MySQL/PHP.
>>
>> Unfortunately, it's a non-profit with a large (and VERY POORLY written)
>> site. It's going to be expensive to do it right, even if I give them a
>> discount.
>
> have fun with that. ;^)
>
>
Thanks... :-)
What can I say. Every page starts out with
<%ON ERROR RESUME NEXT%>
And when I make changes to a page, I need to go back and fix the
existing errors before I can add new code.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Namespaces? Why?
am 03.10.2007 15:03:57 von Steve
"Jerry Stuckle" wrote in message
news:UcWdnVhU4tek4Z7anZ2dnUVZ_tzinZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:uf6dnf6WwM5ek57anZ2dnUVZ_gWdnZ2d@comcast.com...
>>> Steve wrote:
>>>> "Jerry Stuckle" wrote in message
>>>> news:wLadnevBs7BCPJ_anZ2dnUVZ_tjinZ2d@comcast.com...
>>>>> Steve wrote:
>>>>>> "Jerry Stuckle" wrote in message
>>>>>> news:Qu2dndheJM6izJ_anZ2dnUVZ_vLinZ2d@comcast.com...
>>>>>>> Steve wrote:
>>>>>>>> "Jerry Stuckle" wrote in message
>>>>>>>> news:7KKdnSei3tvGMpzanZ2dnUVZ_vqpnZ2d@comcast.com...
>>>>>>>>> Jim Carlock wrote:
>>>>>>>>>> "RageARC" wrote...
>>>>>>>>>>> using namespace curl;
>>>>>>>>>>> init...
>>>>>>>>>>> exec...
>>>>>>>>>>> close...
>>>>>>>>>> That looks like Visual Basic 3/4/5/6...
>>>>>>>>>>
>>>>>>>>>> Dim db As DAO.Database
>>>>>>>>>> Dim rs As DAO.Recordset
>>>>>>>>>> Dim sSQL As String
>>>>>>>>>>
>>>>>>>>>> sSQL = "Select * From customers;"
>>>>>>>>>> With DAO
>>>>>>>>>> Set db = .OpenDatabase("mydata.mdb")
>>>>>>>>>> Set rs = .OpenRecordset(sSQL)
>>>>>>>>>> End With
>>>>>>>>>>
>>>>>>>>>> '... rest of the code
>>>>>>>>>>
>>>>>>>>>> Except I think it works a little better with the "With" in
>>>>>>>>>> Visual Basic.
>>>>>>>>>>
>>>>>>>>>> What's the advantage of a namespace if you have 5 different
>>>>>>>>>> databases to connect to?
>>>>>>>>>>
>>>>>>>>> Absolutely nothing. Namespaces are for source code separation,
>>>>>>>>> not database selection.
>>>>>>>> jerry, i think he meant the DAO used in the 'with'
>>>>>>>> statement...which is NOT a namespace but an object instance. i
>>>>>>>> believe his code sample above would fail anyway since i don't
>>>>>>>> recall DAO being a static class - static was introduced to vb in
>>>>>>>> vb.net.
>>>>>>> OK, that makes sense. Not being familiar with DAO, I wouldn't know
>>>>>>> (or care ;-) ).
>>>>>> dude, all he had to say was 'vb' and i completely lost interest from
>>>>>> there. ;^)
>>>>>>
>>>>> :-) Unfortunately, I need to do some VB work still.
>>>> don't get me wrong...i use vb.net all the time. however, it's more like
>>>> a programming language than whatever they call vb < .net these days.
>>>>
>>>>>> what's worse is that he's probably more likely using vb 3/4 since
>>>>>> data access objects were obsoleted in later versions for the
>>>>>> alimighty (laughs) adodb class(es). that would also explain why he
>>>>>> has no idea that dao.interface is not the same as namespace::resource
>>>>>>
>>>>>> later.
>>>>> Yep, I understand. I use the adodb interface in VB, though - it
>>>>> really is better.
>>>> worlds better...just don't bind form controls to it. vb.net's adodb is
>>>> supposed to have fixed all the crap that happened doing that in the
>>>> past. however, i was so frustrated with 'the past' that i still keep a
>>>> middle man (my o.m.) inbetween the ui and db layers.
>>> Sounds interesting. But I don't do vb.net. Rather, I'm trying to get my
>>> last vb customer converted to MySQL/PHP.
>>>
>>> Unfortunately, it's a non-profit with a large (and VERY POORLY written)
>>> site. It's going to be expensive to do it right, even if I give them a
>>> discount.
>>
>> have fun with that. ;^)
>
> Thanks... :-)
>
> What can I say. Every page starts out with
>
> <%ON ERROR RESUME NEXT%>
oh the days. i'm so glad i'm not involved in work with that kind of mindset
any more.
Re: Namespaces? Why?
am 03.10.2007 20:44:51 von Jim Carlock
"Jim Carlock" wrote...
> If I can only figure out how to get PHP to link/connect to an
> ActiveX DLL without use any of that CreateObject syntax...
"Steve" wrote...
: You'd really be shooting yourself in the foot to use a dll
: for db access. Why not use the built-in ODBC functionality?
Well, there's two things I want to know.
(1) How to connect to an ActiveX dll through PHP.
(2) How to connect to a standard dll through PHP.
I know I can throw something into httpd.conf to get a dll in
there, but I don't think that includes ActiveX dlls. SO the
big advantage would be to have a PHP STATEMENT like:
I'm thinking along those lines. It would end up as a Windows
only thing, as I do not think the *nix OS support any type
of ActiveX function, but perhaps it can get be done in *nix
and an added constant can show up (LIBRARY_UNIX). I just do
not know much about *nix at the moment. Still messing with
doing installs of *nix.
I bet this can be done in VB a little easier, then converted
to C++ or another language.
It's just something that crossed my mind and now that I'm
thinking about it, it would be a really nice way to connect
and disconnect from DLLs.
It might be possible to do automatic garbage cleanup, but
that might depend upon the type of library connected to.
It requires some security to manage the implementation/
installation of connection to the DLL (library).
--
Jim Carlock
Swimming Pool, Spa And Water Feature Builders
http://www.aquaticcreationsnc.com/
Re: Namespaces? Why?
am 03.10.2007 21:20:12 von Steve
"Jim Carlock" wrote in message
news:4703e327$0$32516$4c368faf@roadrunner.com...
> "Jim Carlock" wrote...
>> If I can only figure out how to get PHP to link/connect to an
>> ActiveX DLL without use any of that CreateObject syntax...
>
> "Steve" wrote...
> : You'd really be shooting yourself in the foot to use a dll
> : for db access. Why not use the built-in ODBC functionality?
>
> Well, there's two things I want to know.
>
> (1) How to connect to an ActiveX dll through PHP.
> (2) How to connect to a standard dll through PHP.
>
both using COM. if by 'activex dll' you mean NOT a control, then it's all
done the same way...via php's COM() function.
> I know I can throw something into httpd.conf to get a dll in
> there, but I don't think that includes ActiveX dlls. SO the
> big advantage would be to have a PHP STATEMENT like:
>
> $dwErr = ConnectToDll($dwPathToMyActiveX, DLL_ACTIVEX, DLL_CONNECT);
> $dwErr = ConnectToDll($dwPathToMyDLL, DLL_STANDARD, DLL_CONNECT);
>
> I'm thinking along those lines. It would end up as a Windows
> only thing, as I do not think the *nix OS support any type
> of ActiveX function, but perhaps it can get be done in *nix
> and an added constant can show up (LIBRARY_UNIX). I just do
> not know much about *nix at the moment. Still messing with
> doing installs of *nix.
>
> I bet this can be done in VB a little easier, then converted
> to C++ or another language.
and "this" is ... what? a db consumer object that need not be built?
> It's just something that crossed my mind and now that I'm
> thinking about it, it would be a really nice way to connect
> and disconnect from DLLs.
>
> It might be possible to do automatic garbage cleanup, but
> that might depend upon the type of library connected to.
>
> It requires some security to manage the implementation/
> installation of connection to the DLL (library).