Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 17, 2011 02:46 PM by jcervantes
Oct 27, 2011 11:38 PM|LINK
Hello all, i have some questions as to the best way to accomplish what I am trying to do.
I am creating a form that id like to have post data to tables in DB that I have a a SQL 2008 server. The form is being created in ADobe Live Cycle Desigher and has an option of linking to a wdsl file/ url. Id like to find a way to creat a web service to
post the data to my tables. I have been searching around and reading a lot but most of the examples i see of web services just access stored procedures. Id like to just submit the data to some tables and perhaps provide some feedback that the data was submitted.
If you have a demo or some exmples it would be great.
Oct 28, 2011 07:41 PM|LINK
So I am getting closer to getting things the way I need. This has been a good start from a lot of examples on the web one issue with the current code is I can only submit data to one table but the form I am creating has data that needs to go to different
Bellow is my code:
public void AddClass(string strUserID, string strAccountNumber)
string connStr = ConfigurationManager.ConnectionStrings["con1"].ConnectionString;
string cmdText = string.Empty;
using (SqlConnection sqlConn = new SqlConnection(connStr))
cmdText = "INSERT INTO TimeEntry(UserID,AccountNumber) VALUES(@USERID,@ACCOUNTNUMBER)";
SqlCommand insertComm = new SqlCommand(cmdText);
insertComm.Connection = sqlConn;
SqlParameter sp = new SqlParameter;
sp = new SqlParameter("@USERID", SqlDbType.VarChar, 9);
sp = new SqlParameter("@ACCOUNTNUMBER", SqlDbType.VarChar, 12);
sp.Value = strUserID;
sp.Value = strAccountNumber;
if (sqlConn.State == ConnectionState.Closed)
Oct 28, 2011 07:49 PM|LINK
You can create stored procedure or even write multiple queries.
Check this link for the same -
Oct 31, 2011 01:54 PM|LINK
So reading through a lot of this over the weekend. I think I want to go with the linq to sql but not sure how the code should look. I am verry new to all of this.
One question I have has to do with the form I am creating in Acrobat, it is a time sheet and has a table with spots to enter time for the week. But each time data should go to the same tables and fields in the DB just as seperate rows. The link below is
an example. each days time should go to the same table just with a different date and amount of time.
What do you think?
Oct 31, 2011 02:04 PM|LINK
You can do that with out any issue.
Once the sheet is filled you can insert the data to table and in separate row by looping thru the sheet.
If you need further help then let us know your table structure.
Oct 31, 2011 03:20 PM|LINK
The table structure is shown here http://imgur.com/lSxJn
Basicly I have a sheet that is a service report/time card, here is a screenshot of the actual form. http://imgur.com/o4hny
What I want to do is have the service report write to ItemEnrty, TimeEntry, and JDEWorkOrder from the Service report.
If I understand the concepts of linq to sql correctly I should be able to make an entity called servicereport or something smilar which would have the association of the three tables and add the appropriate information.
The main information I need from the form is descriped bellow.
Units (this is begin time - end time to figure # of hours. I was thinking I could just do this in the form)
Units (not same as units from TimeEntry, this is qty of item)
Order# (WO# field on form)
Description (Description field on form)
What do you think? Am I in over my head?!? :)
Oct 31, 2011 03:24 PM|LINK
Check this links for how to insert data into sql table with linq. You have to create classes or class as per your requirement.
Oct 31, 2011 05:07 PM|LINK
Ok, the more and more I think about this I am wondering , why I need any type of relation between these tables, because I dont really have a real need and it appears to be really confusing me ! Whats
the simplest way to just have my service update the 3 tables i need?
Oct 31, 2011 06:03 PM|LINK
It is not necessary to have relationship.
You can have your table structure as per your requirement.
Oct 31, 2011 07:00 PM|LINK
Ok, I am attempting to apply the tuturial to my curent web service project but I dont have a folder "models" any idea why?