Home > database >  Don't install the ORACLE client, do not set the DNS, how to connect to ORACLE
Don't install the ORACLE client, do not set the DNS, how to connect to ORACLE

Time:10-05


Checked a lot of articles introduced VFP even ORACLE, general is to install the ORACLE client, or set up DNS,
Can: do not install the ORACLE client, do not set the DNS, the connection method of ORACLE,
Because of this user to much convenient installation using the program,

Find an article, but the result of the test is not successful, please see what reason,

After tracking, found that the program for a long time stop line in this: oracle=SQLSTRINGCONNECT (cConnString)
The oracle return values for. F.
Use Aerror () function, also did not show the cause of the error

PUBLIC oracle
IP=[192.168.10.66]
Port=[1521]
Serid=[ERPDB]
Usr=[MANAGER]
The PWD=[MANAGER]

Serid ORACLE_OPEN (IP, port, usr, PWD)
? Oracle

R=SQLEXEC (oracle, "select id, state the from formmain_3321", "AA")
? R

SQLDISCONNECT (oracle)


Serid PROCEDURE oracle_open (IP, port, u, p)

CConnString="DRIVER=Microsoft ODBC for Oracle; Uid="+ ALLTRIM (u) +"; The PWD="+ ALLTRIM (p) +"; Connectstring=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(TCP) PROTOCOL=(Host="+ ALLTRIM (IP) +") (Port="+ ALLTRIM (Port) +"))) (CONNECT_DATA=https://bbs.csdn.net/topics/(SID="+ serid +")));"

Oracle=SQLSTRINGCONNECT (cConnString)
RETURN the oracle

ENDPROC

CodePudding user response:

Oracle must install the client,

CodePudding user response:

Don't need Oracle8 and below
  •  Tags:  
  • VFP
  • Related