Highlighted

Gathering info from SQL Database

Avatar

Guest

08-10-2008

I want to my users to be able to enter an account number and it return name and address. I have created the Dataconnection and set it to delayed open. The sequal command that i am using is "select * from memb where acct = '" I have it set as an exit command currently but can change it if i need to. It is running on a server and as a formcalc. Do I need to Bind the name and address field to my data connection name and address?

Replies

Highlighted

Avatar

Guest

08-10-2008

I keep getting a "Couldn't post data to", Here the script from... What is wrong???



topmostSubform.Page1.P.acct::exit - (FormCalc, server)



xfa.sourceSet.DataConnection.nodes.item(1).query.setAttribute = "text"

xfa.sourceSet.DataConnection.nodes.item(1).query.select.nodes.item(0).value = "Select * from memb where acct = '", this.rawValue, "'")

//app.alert(xfa.sourceSet.DataConnection.nodes.item(1).query.select.nodes.item(0).value);



//now connect to DB and get a record

//xfa.sourceSet.DataConnection.open()

//xfa.host.messageBox ("Data Connection Opened")
Highlighted

pguerett

08-10-2008

You have your code set to run server side but you are not rendering from a server. Change it to run client side.
Highlighted

Avatar

Guest

09-10-2008

Okay, I have changed to client and when i Check my script syntax it is not liking this field. Do I need to have it set on formcalc or javascript?



xfa.sourceSet.DataConnection.nodes.item(1).query.select.nodes.item(0).value = "Select * from memb where acct = '" + this.rawValue +