Error: could not recognize argument: localhost (301) Why?

Tiffy93

New Member
Hi all,

before I start explaining: I´m sorry for being an absolute newby.
I´m doing the beginner "Basic Open Edge Developer" because my company needs me to know how it works.
I´m totally into it but at a point during the course I cannot go further...
When I run the "simplyclient.p" on my Client as a Progress OpenEdge Application, I´m always getting fllw error browser:

** could not recognize argument: localhost (301)

and after that

Unable to execute CONNECT statement (325)

Curious is that the server connection works and the code looks fine.
I already found a thread directly at the progress community but without the specific error "localhost".

I tried to delete the test database "sports2020" via proenv and created a new one with a different port (before: 9999 as recommended during the course, after: 5000 as recommended from some guys from different communities) but it didn´t helped out.

One thing I noticed during renewing the database.
In proenv there was the line after creating the new database which I didn´t see during my course:

"This server is licensed for local logins only. (4393)"

After that the port 5000 as well as the IPV$ 127.0.0.1 with pid 14832 was shown correctly. Screenshot attached.

I would be very grateful if someone could help me out.
I´m still very excited to learn developing in Progress OpenEdge but I cannot take further steps without this function :(

Best regards
Tiffy
 

Attachments

  • proenv.PNG
    proenv.PNG
    22.6 KB · Views: 10
  • connect.p Server.PNG
    connect.p Server.PNG
    29.3 KB · Views: 10
  • Server connection OK.PNG
    Server connection OK.PNG
    14.6 KB · Views: 10
  • SimpleClient.p Client.PNG
    SimpleClient.p Client.PNG
    42.2 KB · Views: 10

Rob Fitzpatrick

ProgressTalk.com Sponsor
When you see a message that begins with "**" and ends with a number in brackets, that number is an error number. You can look these up in the Procedure Editor, or in the knowledge base, or in ProKB, which is a downloadable application for browsing the knowledge base.

Here is the entry on error 301:
1698877145130.png

It means that a string of parameters could not be parsed, probably because of a typo.

In your connect statement you have:
connect value( "-db " + cDatabaseName + "-H localhost -S 5000" ).

At runtime that will become connect "-db sports2020-H localhost -S 5000".

Note that the lack of a space before "-H" causes that parameter name to be concatenated to the database name, causing the runtime to see "localhost" as a parameter name rather than a -H parameter value. Put a space before "-H" in your connect statement and see what happens.
 

Tiffy93

New Member
Hey Rob,

I´m so sorry for not replying directly...

Many thanks for your explanation. It was exactly what you expected.

After 2 hours of try and error it was finally just a small thing. A friend of mine, he is a programmer, said, after I told him the story: Yep, welcome in my daily life.

I´m looking forward to it ;)

Thanks again!
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Glad to hear it. We've all been there. It's often easier for someone else to see the bug you've been staring at for a while without seeing it. Asking for help is a good way to get unstuck and make more productive use of your time, even if it's a little humbling sometimes.
 
Top