Recent

Author Topic: access a database over network  (Read 11856 times)

slightlybartfast

  • Newbie
  • Posts: 5
access a database over network
« on: May 20, 2009, 09:26:03 am »
I need to know if this is possible.
I'm creating a program that reads and writes to a database, simple enough...i know.

The part that's stretching me, is that i need to be able to connect to it using an ip address, and path. This is so that my app works over a local network, or web network.

If someone could let me know if this is possible, then that'd be good.
If someone could give me some pointers, if its complicated, then...If I knew you...I'd be your friend for life.

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
Re: access a database over network
« Reply #1 on: May 20, 2009, 10:05:57 am »
Firebird, MySql, PostgresSQL etc.... works with sockets listening to a port in the machine when server is hosted. Or you can put a sqlite DB on a shared folder for example

If you specify, some points will be more usefull.
wich Database?
connection will be throug LAN or WAN?

cpalx

  • Hero Member
  • *****
  • Posts: 754
Re: access a database over network
« Reply #2 on: May 20, 2009, 06:16:40 pm »
dont forget to configure the database server to listen connections

slightlybartfast

  • Newbie
  • Posts: 5
Re: access a database over network
« Reply #3 on: May 20, 2009, 08:13:44 pm »
I need it to read and write to a database over a WAN.
Ideally I would like to use a MySQL database, as that's the system I know.

slightlybartfast

  • Newbie
  • Posts: 5
Re: access a database over network
« Reply #4 on: May 20, 2009, 08:27:09 pm »
Ive just spoken to a friend, who said that utorrent has a web ui feature, and that I should look into that.
He also said that my issue would be needing to have the database on a server running on the machine.
Could my app be a server, as utorrents web ui seems to work with out a seperate one?
or am I now way off track?

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
Re: access a database over network
« Reply #5 on: May 20, 2009, 08:54:33 pm »
I dont know about uTorrent, but I dare to suppose some things.
I suppose, uTorrent, the only thing it does, is implement a little web server listening at port 80.

If you want to application works like a "server", the only thing you need, is to listen some port, and write some type of communication throug it.

I think, if you specify exactly what you need to do (a web to show me in bikini, an app thath speaks on chinese, a console application to manage my networks cards, etc...), will be more usefull.

slightlybartfast

  • Newbie
  • Posts: 5
Re: access a database over network
« Reply #6 on: May 20, 2009, 09:32:11 pm »
What I'm looking at doing is creating a program that monitors how many files are in a folder, and then stores this data in a database to be read by another program, remotely on another computer.

cpalx

  • Hero Member
  • *****
  • Posts: 754
Re: access a database over network
« Reply #7 on: May 21, 2009, 07:19:55 pm »
first of all. You must configure your route to redirect to your data server
second, you must configure your mysql server to listen remote conecctions.
third, you must to put the server data information to yout mysql component, like ip server (or domain name), port, username, passwd, database name,

good luck
CpaL

slightlybartfast

  • Newbie
  • Posts: 5
Re: access a database over network
« Reply #8 on: May 25, 2009, 11:25:19 am »
Lord_ZealoN,

"If you want to application works like a "server", the only thing you need, is to listen some port, and write some type of communication throug it."

you make that sound so easy, lol...Ive spent days trying to find a way of doing that in lazarus.
I found this:

http://www.realthinclient.com/flash/SrvLesson1.htm

However I cant afford that component. Is there a way inside of lazarus, that i couldn't find, to broadcast html code through port 80?

this sounds like a more straight forward way of achieving my result.

thanks,

Slightly


cpalx:

thanks for that. Ive been using mysql on my 1and1 hosting account, and after trying to get this to work, found out that they don't let you access your database from outside of your web site. Rubbish!

I thought that was the answer for a bit....oh well!

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
Re: access a database over network
« Reply #9 on: May 25, 2009, 01:09:56 pm »
Well, you are right. Sorry, I forgot to quote "only thing"  O:-)

There are muuuuch time I don't develop on "Delphi", and I never needed to develop something like this so, I can't help you with this sorry.

But, I suppose, you need to go for the way of Indy Components: http://www.indyproject.org/index.en.aspx

Lord_ZealoN,

"If you want to application works like a "server", the only thing you need, is to listen some port, and write some type of communication throug it."

you make that sound so easy, lol...Ive spent days trying to find a way of doing that in lazarus.
I found this:

http://www.realthinclient.com/flash/SrvLesson1.htm

However I cant afford that component. Is there a way inside of lazarus, that i couldn't find, to broadcast html code through port 80?

this sounds like a more straight forward way of achieving my result.

thanks,

Slightly


cpalx:

thanks for that. Ive been using mysql on my 1and1 hosting account, and after trying to get this to work, found out that they don't let you access your database from outside of your web site. Rubbish!

I thought that was the answer for a bit....oh well!

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
Re: access a database over network
« Reply #10 on: May 25, 2009, 01:11:46 pm »

 

TinyPortal © 2005-2018