How PowerBuilder 100 establishes a connection with SQL Server

王林
Release: 2024-01-10 19:06:24
forward
1067 people have browsed it

How to connect powerbuiold10 0 to SQLserver

For those who are using PB10 for the first time, they may encounter problems connecting to SQL Server. On the one hand, PB10 no longer has a dedicated MSSQL Server interface; on the other hand, the database management system (DBMS) has also been replaced by a new method from the original "OLE DB". Therefore, there may be some inconveniences in configuring it. Next, I will explain in detail how to use OLE DB to connect to a SQL 2000 database in PB10.

In order to help players who have not passed the level yet, let us learn about the specific puzzle solving methods. During the installation of pb10, choose custom/full mode to install, because the default installation mode will not install the ole db interface. Click next. If you do not have .net installed, do not select the ADO.net.... item in the list. Then click next all the way to complete the installation. This will allow you to play the puzzle game smoothly. I hope the above methods will be helpful to everyone.

In order to help players solve the problem, we can find the OLE Microsoft OLE DB item in the database sketchpad and right-click on it to create a new configuration. In the pop-up configuration window, we can make some specific settings.

profile name: Fill in the configuration file name //Anything can be done

provider: Select the database management system type, here select the "SQLOLEDB" item

data source: server name (not the same as the previous version). You can select from the drop-down list, or fill in the server name or IP address such as: 127.0.0.1, etc. If the provider above is not "SQLOLEDB" there may be no options in this drop-down list.

user ID: user name. My username is the default sa

password: The password corresponding to the user ID above. My password is empty, so I don’t fill it in.

At this point you can successfully connect to the sql server. But which database to connect to? None of the above parameters were specified, and I searched for it for a long time: P. Don't worry, just fill in "database=database name" in Extended. (no quotes)

The final configuration file content is:

// Profile his

SQLCA.DBMS = "OLE DB"

SQLCA.LogId = "sa" //My user name is sa

SQLCA.AutoCommit = False

SQLCA.DBParm = "PROVIDER='SQLOLEDB',DATASOURCE='NETMANAGER',PROVIDERSTRING='database=zs'" //My database name is: zs; the datasource can also be followed by the IP address: DATASOURCE='127.0 .0.1'

This completes the configuration of using OLE DB to connect to sql server under pb10!

(change)

PB connection sql 2000

How can it work if you don’t add connect?

// Profile firstpb

SQLCA.DBMS = "MSS Microsoft SQL Server"

SQLCA.Database = "ERP30JCFZ"

SQLCA.LogPass = '1'

SQLCA.ServerName = "MICROSOF-4FEEC7"

SQLCA.LogId = "sa"

SQLCA.AutoCommit = False

SQLCA.DBParm = """

connect;

connect using sqlca;

Both of the above connections are available, you can use any one

IF sqlca.sqlcode=0 then

open(w_fistpb1)

else

messagebox("System prompt", "Database connection failed")

end if

The above is the detailed content of How PowerBuilder 100 establishes a connection with SQL Server. For more information, please follow other related articles on the PHP Chinese website!

source:docexcel.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template