Microsoft OLE DB database connection configuration in PB10

zhaozj2021-02-08  266

OLE Microsoft OLE DB Database Connection Configuration in PB10

PB10's test version has been pushed out. But I am now trying to try: $. PB10 Beta 1 can be downloaded below download:

1, Tao Qing: http://www.pdriver.com/display.asp? Key_id = 1563

2, Sybase: http://www.sybase.com/detail? Id = 1027224

The new feature of PB10 can look up from related websites, and there is not much to say. I mainly want to introduce the new OLE Microsoft OLE DB data connection mode in PB10. This is because Microsoft has no longer supports direct way from the 7/2000 version, because the direct way does not support all MS SQL Server features.

The PB10 version of the data connection configuration and the previous version of the interface have no difference, and you can go in with the previous DB Profile. Figure:

Everyone please pay attention to the place where the red box is configured, and there is no difference in previous versions. But the most important thing is Extended. Because I was in use, I didn't find where I can choose the database for a long time. Here we can fill in some additional properties. Here, I only add Database = Pubs. Ok, it is so simple. Generate connection syntax as follows:

// Profile Pubs

Sqlca.dbms = "OLE DB"

Sqlca.logpass = "mypwd"

Sqlca.logid = "sa"

SQLCA.LOCK = "RC"

SQLCA.AUTOCOMMIT = FALSE

Sqlca.dbparm = "provider = 'sqloledb', datasource = 'sunset', providerstring = 'database = pubs'"

Next, introduce the second method - use the general data link UDL file. In addition to the direct configuration as it is, we can use the configuration file, which is the UDL file, which is similar to our INI file. Figure:

The generated connection statement is as follows:

// Profile Pubs_UDL

Sqlca.dbms = "OLE DB"

SQLCA.AUTOCOMMIT = FALSE

Sqlca.dbparm = "Datalink = 'g: /pbprj/pb10/samples/pubs.udl'"

After doing the above work, we test the connection to see if it is successful. Figure:

Display OLE DB operation error. Click OK. The following figure appears:

How is this going? In fact, we will also have this problem when we connect Access and other databases - Catalog Tables (Catalog Tables) starting with PBCAT. If you don't need to use a directory table for PB in your system, you can do it without paying this prompt because it finally tells us that it has been successful, the fact is true.

But why do you have this error? We still traveled a little. If you have MSDN installed, then you can take a look at this link.

MS-help: //ms.msdnqtr.2003feb.2052/oledb/htm/sql_server_provider.htm

From China, we know that OLE DB Provider for SQL Serve has some known limitations. This is: Although The Oledb for SQL Server Provider Implements ItableDefinitionWithconstraints, IALTERINDEX AND IALTERTABLE, THESE INTERFCES ARE NOT EXPOSED IT RUNS AS LOCAL_SERVER. (Although SQLOLEDB implements ITABEDEFINITIONWITHCONSTRAINTS, IALTERINDEX, and IALTERTABLE, but these interfaces are not available when SQLOLOLDB is running as a local server. Therefore, I think, because this reason, the PB connection database is caused, and the OLE DB multi-step operation error (this is just the reason I think). But in any case, I hope that this annoying prompt will not appear in the official version. In addition, about the introduction of UDL, we can go to the following address:

MS-help: //ms.msdnqtr.2003feb.2052/vsintro7/html/vxtskcreatingconfiguringuniversaldatalinkfiles.htm

转载请注明原文地址:https://www.9cbs.com/read-1796.html

New Post(0)