Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Scouting (http://www.chiefdelphi.com/forums/forumdisplay.php?f=36)
-   -   Access Database help... (http://www.chiefdelphi.com/forums/showthread.php?t=26285)

kacz100 01-03-2004 23:46

Access Database help...
 
Currently I have tasked myself to create an Access database for scouting. I can easily create/delete fields quickly and do cool stuff BUT I am having 1 big problem. I want to put a picture of the robot next to the information I am gathering. After struggling for a couple days I have almost giving up. Access uses hand written code and I am lost at that. I have tried to borrow the code from other databases that do a smiliar thing, but nothing really works properly :( anything that would help would be appreciated. thanks!

gl75 01-03-2004 23:58

Re: Access Database help...
 
I'm not completely familiar with Access, but you could probably do one of 2 things:

- Upload the image data to a BLOB data type and store it directly in a field

or, since Access probably has a limited buffer...

- Upload the image to a directory and store the pathname in the field

kacz100 02-03-2004 00:02

Re: Access Database help...
 
Quote:

Originally Posted by gl75
I'm not completely familiar with Access, but you could probably do one of 2 things:

- Upload the image data to a BLOB data type and store it directly in a field

or, since Access probably has a limited buffer...

- Upload the image to a directory and store the pathname in the field

I tried the BLOB thing and I can search for the file on the computer and save the pathname but cant display it next to the data collected.

GregT 02-03-2004 00:10

Re: Access Database help...
 
Quote:

Originally Posted by kacz100
I tried the BLOB thing and I can search for the file on the computer and save the pathname but cant display it next to the data collected.


You would use an column of OLE Object data type. OR you can store the pictures in a directory with a common nameing convention (<teamnumber>.jpg) then use vba to retrieve and display that picture in a form.

Greg

kacz100 02-03-2004 00:18

Re: Access Database help...
 
How would I use vba to do that, I don't know how to code.

GregT 02-03-2004 12:38

Re: Access Database help...
 
Quote:

Originally Posted by kacz100
How would I use vba to do that, I don't know how to code.


I don't know (sorry), I'm not real big on visual basic. You can probably figure it out through google though, or use the microsoft access help and look up OLE.

Greg

Lindsey 03-03-2004 13:46

Re: Access Database help...
 
I had this problem last year (I can't write code either)
I ended up figuring out how to put pictures in after the season was over.

1. Create a field in your table to hold the pictures (Design View)
2. Set the Data Type to OLE Object
3. Switch to Data Sheet view and right click in the cell instead typing in data
4. Select Insert Object
5. Select Create From File
6. Chose Browse and select the file or type in the location

The picture won't show up in Data Sheet view, you can only view the pictures through a form or a report

Hope this helps
Lindsey

Smrtman5 17-03-2004 15:45

Re: Access Database help...
 
i am trying to make a scouting database for my palm, with dropdown menus. However, i dont know where to start. Hopefully someone could tell me what program to use and how to make a dropdown menu. Or if anyone has a program they could give me so i could add/ edit it, that would be great. Thanks

Jeremiah Johnson 17-03-2004 16:43

Re: Access Database help...
 
I know that last year Wildstang and the SigmaC@ts used a palm scouting database that you could load off of the wildstang site and download it all to SOAP. I don't know if they are doing it again this year but it would be an easier way to do it instead of making it yourself. I would check with Wildstang and SigmaC@t to see if they have it available again this year.

Greg 17-03-2004 21:00

Re: Access Database help...
 
This is an interesting problem :) I have done quite a lot of VB, so I wrote the code that shows an image of the robot on the form in an Access DB. Since you probably use a form for data entry/display, this should be what you want.

The only thing I wanted to point out is that the images are not actually stored in the database. The code only stores the path to the images. So they still have to sit on the hard drive in some folder. Why? Because Access is very inefficient at storing images and has a file size limit of around 1 GB. And this limit is reached very quickly with just a hundred JPEGs stored as OLE objects.

You can grab the example database off our web server here: http://www.sinclairsprockets.com/imagedb.zip. I hope you find it useful. And if you rename the database table you'll need to edit the code.

Greg 18-03-2004 10:23

Re: Access Database help...
 
I just found a very stupid bug in the DB I made yesterday :) Anyway, its fixed now and I uploaded the new version to the web site. If you already downloaded the old one please get the new version instead. Sorry :)

WCS V 18-03-2004 11:00

Re: Access Database help...
 
Type "Make It Work " and slam the keyboard repeatedly. - This usually works well for me.

Pierson 18-03-2004 19:18

Re: Access Database help...
 
Quote:

Originally Posted by Lindsey
I had this problem last year (I can't write code either)
I ended up figuring out how to put pictures in after the season was over.

1. Create a field in your table to hold the pictures (Design View)
2. Set the Data Type to OLE Object
3. Switch to Data Sheet view and right click in the cell instead typing in data
4. Select Insert Object
5. Select Create From File
6. Chose Browse and select the file or type in the location

The picture won't show up in Data Sheet view, you can only view the pictures through a form or a report

Hope this helps
Lindsey


One thing you will need to remember is that you will most likely need to resize the picture to something like 200x200 or 300x300.

I created our team's DB in access and got pictures working in January and I now have queries that figure out how long a person has been on a team, how much money they have brought in and other fun things.

If you have any questions, please feel free to PM or e-mail me: PC@BPRobotics.com.


All times are GMT -5. The time now is 02:14.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi