×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

make remote view from access table mdb

make remote view from access table mdb

make remote view from access table mdb

(OP)
how can i make remote view from MS access table
tried a lot but the data is not clear and every time I open the remote view asked to locate the database again. What do I do and what is the best way to connect the Access table to the Fox Pro.

RE: make remote view from access table mdb

Which way are you trying? Using DBF in Access or an Access table in VFP?

Here you have connection strings to Access DBs: https://www.connectionstrings.com/microsoft-access...

A remote view will need a connection object in a DBC establishing such a connection. And for sake of not needing to locate the database again and again, well, it needs to be in a specific location, just like a DBF, an mdb or accdb or accbd file depending on the version.

I donÄt know what changes, in Access just like in VFP you could create new tables, you easily have moving targets if you create DBFs per day and Access tables per day, you will also need new remote views per day.

Either you have changing file locations changing databases, new tables per day or you don't store the DBC with the connection object and don't save your remote view in it. But it's not hard to have a DBC for remote views to a certain access db that works as long as the access db exists.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: make remote view from access table mdb

(OP)
First, I agree with you that Fox Pro is much better than Ms access in the possibilities and ease of handling data, etc.

Second, I resorted to the way to connect an Access table within the Fox Pro for the use of existing data in the Access and deal with it within the environment of the Fox Pro ... This confirms the superiority of the Fox Pro on the Access

Thirdly, I thank you for giving me the link on how to link the Access with the Fox Pro, and I have tried this link but there is a problem I hope it is simple and has a solution that is that some data appear in the table field as a memo. What is the reason and how to get rid of this phenomenon
With sincere thanks and appreciation ....
Ahmed

RE: make remote view from access table mdb

Hello Ahmed,

no need to praise VFP or degrade Access. It's fine for its purposes and it's easy to see you have a reason to connect to data from an Access application. I was just thinking about the reasons your connection was always asking for the database.

I guess you now successfully made a connection and queried data and now you're puzzled about the outcome of fields data type mapping. Without details, we're not able to help you. In general all databases have different data types and some don't map automatically. You have the possibility to specify a target data types.

So What is the structure of the Access table, what field types do you have there and what turns into a memo in VFP? How do you connect now, did you use the info I gave you to make a connection object or a DSN or make a connection via SQLStringConnect? In short: What does things look like, can you post Access code or screenshots of the tables composition and your VFP code? View definition?

You know that we can only see what you show us, so please, don't just report symptoms. You're not at a doctor, who can start examining you after you tell him your symtoms and pains. We don't have hands on your computer, do we?

Bye, Olaf.



Olaf Doschke Software Engineering
https://www.doschke.name

RE: make remote view from access table mdb

(OP)
With all the love, respect and appreciation for your guesses why to ask about the connection to the Access database
I will explain to you the Amauracather until the full picture is clear to you, my dear Olaf
First of all, I love the Fox Pro very, very very much and I found a lot of fun and many easy solutions to the problems I was encountering in Access. , But this does not mean that there are very few obstacles .. Always the beautiful thing is not complete. But in any case it is much better than Access.
Now explain the problem in detail and images.







RE: make remote view from access table mdb

Ok, thank you for the details. I'm not an Access Expert, but I think the field type "Text" all your Access table fields have, corresponds to VFPs Memo.
So I would even expect all the columns to come over as Memo fields in VFP.

You can right-click in the grey area of the remote view designer and get a context menu with one menu item being "View SQL". Besides the SQL query you'll find a lot of DbSetProp code lines like this one:

CODE

DBSetProp(ThisView+".fieldname","Field","DataType","I") 
Where the last single letter parameter is the type in its short single letter notation I for integer, M for memo, C for character, etc. There's a list of data type letters in the VFP help somewhere. You would have such lines with .name, .class, etc. and now look at what the data type letter for .Name is, it should be M for memo, look at what it is for the other fields. You can change it from Memo to C(100) or whatever other comparable fields have.

You'll need an ANSI code page for Arabic, I guess you will not be able to see the Arabic characters in VFP, as VFP isn't capable of Unicode, but you surely can get whatever field type (as long as it makes sense) that you want by changing that view property available for each view field.

Bye, Olaf.


Olaf Doschke Software Engineering
https://www.doschke.name

RE: make remote view from access table mdb

By the way, it's no good idea to store anything in data type Text, You only store single letters into Second Language and Class, you could use Char(1) for that, also you only have class A or B, that asks for a Boolean only bing 0 or 1 and at display translated to A or B. Etc. The Grade field always says "Nth grade primary", it's sufficient to store the integer number and translate that to "Nth grade primary" only when displaying it, that can be stored in an integer data type field. Either you translate 1 to First, 2 To Second etc. to show the words or you bring it down to number + "th grade primary" and maybe make 1 2 and 3 special cases with "st","nd" and "rd" instead of "th". Anyway, use the data types more wisely. There's a reason there are more than just the text data type, you want to be able to calculate with numbers or dates or prices in currencies and more. Think alone about sorting by grade, S as in "Second" comes after F as in "Fourth", but should sort before it. So only when you store rade as numeric you can sort by it easily.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: make remote view from access table mdb

(OP)
Dear Olaf
thank you very much
I have followed your instructions and have been successfully working and thanks for your back
Thank you very much .. And always and ever learn from you everything that is useful and upscale

RE: make remote view from access table mdb

Ahmed,

Good to see that Olaf has helped you solve the problem.

You were right to thank him for doing so, but did you know that the forum has a special mechanism that lets you place a star against any post that you find particularly helpful? This is useful, because if other people have a similar problem, it helps them locate a satisfactory answer.

You just jave to click "Great Post" in the bottom-right of the post.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close