Solved

how can I make a connection with a mdb in the internet?

Posted on 2007-03-20
7
186 Views
Last Modified: 2010-04-05
Hello guys,

I have an application that for validation it must connect to a mdb in the internet and do a search in a table to see if the key is registered.

How can I do this?
I use delphi 7, what component is suitable to do this? Could someone give me an example?

thanks
0
Comment
Question by:hidrau
  • 4
  • 2
7 Comments
 
LVL 18

Accepted Solution

by:
Johnjces earned 500 total points
ID: 18757841
That would be really really dangerous to open up an mdb in a file share to the Internet! One thing we need to know is this an Access database? Microsoft SQL Server also have mdb files for their database.

You might get Indy components, (my personally opinion is that Indy 9 is better and more stable than 10),  and use a server socket on some obscure port. Indy has a lot of demos that could help you through this fairly easily. All you would have to do is make a simple locate application when some specific data arrives and send it back out. You'd have to point your Internet router to your local Server's IP address and forward whatever port you decide to use.

Anyway, check out Indy components and the tons of pretty good applications. They even have a client server type database application, but to simply check for a key, that could be done pretty easily.

http://www.indyproject.org/Sockets/Download/Borland.aspx

I hope this gave you a starting point.

John
0
 
LVL 1

Author Comment

by:hidrau
ID: 18758297
Yeah, it is an access database.

Let me tell you better what I need to do.

I can have a mdb dabase with only one table that will hold keys or I can have a text file.

I need to check if this licence software has a key in the table or txt file, if it doesn't have,

this software doesn't have a legal copy.

did you get it?

I need an example how to do this.

thanks
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 18758778
Hidrau,

I think the best thing for you to learn about sockets and stuff would be download Indy 9.  Then download the Indy 9 demos from

http://www.projectindy.org/DemoDownloads/Indy9Demos_26Oct04.zip

Check out the Chat and the IdTCP demos.

From there, when a connection is made to your "authentication server" you can check the data given, put it in an SQL query or a Lookup and if found, send back on "OK" or whatever. It's almost like have string value you can check and manipulate and sending data back is just about as easy.

Maybe someone else is willing to code it up for you including the Access table lookup using ADO or whatever.

Good luck!
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:hidrau
ID: 18758825
Johnjces:, do you know cgi application?
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 18759384
No. I am sorry but I have not done anything with that. Done some ASAPI stuff but that is about it.

0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 18814850
Easiest way is to write an ASP webpage that will be used on the server to where you can send your requests. The ASP page would then just connect to the Access database, search for the key, give the result back and then it's done. This shouldn't be too complex, although it has been a while for me that I've used ASP for this. But it's the easiest server-side solution.
Then the client... It could just load the page from http://yourserver/searchkey.asp?key=somevalue which would trigger your ASP page. The page could then return either TRUE or FALSE as the whole page contents or maybe even some XML string if you want to make it more complex.
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 19057367
Did any of this help you? If not, please let us know. If so please accept one, or ask that your question be deleted and get refund of points.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now