How to retrieve values from a Database for computation?

VKSB 236 Reputation points
2024-03-05T14:38:26.1866667+00:00

Hi all,

I am writing an Astrology program, where I need to use Latitude & Longitude of places for the calculation to create a Horoscope. I have made a Database of Latitude & Longitude of places.

Capture

I couldn't find out how to get the values of Latitude & Longitude of a particular place (city) from the Database to compute the planetary positions.

For an example, I want to get the Latitude & Longitude of "Liverpool" for the calculation. I know how to search for "Liverpool" but couldn't figure out how to get the "Values" of Latitude & Longitude.

Could you please let me know how to do this?

Thanks,

VKSB

Developer technologies | VB
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 61,096 Reputation points
    2024-03-05T15:38:36.7866667+00:00

    Are you already hooked up to your Access database in your application? If so then what data access library are you using? Posting any relevant code would be useful.

    As for how to get the data from Access (or any database) then something like this works.

    SELECT Latitude, Longitude FROM <tablename> WHERE City = 'Liverpool'
    

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.