Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to return records from an MS SQL Database

Avatar

Level 1

I have created a small form in Adobe LiveCycle 9.  I setup a new data connection to a database on my MS SQL server 2008.  I can see my sql data fields under the data connection tab and bound them to my corresponding fields in my form.  The form populates with information from the first record in my database.

I would like to create a field on my form where my users could enter in an account number and then my fields would populate from that record.  Right now I can only see the record with account number 1.


Any help would be appreciated.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

That is a Microsoft security error and I think it has to do with who (which rights) creates theDSN. You might want to do a web search to see how to overcome it ...or I have always used the admin account to add the DSN and not had the problem.

Paul

View solution in original post

5 Replies

Avatar

Former Community Member

You will need to program the connection to get the specific record that you want. There is a sample that was created using MSAccess but the concepts are exactly the same. Here is a link to the blog entry:

http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/

Paul

Avatar

Level 1

I am getting an error message that states the Connection for source DataConnection failed because the environment is not trusted.  How can I fix this?

Thank you for your help!

Jon

Avatar

Correct answer by
Former Community Member

That is a Microsoft security error and I think it has to do with who (which rights) creates theDSN. You might want to do a web search to see how to overcome it ...or I have always used the admin account to add the DSN and not had the problem.

Paul

Avatar

Level 1

This DNS is created inside of LiveCycle or on the client pc using the Data Source in the control panel?  My connection works when I preview the .pdf inside of LiveCycle.  Thanks for your help.

Avatar

Level 1

I created a new user on my sql server that matched the login on my pc. (domain\user)  I then mapped the new user to the database.  Thanks for your help. Jon

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----