Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / October 2003



Tip: Looking for answers? Try searching our database.

how to use mysql

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elicend_News - 29 Oct 2003 11:14 GMT
hi

in order to stock a lot of information, i want to use some BD like mysql  (i
use mysql with php, i don't use access... so i don't know anything about
access)

what is the best way to use a mysql file (??) with an exe file built under
vb6?

do you have some example?

I only want that one who use my exe will not have to install something else
to use mysql

i asked yesterday for saving setting in a ini file, but i think that method
is not appropriate with the number of information that i have to stock
(name, surename, nikename, best lap line 1 to 8, etc....)
[don't worry !!! i use what you told me yesterday for my setting and it's
great!]

Thanks a lot

Elicend
J French - 29 Oct 2003 11:32 GMT
Have you thought about storing data in multiple INI files ?

Or rather one file containing multiple INI files

These days that sort of data storage is getting trendy
- they call it XML

>hi
>
[quoted text clipped - 19 lines]
>
>Elicend
Elicend_News - 29 Oct 2003 13:23 GMT
french? moi je suis francais... au cas ou tu parles francais ;)

Yes, i thought to that type of storing, but i'm afraid by the number of
informations to stock, i've got about 20 parameters by person, and, i think
for the moment i've about 10 persons to stock = 200 data which are
structured always in the same way... in PHP i would chose to use a mysql
table, that's why i thought to that solution in VB... maybe i'm wrong ?
then person wont be the only things i'm going to store... i'll have some
cars, place to race etc...

well... i didn't ear anything about XML, but i saw those file i think... do
you know more about this??

thanks for your answer :)

> Have you thought about storing data in multiple INI files ?
>
[quoted text clipped - 26 lines]
> >
> >Elicend
Randy Day - 29 Oct 2003 17:32 GMT
> french? moi je suis francais... au cas ou tu parles francais ;)
>
[quoted text clipped - 5 lines]
> then person wont be the only things i'm going to store... i'll have some
> cars, place to race etc...

I've used VB as a front end to a MySQL database - works
fine. Then again, my app only uses SELECTs, INSERTs,
UPDATEs and DELETEs; I haven't needed or tried anything
more advanced.

I started out using Access, and decided to see how much
recoding would be required to change between the two.
The only real differences were a different ADO connect
string (of course) and different delimiter characters
for date fields.

I don't know if this is an issue for you, but one thing
I haven't tried is to install my app and a MySQL table
on another machine. With an Access database, I can
install my app, copy the .mdb file and go. I suspect
you may have to install MySQL on each machine...

> well... i didn't ear anything about XML, but i saw those file i think... do
> you know more about this??
Elicend_News - 30 Oct 2003 09:29 GMT
someone give me this

Check the references here: http://thelabwiz.home.mindspring.com/mysql.html
it's complete :)

thanks

> > french? moi je suis francais... au cas ou tu parles francais ;)
> >
[quoted text clipped - 25 lines]
> > well... i didn't ear anything about XML, but i saw those file i think... do
> > you know more about this??
J French - 30 Oct 2003 12:06 GMT
>french? moi je suis francais... au cas ou tu parles francais ;)

Mes ancestres etaint Francais - moi je suis Anglais

>Yes, i thought to that type of storing, but i'm afraid by the number of
>informations to stock, i've got about 20 parameters by person, and, i think
[quoted text clipped - 3 lines]
>then person wont be the only things i'm going to store... i'll have some
>cars, place to race etc...
20 parameters per record, with only 10 records
- that is not much data at all
Now something like 200 fields and 200,000 records would be getting
fairly large ....

>well... i didn't ear anything about XML, but i saw those file i think... do
>you know more about this??
They are like INI files on steroids
- personally I do not bother with them

Think seriously about writing your own filing system, distribution
MySQL or Access is not really that desirable

>thanks for your answer :)
>
[quoted text clipped - 32 lines]
>> >
>> >Elicend
Dag Sunde - 30 Oct 2003 12:48 GMT
<snipped/>

> >well... i didn't ear anything about XML, but i saw those file i think... do
> >you know more about this??
> They are like INI files on steroids
> - personally I do not bother with them

You're walking in darkness, brother!
;-)

> Think seriously about writing your own filing system, distribution
> MySQL or Access is not really that desirable

Agreed!

And here's where XML comes in...

<persons>
 <person>
   <name>Dag Sunde</name>
   <city>Arendal</city>
   <country>Norway</country>
 </person>
 <person>
   <name>Bill Clinton</name>
   <city>Washington DC</city>
   <country>USA</country>
 </person>
 <person>
   <name>Harry Hurt</name>
   <city>Savannah</city>
   <country>USA</country>
 </person>
</persons>

...And with this you can, among other things, use queries:

   ' Load the xml document
   Dim oDom As DOMDocument
   Set oDom = New DOMDocument
   If Not oDom.Load("persons.xml") Then
       MsgBox oDom.parseError.reason, vbCritical, "ERROR"
       Exit Sub
   End If

   ' Set the root node <persons> that we work from
   Dim oRoot As IXMLDOMNode
   Set oRoot = oDom.documentElement

   ' Get a list of persons from USA
   Dim oPerson As IXMLDOMNode
   Dim oPersons As IXMLDOMNodeList
   Set oPersons = oRoot.selectNodes("/person/country[=USA]")

   ' Loop thru the list of Ameicans, and print their names and cities
   For Each oPerson In oPersons
       Debug.Print oPerson.selectSingleNode("name").Text
       Debug.Print oPerson.selectSingleNode("city").Text
   Next oPerson

--
Dag.

<snipped/>
J French - 30 Oct 2003 14:10 GMT
><snipped/>
>> >
[quoted text clipped - 6 lines]
>You're walking in darkness, brother!
>;-)

Actually we 'discovered' XML back in 1990, pretty much identical
except we used '{' instead of '<'

The real reason why I don't use it is that around the same time we
developed a filing system that allowed us to store records of any
length - eg: thousands of INI files in one file
- does just what I and a few others need

Also I'm a bit nervous of XML as a data description 'tool' rather than
a data storage format

It does make sense as both ...
Elicend_News - 30 Oct 2003 17:48 GMT
i'll try to find some example of xml using this evenig, i'll tell you
tomorow ;)

elicend

> ><snipped/>
> >> >
[quoted text clipped - 19 lines]
>
> It does make sense as both ...
Elicend_News - 31 Oct 2003 09:21 GMT
eeee....

where do you use that code???
didnot work yesterday ;'(

thanks for your participation :)

elicend

> <snipped/>
> > >
[quoted text clipped - 61 lines]
>
> <snipped/>
Dag Sunde - 31 Oct 2003 09:42 GMT
> eeee....
>
> where do you use that code???
> didnot work yesterday ;'(
>
> thanks for your participation :)

That code was written of the top of my head in
my news-editor...

It was meant as a sample on how to use xml from VB,
not to be directly compileable.

:-)

You must go to <project> --> <references>, and add
Microsoft XML 3.0 library so VB has access to its
XML parser.

Also the XPath statement: "/person[country='USA']"
was slightly "off" syntaxwise...

Dive in here for detailed info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xm
mscxmloverview.asp


hth...

--
Dag.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.