connecting to progress db

lindaklu

New Member
Hi all! I'm completely new to progress db. Can someone help me on the codes how to connect to a progress database? Can I write asp codes:
set cn=Server.CreateObject("ADODB.connection")
set rs=Server.CreateObject("ADODB.Recordset")
cn.Open "DSN=database"

str="SELECT * FROM table1 "

I have no idea how please help I'd appreciate it very much!!
 
Connecting to a database

Can you be more specific please.

How do you want to connect to a database? using ODBC for SQL queries? using the progress procedure editor?
I have expierence with a variety of different progress database standard software so if you are trying to connect to a specific database let me know and I may be able to give you all the parameter info that you need.

If you need parameter information this is often saved in the folder c:/windows/ in a file called services.

Kind regards

Andrew Price
www.innov-8.de
 

lindaklu

New Member
Hello Andrew,
Thank you for your reply. I already got the Progress DB connection working. But I'm still having some other problems I hope you can help me.
I'm querying from a Progress DB, selecting the the items that the customer had ordered (including the item#, date ordered, price, etc...). When I run the query, for some reason only the items in the year 2000 are displayed, items from other years (1997, 1998, 2001... are not displayed). And no I did not filter the year.
Another problem I'm facing is that it skips the 0's when reading number starting with 0's. For ex. # 01234, it'd only display 1234. Why is that & how do I make it display the whole number. I'd appreciate your help asap!!
Linda
 
Hi Linda,

In answer to your first query can you send me a sample of the code you are using to call up the dates then maybe I can help you.

Number fields can be defined in a number of ways in progress. The Integer data type can be defined as:
zzzz9 or as 9999 and other variants of this code. The datatype zzzz9 means that the 0 will not be displayed.
I have created a table with field1 having the datatype 999 and inserted some data with the value 010 into it. I wrote the following query and this returns the value of my data including the 0.

/* looks up fields with the data mask number 999 */

find table1 where table1.field1 begins "0"
no-lock no-error.

if avail table1 then do:

disp table1.field1.



Hope this helps

Andy
www.innov-8.de
 

lindaklu

New Member
Hi Andy,
I'm including my program instead of partial codes so you can see it more clear. In this program the user enters an item number. The program will search and display this item's order date and order number.

I'm not sure about how to define the number data type. Do I have to define it in the DB itself or in the program? I have an existing DB and I just need to read data from it, not insert any data though... Item numbers start w/ 0's and the 0's will be truncated l like 012345 will display 12345 and of course this is wrong.. I tried to use the right function right ("000000", "item_num", 6) but it doesn't work...

Well here's the codes:

Please let me know if you're not clear of something!
Thanks for your help!

Linda Lu
 

lindaklu

New Member
Hi Andy,
I'm not sure why the code is not displayed..
I'm sending as an attachment.
 

Attachments

  • code.txt
    1.1 KB · Views: 42
To define the fields datatype

To define a fields datatype you can use the data dictionary tool which is found under the tools menu in the procedure editor.

Select your table in the fenster and open up the fields list. If you select the field you want and then click on the "field properties" button you can edit many of the different aspects of the field try typing 99999999 into the format field.

Thanks for the code, I will read it through later and see if I can find the bug.
 
Top