Problem with configuration of ODBC-Connection

1C:Enterprise platform integration capabilities and techniques

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

Testing 1C:Enterprise the 2nd big problem for me arose:

On the attempt to configure the connection to a MySQL-Database the software tells me, that there is an error with the parameters of the connection line.

I´m using the German version but maybe you can recognize it as well on my screen shots:


The ODBC-drivers (5.2.) are "brand new" (downloaded yesterday)...

Any suggestions for a solution?

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

please upload your photos as attachments

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

@Timofey Bugaevsky:

Thanks for assistance in changing my posting and attaching the pics in the correct way!

Will keep that in mind for the future!

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Maybe How can I read data from MySQL 5 database? topic will help you. I think this is the matter of driver. Also try using connection from script.

 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

@Timofey Bugaevsky:

Thanks again - I´ll try that tomorrow (if I find the way, how to use connection from script....)!

 
#6
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

@Timofey Bugaevsky:

Did test a lot of variants, but without success.  :cry:

Wrote parameters directly into the connection line (see attached images below) but it did not work.

And I didn´t find information about the syntax in 1C of using connection from script.

Thtat´s so terrible.  :(

Download 1.png (8.53 KB)
Download 2.png (19.33 KB)
Download 3.png (16.05 KB)
Download 4.png (31.57 KB)
Download 6.png (18.35 KB)
 
#7
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Did you try to do this using script? There is an example in link above.

 
#8
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

Yes, I did:

Code
&AtClient
Procedure CommandProcessing(CommandParameter, CommandExecuteParameters)
   //Handlerinhalt einfügen.
   //FormParameters = New Structure("", );
   //OpenForm("CommonForm.", FormParameters, CommandExecuteParameters.Source, CommandExecuteParameters.Uniqueness, CommandExecuteParameters.Window, CommandExecuteParameters.URL);
   
   
ConnectionString = "DRIVER={MySQL ODBC 5.2 Unicode Driver};SERVER=dbxyzserver;Port=3355;
|DATABASE=dbxyz;UID=dbxyz;PASSWORD=xyz;
|OPTION=3;STMT=SET CHARACTER SET utf8_bin";
Connection     = New COMObject("ADODB.Connection");
Connection.Open(ConnectionString);

Command = New COMObject("ADODB.Command");
Command.ActiveConnection = Connection;
Command.CommandText = "SELECT id FROM table";
Command.CommandType = 1;
       
RecordSet = New COMObject("ADODB.RecordSet");
RecordSet = Command.Execute();
While Not RecordSet.EOF Do
     Message(RecordSet.Fields("id").Value);
     RecordSet.MoveNext();
EndDo;
EndProcedure

 
#9
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

This means that you're connected, but have an error in SQL query. Check if your DB has table named table and has a column in this table named id.

 
#10
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

I don´t have tables named "table":

And I have only one Table with similar naming to "Id" in the fields:

Download 1.png (5.24 KB)
Download 2.png (5.84 KB)
 
#11
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

But you make a query to that table at this line:

Code
Command.CommandText = "SELECT id FROM table";

that is why you receive an error.

 
#12
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

You was right with this line - it was my fault - did not see that  :oops: - on a serious, real eye-handicap by myself....

Command-Processing is running now without error, but how to bring 1C to recognize the tables for seeing them at "External DataSources" and for working with them?

 
#13
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You can add them manually as a structure of tables and columns.

 
#14
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

Adding each table, with all the fields & definitions will be a horrible work....   :(

 
#15
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You will need to add only ones that you will use. It is a data source only.

 
#16
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

Do YOU have data stored in your database you are not in need of to use?  ;)

I´m in evaluation of 1C but that is a massive barrier against a positive decision.....

 
#17
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You can build your application and keep all data in 1C, the 1C:Enterprise platform currently supports a wide variety of DBMS and you have a choice. Unfortunately MySQL is not yet supported to be used as DBMS for 1C:Enterprise applications. Your task is to get some data from external DB, I'm sure it's not all data because in that case maybe you should think on migration from MySQL DB managed by 1C:Enterprise.

 
#18
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

@Timofey Bugaevsky:

As told - I´m in a evaluation phase.

And I would need to have a big change of paradigm leaving MySQL-World. We have projects all over the world and it´s easy to find local specialists for working with MySQL - but for 1C? *hmmm*

 
#19
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You can post your request and contacts in Worldwide collaboration section of this forum, think you'll have several specialists who will be happy to work for you on your projects.

 
#20
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

Yes, that would be a possibility, but doesn´t help, if I´m in need of the additional special business knowledge of a programmer.....

 
#21
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

In any way a programmer is not a business or accounting consultant, for this purposes you'll need a separate position. This is only a matter of how good you are at writing requirements to a programmer.

 
#22
People who like this:0Yes/0No
Active user
1C:Professional
Rating: 6
Joined: May 8, 2013
Company: 1C Company

Hi Alexander,

Unfortunately, there is an issue with a MySQL ODBC driver which causes the platform errors you get. The platform developers have come up with a workaround but it will be available only in 8.3.4. In this version you will find MySQL in main list and will be able to connect to it.

 
#23
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

@Konstantin Rupasov:

That sounds really cool!  8)

Did you hear about an approx. scheduled date for releasing 8.3.4. ?

 
#24
People who like this:0Yes/0No
Active user
1C:Professional
Rating: 6
Joined: May 8, 2013
Company: 1C Company

All we got for now is official information. Which is the following: publication date is to be defined. Hopefully it won’t take too long, nobody knows the exact date yet.

 
#25
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 27, 2013
Company: MinOD GmbH (IG)

OK, thanks again - I´m looking forward.....  ;)

 
#26
People who like this:0Yes/0No
Just came
Rating: 0
Joined: May 1, 2020
Company: igtech

Hello guys I need help I'm using the Commands to Print in the Spreadsheet for the content of Information Register it works fine if there are contents in the Information Register but If I tried to empty the records and when I click the button Print instead of displaying my own message like this "The Registers is Empty" it display this one "Command Cannot be performed for the specified object!", is anyone knows how to solved the problems?

 
#27
People who like this:0Yes/0No
Administrator
Rating: 1
Joined: Feb 25, 2019
Company: 1C

Hello Ricardo!
It is hard to answer without your source code, but you can use just a Message() method.
Check if the register is empty, and if it is, just type the Message you want and cancel the Print() function.
Do it for the Print button in the Form you like (for example information register list form)

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.