Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to link scanned pics to a tbl in db???? 5

Status
Not open for further replies.

Bigced21

Programmer
Feb 5, 2003
76
US
The reason why I ask this is b/c i'm adding another feature to a current prog., which are pics. Is it possible to link scanned pics from a file server to an existing table with a created field for the pics to be linked to its file name on SQL server?

 
What we do is store the file name in the the data table. Then the user interface uses this to create the link on the web page.

Questions about posting. See faq183-874
 
SQLSister,
Now the images also need to be linked to a record possibly multiple records. Is that possible?
 
How then Esquared? I'm dying to see examples, but make sure you read my reply to SQLSister response.
 
I can't give you any examples because didn't provide anything even approaching specifics. Thus my pithy, correct, and entirely unhelpful answer of "Yes."

I could pull some grand scheme out of thin air but I'd rather get more details from you before I invest the energy.
 
Fair enough!!
i have pics stored on a file server.
I'm doing a license renewal process and want to insert pics on there renewal licenses.
There records are in a sql server db that I have printed there original licenses from, but now that its time for renewals, we want there pics displayed as well.
So, what I was thinking was to add another field in SQL server to contain the scanned pics name from the file server. Problem is....I'm not experience in that area.
So, how do I call an image from the file server to sql server, that I can call from sql server to display on there renewal license.
Plain and simple I need from file server images to the sql server records.
 
Each license must have some "primary key" associated with that uniquely identifies it, such as a license number. You need to collect some data which associates each appropriate image's filename with that key. I don't know how your data is organized. If the image filenames have the license number in them, then maybe it will be as simple as to do a text capture of a directory listing and sort it to get the filenames out. Excel is good for this sort of data "squishing."

Once you have two columns, one with the key and one with the correct full-pathed filename, import the data to SQL server and update your data table with the filenames in their own column.

When it comes time to regenerate the licenses, whatever process you're using to do the queries from the database to get the appropriate information will need to be modified to also read the filename, then attach or include it from where it physically resides on disk.

Believe me, passing around filenames or URLs is 100 times better than actually trying to insert the binary data of each image into (and retrieve them from) your database.
 
the naming convention we came up with for the images are lastname, first initial, and last 4 digits of ssn. The reason why, b/c some individual can hold more than one kind of license, for ex., plbing, electrical, boiler.

and that's exactly what I want to do is pass around filenames, but it also needs to coorespond with its record as well.
 
I don't think anyone can give you anthing more specific than what I've told you. If gathering the information into a format useable by SQL server is something you don't know how to do... it's going to be really hard to help you through the forums. Maybe someone else would have the patience (I'm sorry I don't right now!).
 
i think esquared already had a lot of patience and that you need to give more specific details, like what interface programming language are you using and what fields you have in that table.

what esquared is trying to tell you is that you need to add a field in the table wich contains the filename and then you use your interface to show the picture, without saving the picture to table

Christiaan Baes
Belgium

What a wonderfull world - Louis armstrong
 
But he is actually saying that he has a naming convention. So it is possible to have the query (or the application) parse the name and social security number. But the application must retrieve the image. The application will need to know the directory and file extension, but I assume that is a constant. So you can avoid the extra field in the database.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Yes, that is true Karl, good idea. And certainly a view could be made to display the correct filename in a virtual column, if it is too much trouble to put it all together in the application from the other fields.
 
I understand. the field that is being added will contain the filename or url of the image. My problem is I don't no how to link to the image, that's the process i want to learn.

Programming language I'm using is ASP, and the fields in the table are id, fname, lname, ssn, date_birth, date_death, phone, email, licensing_pic.

how do I format the cells for licensing_pic to link to my file server? That's what I'm not grasping. I'm willing to give you as much info as possible, but this is extremely new territory.
My naming convention for the images are lname, first initial(which I will have to write sql code or asp code to do), and the last 4 digits of ssn.
 
So far you have not given us ANY information about the document you are seemingly preparing. Is it a web document? Is it printed? Is it rendered by Word or Acrobat or faxed? What kind of connection to the database are you making? How does the information get into the database in the first place? Did someone else program these things and if so, where are they to help out?

Assuming that you are doing the application on the web in ASP, then you need to go post your question to an ASP forum. We can give you syntax for what a query might look like to 'build' the image filename, but as for doing the work in ASP or whatever your application is, this forum is not the appropriate venue.

Code:
SELECT '\images\customers\' + LastName + Left(LTrim(FirstName),1) + Right(SSN,4)+ '.jpg'
   FROM CustomerInfo
   WHERE CustomerID =

And in VBScript you'd tack on the CustomerID session variable or whatever you are using to know who the current customer is.

Now you need to talk to the friendly people in the Microsoft: Active Server Pages (ASP) forum for more help.

I hope you are able to figure it all out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top