Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Integration > Problem with configuration of ODBC-Connection

Forum

Search UsersRules
Problem with configuration of ODBC-Connection
#1
Just came
Points:: 0
Joined:: Sep 27, 2013

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?

Profile
#2
Guest
Points::
Joined::

please upload your photos as attachments

Profile
#3
Just came
Points:: 0
Joined:: Sep 27, 2013

@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!

Profile
#4
Guest
Points::
Joined::

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.

Profile
#5
Just came
Points:: 0
Joined:: Sep 27, 2013

@Timofey Bugaevsky:

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

Profile
#6
Just came
Points:: 0
Joined:: Sep 27, 2013

@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.  :(

Profile
#7
Guest
Points::
Joined::

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

Profile
#8
Just came
Points:: 0
Joined:: Sep 27, 2013

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

Profile
#9
Guest
Points::
Joined::

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.

Profile
#10
Just came
Points:: 0
Joined:: Sep 27, 2013

I don´t have tables named "table":

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

Profile
#11
Guest
Points::
Joined::

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.

Profile
#12
Just came
Points:: 0
Joined:: Sep 27, 2013

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?

Profile
#13
Guest
Points::
Joined::

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

Profile
#14
Just came
Points:: 0
Joined:: Sep 27, 2013

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

Profile
#15
Guest
Points::
Joined::

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

Profile
#16
Just came
Points:: 0
Joined:: Sep 27, 2013

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.....

Profile
#17
Guest
Points::
Joined::

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.

Profile
#18
Just came
Points:: 0
Joined:: Sep 27, 2013

@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*

Profile
#19
Guest
Points::
Joined::

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.

Profile
#20
Just came
Points:: 0
Joined:: Sep 27, 2013

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

Profile
#21
Guest
Points::
Joined::

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.

Profile
#22
Active user
Points:: 0
Joined:: May 8, 2013

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.

Profile
#23
Just came
Points:: 0
Joined:: Sep 27, 2013

@Konstantin Rupasov:

That sounds really cool!  8)

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

Profile
#24
Active user
Points:: 0
Joined:: May 8, 2013

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.

Profile
#25
Just came
Points:: 0
Joined:: Sep 27, 2013

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

Profile
#26
Just came
Points:: 0
Joined:: May 1, 2020

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?

Profile
#27
Administrator
Points:: 0
Joined:: Feb 25, 2019

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)

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.