Hyperlinks Issue - InfoPath Dev
in

InfoPath Dev

Hyperlinks Issue

Last post 06-12-2009 03:16 AM by mikevak. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-09-2009 04:29 AM

    Hyperlinks Issue

    Hello World:P

    Let me explain my situation

    i have a database that among other fields i want to store  the name and the path (c:\myfolder\aaaa.xls) mainly for doc, pdf and xls files

    my db is on a sql server (2005 express) and i use an infopath form for retrieving and submiting data. Everything work fine but i cann't find a way to open the files (as a result of a query) from their directory path. sql server doesnt support hyperlinks data type (access does!) and i use nvarchar to store the directory path (the link) of my files. i ve tried to use hyperlink advanced control and i get the path as hyperlink but i can not open the file (no error message appear)

    i would like to suggest me a solution  or another approach of my problem

    thank you in advance!

  • 06-11-2009 02:49 PM In reply to

    Hi Mike,

    Need more info: are you pulling the hyperlink from your database and trying to display it in InfoPath and then click on it, or are you submitting the data for the hyperlink from your form to SQL DB and then trying to use InfoPath or a Web page to click on it?

    Patrick Halstead
    Project Manager at Qdabra
  • 06-11-2009 11:51 PM In reply to

    Hello Patrick,

    My main purpose is to retrieve data from my DB, so i have a field that i store the full path of my files (nvarchar(255) data type). Then, i use a hyperlink control, bound on the relevant field. My problem now is that in design mode (right click--open hyperlink) i can open the file but nothing happens in preview mode (no error message appears). In contrast, there is no problem when i use path like http://www. (the link works in preview mode)

    Btw, in order to open the file stored at a PC called SSS i use the adress

    file:\\SSS\folder name \file.xls

    My pc is part of a local network and the sql server is on my pc and i have administrator rights

     

    I am at your disposal for any further information you need

     

  • 06-12-2009 12:17 AM In reply to

    You said that http:// paths work fine. That suggests one of two things: a) the path to your file is wrong (format or just incorrect), or b) you don't have security to do that through URLMON.

    I'm still confused - I don't understand why this has anything related to a database. Is the main data connection bound to the database? How are you specifying the data type as hyper link? In the designer if you double click on the field in the data source does it show hyperlink? This probably isn't the issue since you said that http:// paths are working fine. So, it must have to do with security of accessing files or the file path being incorrect.

    Running in preview is not the same security as publishing and running from server. It's more restrictive to run in preview. So, please make sure the file address is correct (it doesn't quite look correct for URLMON, but I forget the exact format requirements). Try a few more experiments:

    1. Paste the link into a browser (like Internet Explorer) and make sure they open in the browser
    2. Publish the form to a Web Server in your domain and try to run it and open the links
    3. InfoPath Designer, go to Tools->Form Options->Security and make the form full trust. Attach a digital certificate and publish the form to a Web Server that is in your domain. Open the form and see if the link resolves. If it does, we know the format of your path was correct and it was simply a security problem.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 06-12-2009 03:16 AM In reply to

    Hello  again,

    my DB has a field called "Links" and i store there the path of my files..let say

    file:\\SSS\folder name \file.xls

    In my form i use query in order to retrieve data...so i have a text box bound on the field "Links"

    when i preview my form, i use the query button and i get the info i want...and in the text box appear the path -->file:\\SSS\folder name \file.xls (yes the main data connection is bound to my DB)

    Back in design mode, i change the text box to hyperlink control and i link to: Data Source: @Links

    In order to check that im in right way, i add 2 more  hyperlink controls on my form and the 1st one i link it to: Adress: file:\\SSS\folder name \file.xls and the second at  http://www.something.com

    In design mode, when i right click and open hyperlink...i can oppen the file (-->file:\\SSS\folder name \file.xls) and the webpage (www.something.com) but in preniew mode...only the web page. I click on the links but nothing happens

    I assume that the file address is right, in addition i did paste the link into browser and the file opened.

    Maybe you are right and its about security settings, so i tried to convert my form to fully trusted one. (Btw where i can find RegForm tool?)

    I dont have a Web Server in my domain to try your solution...:(

    I did enable full trust at security settings and i create a certificate but i noticed that in view cartificate..."This CA root certificate is not trusted. To enable trust, install this certificate in the Trusted Root Certification Authorities store"

    How can i enable trust?

    From the above mentioned, there is something that i do wrong?

    (i came up with the idea to use a button control to open the file from its path but i get lost in...code:P )

    Thank you for your response and i hope to help other users dealing the same problems

     

     

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.