Connecting to a Progress Database....

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
only1platinum
Newbie
Posts: 15
Joined: Thu Aug 30, 2012 2:42 pm
Location: United States
Contact:

Connecting to a Progress Database....

Post by only1platinum » Tue Mar 19, 2013 4:21 pm

I have been using Macro Scheduler for a number of tasks around the office over the last few months but now I am attempting to do something a bit more complex than just computer control at a local machine.

I am attempting to connect to our database to speed order entry with out having to tab through endless menu options and what not. I would like to be able to connect and enter orders via the database directly. Is this something that can be done or am I way out in left field here? I only just started fooling around with this so I would like to just get some input before I get to far off track. Below is the script I am using so far. When I test the connection it is able to confirm a connection with the database however when I run this script based off of the sample I get a "No Valid Connection" Error on line 11. Then its just an infinite loop. I think the error might be in the selection of the catalog. I am not sure what catalog I need. So I put in the table I wanted in the database there.

//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1


Let>str=Provider=MSDASQL.1;Persist Security Info=False;User ID=sysprogress;Mode=ReadWrite;Extended Properties="DSN=OpenEdge10.1B;HOST=IGNATEOUS;PORT=8350;DB=mfgsys;UID=SYSPROGRESS;";Initial Catalog=PUB.OrderHed
DBConnect>str,OpenEdge


Let>SQL=select OrderNum, CustNum from PUB.OrderHed where OrderNum=139000
DBQuery>OpenEdge,SQL,CUSTOMERS,numrecs,numfields


//loop through returned recordset
Let>r=0
Repeat>r
Let>r=r+1
Let>f=0
Repeat>f
Let>f=f+1
Let>this_field=CUSTOMERS_%r%_%f%
Message>this_field
Wait>0.5
Until>f=numfields
Until>r=numrecs


DBClose>OpenEdge

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Mar 19, 2013 5:08 pm

I would like to be able to connect and enter orders via the database directly. Is this something that can be done or am I way out in left field here?
Absolutely CAN be done but be very careful. I don't know what software you're using but the experience I have with our ERP software is that direct database input for Order Entry is particularly tricky because placing an order impacts multiple database tables. Check with your vendor or you might end up with corrupt data.

Always a good idea to test on copies of the data files.

only1platinum
Newbie
Posts: 15
Joined: Thu Aug 30, 2012 2:42 pm
Location: United States
Contact:

Post by only1platinum » Tue Mar 19, 2013 5:44 pm

Ahh, thanks for the input. I have a testing database setup that I can use to perform keyed input tests. The reason I am trying to do it with direct communication with the database is because we have been having random issues out of one of the order entry scripts. runs fine most of the time but there are certain days it is like pulling teeth to make it run smoothly. I don't think its in the scripts fault but more so with the computer. Or perhaps operator error. I will contact Epicor about what I am attempting to do and see if they will be of any further help as well.

Any Idea about why my code is not connecting to the DB?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Mar 19, 2013 6:01 pm

Can't really diagnose connection issues.

Just looked up Progress on http://www.connectionstrings.com/progress have you tried any of these? You don't include password or port.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts