1C for mobile connect to SQL SERVER

Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 16, 2014
Company:

I don't know connect from 1C for mobile to SQL SERVER2008R2.

Code:

Code
   ConnectString = "Provider=SQLOLEDB;Data Source=10.43.10.231\SQLEXPRESS;Initial Catalog=WHD;User ID=sa;Password=123456";

   СonnectADO = New COMObject("ADODB.Connection");
   СonnectADO.ConnectionString = ConnectString;
   СonnectADO.Open();

   RS = New COMObject("ADODB.Recordset");
   Try
       RS.Open("SELECT * FR OM dbo.FLIGHT WH ERE EXPIMP = 'IMP' AND FLIDATE>'01/01/2013'", СonnectADO );
      Except
        Message ("Không thể kết nối tới CSDL");
        Return;
   EndTry;

Pls. help me.

Edited: Ha Thien Thach - Jul 27, 2015 12:40 AM
 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Ha Thien Thach.

If I understood you correctly, you want to select some data from MS SQL database from the mobile device, right?

If so, you are unable to do this directly as you are not connected to it. You need to create a web service that will select data from the database in your main infobase. Then you could make requests to that web service from your mobile application.

 
Subscribe
Users browsing this topic (guests: 2, 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.