473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Windows App to MySql table

I have a C++ Builder APP that uses the Advantage database. I want to export
data from the Advantage tables to a MySQL database on my website.

What is the best way to get my data into the MySQL table ? I am only
looking at 10-15 records, but I would be updating every 10 seconds or so.

I could create a text file and upload it via FTP, and then a PHP script
could load the text file into MySQL, but I am sure you guys know a better
way to do it.

Thanks,
Doug
Jul 23 '05 #1
5 1840
Douglas Hay wrote:
I could create a text file and upload it via FTP, and then a PHP script
could load the text file into MySQL, but I am sure you guys know a better
way to do it.


Well if you are sure that you have only small amount of data, you could
send the data as a POST or GET parameters to your PHP script. You can
also upload a file directly to PHP script, which is pretty simple to do
manually, but requires usually some knowledge of http headers if you
want to do that from a program.

You can also directly connect to remote MySQL server, if the server is
configured to allow that.

You could also use secure file transfer protocol instead of FTP and
disable the security risk that comes with FTP.
Jul 23 '05 #2
I need to send the data every 10 seconds or so, so I was afraid to send the
data through a browser as PHP parameters because it would be slow.

I will try to find some info on Secure FTP. Thanks,

Doug
"Aggro" <sp**********@yahoo.com> wrote in message
news:Ka***************@read3.inet.fi...
Douglas Hay wrote:
I could create a text file and upload it via FTP, and then a PHP script
could load the text file into MySQL, but I am sure you guys know a better
way to do it.


Well if you are sure that you have only small amount of data, you could
send the data as a POST or GET parameters to your PHP script. You can also
upload a file directly to PHP script, which is pretty simple to do
manually, but requires usually some knowledge of http headers if you want
to do that from a program.

You can also directly connect to remote MySQL server, if the server is
configured to allow that.

You could also use secure file transfer protocol instead of FTP and
disable the security risk that comes with FTP.

Jul 23 '05 #3
Douglas Hay wrote:
I need to send the data every 10 seconds or so, so I was afraid to send the
data through a browser as PHP parameters because it would be slow.


If you need it to be fast, then connect directly to the MySQL server and
insert the data there. Every other way will be slower, unless the amount
of data is so large or network connection so slow that you get speed
increase by packing the data before transfer and unpacking it at the server.

If you won't use any data packing, then secure file transfer won't be
any faster than sending the data directly to a PHP script.

How you should do this, depends very much on what you can do. For
example if you are allowed only to listen port 80 at the server side,
then you can't connect directly to MySQL and you can't use SSH or FTP
protocols.

And I really hope that you didn't plan to start a web browser like
Firefox or IE to send the data? That would be slow. There are other ways
to send data to PHP scripts, depending on the programming language you
are using.
Jul 23 '05 #4
I know a browser would be horribly slow! I am using C++ Builder. I have
tried uploading a .TXT file to the site, and then a PHP script displays it
every 10 seconds. It works but it isn't ideal. Can you suggest a way to
get data to a PHP script without using a browser ? I don't have to have it
store into the MySQL database at this time.

Thanks!
Doug
"Aggro" <sp**********@yahoo.com> wrote in message
news:E%***************@read3.inet.fi...
Douglas Hay wrote:
I need to send the data every 10 seconds or so, so I was afraid to send
the data through a browser as PHP parameters because it would be slow.


If you need it to be fast, then connect directly to the MySQL server and
insert the data there. Every other way will be slower, unless the amount
of data is so large or network connection so slow that you get speed
increase by packing the data before transfer and unpacking it at the
server.

If you won't use any data packing, then secure file transfer won't be any
faster than sending the data directly to a PHP script.

How you should do this, depends very much on what you can do. For example
if you are allowed only to listen port 80 at the server side, then you
can't connect directly to MySQL and you can't use SSH or FTP protocols.

And I really hope that you didn't plan to start a web browser like Firefox
or IE to send the data? That would be slow. There are other ways to send
data to PHP scripts, depending on the programming language you are using.

Jul 23 '05 #5
Douglas Hay wrote:
I know a browser would be horribly slow! I am using C++ Builder. I have
tried uploading a .TXT file to the site, and then a PHP script displays it
every 10 seconds. It works but it isn't ideal. Can you suggest a way to
get data to a PHP script without using a browser ? I don't have to have it
store into the MySQL database at this time.


Well basicly you need to write a small part of a normal browser in your
program, which should simulate normal HTTP POST by calling the php
script with parameters, where you would store the information you need
to transfer. If you have a large amount of parameters, you need to
simulate file upload.

Making a software with php that allows you to manually upload files is
pretty simple, see this page for examples and info:
http://fi.php.net/manual/fi/features.file-upload.php

Writing the C++ side could be triggier, unless you have a good library
functions to do the most of your work. You need to find information how
to use commit HTTP POST from your application and how you need to modify
the headers to be able to send file within the POST.

Anyway, since this doesn't have anything to do with MySQL this is
propably wrong group for this subject, and I'm not the best person to
tell you how to do it. Propably they know better in a group where you
can ask questions about how to program using your compiler.

(Don't try asking in comp.lang.c++ or comp.lang.learn.c-c++ since they
allow only questions about standard C++ and you can't do this with
standard C++)
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gabriel Harrison | last post by:
Hi, I know from the MySQL documentation that Windows in not case sensitive and Unix is but can I force Windows to honour upper and lower case in table names. When writing the mySQL on windows...
3
by: Sonu K Mehrotra | last post by:
mysql server is <172.16.27.39> running on Linux 9.1 I have installed mysql control center (client GUI) on 172.16.27.252 running on Windows 2000 advanced server The machines are connected in...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
1
by: David | last post by:
Hi, I currently administer our MySQL db version 3.23.56 on a Linux Cobalt Qube server via an external fron-end piece of software. My Table Names have capital letters at the beginning, i.e....
1
by: daniel kern | last post by:
Please help with the following issue. I am trying to dump a table. My mysqldump command is: mysqldump.exe -u xx -P xx --add-drop-table --quick --extended-insert --result-file=xx "--where=cdrdate...
39
by: Mairhtin O'Feannag | last post by:
Hello, I have a client (customer) who asked the question : "Why would I buy and use UDB, when MySql is free?" I had to say I was stunned. I have no experience with MySql, so I was left sort...
4
by: John | last post by:
Hello all, I'm trying to display a dataset into a datagrid and format the datagrid columns but I'm having a hard time with it. I've tried the MSDN examples but they don't seem to work. ...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
3
by: JAYO | last post by:
The MySQL table is located in a Linux Server OS, so I need the information from that table for updating Paradox tables in Windows OS. If a PHP program in the Linux Server can save a file with the...
0
JamieHowarth0
by: JamieHowarth0 | last post by:
I have been trying to find a solution to this on the Internet for months. Literally, ages and ages and ages, praying that someone in the open-source community has enough knowledge to put together an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.