VB6 program even Ora-06413 solve Codex

Source: Internet
Author: User

originally by:

Win7 x64 platform, Vb6 The program starts, can not be directly enabled;

Vb6 more ancient, should be the product of the Stone Age; This error should be seen with Oracle environment variables, and the friend confirmed the Oracle 9i Client bit.

by:

because the program is written in the comparison, no error exception throws the correct information, fortunately there is the source code, press f8 step-through, the following debugging section directly reported: ora-06413: The connection is not open. Look at the code, compare the common one with ado Open the code for the database, add the Red section, regenerate the vb program, save each step of debugging.

function opendbconnection (cn asadodb.connection, strcnn  as string)  as boolean   on error goto openmainsybaseerror    set cn = new adodb. connection   with cn      . cursorlocation = aduseclient     . connectionstring = strcnn     . connectiontimeout = 10     . Properties ("Prompt")  = adpromptnever     . open   end with   opendbconnection = true     msgbox  "dbconnectstring is "  + strCnn   Exit  functionopenmainsybaseerror:    msgbox err.description    Opendbconnection = falseend function 

Start the program again. The error is thrown directly: ORA-06413 connection is not open

Look at the following connection string:

provider=msdaora;d ata Source=ora; Userid=cxf1; Password=test; Unicode=true

Use the Msdaora , tnsping ora For a moment, no problem; Msdaora the problem? This drive in the official does have a description

https://www.microsoft.com/en-US/download/details.aspx?id=20065

only 2003 and the XP version of it, but later checked

C:\Program Files (x86) \common Files\System\Ole DB

seems - There are three files directly under the position:msdaOra.dll,msdaosp.dll,msdaorar.dll does not require additional drivers;

But since I suspect it, I tried it .oraoledb.oracle.1,changed a mistake. ,actually reportedtns-12514, it still seems to be related to environment variables. Behind the story is more boring, purely ann loading, unloadingOra92version, reinstallOracle 10g Client, Still, uninstall10g Clientinstalled11gStill, +No, no, just try it. -bit, put on11gbit, the direct report driver is not enabled:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8B/82/wKioL1hQDMjDEQHlAAAzDHG8sLk691.gif-wh_500x0-wm_3 -wmp_4-s_3701800891.gif "title=" Image003.gif "alt=" Wkiol1hqdmjdeqhlaaazdhg8slk691.gif-wh_50 "/>

A little sick nasty touyi, good, reason thinking:

1 bit certainly not, because at that time 32 bit of VB at all do not know 64 bits of things;

2 10g the 32-bit client can go to tsn-12514 to prove that the driver should be available, but the environment variables are not correct;

Back on Oracle's official website, offering a 32-bit ODAC drive,

Http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

Good guy, directly download a minimum version of 10G, why the lowest, you understand, VB6 this elder with the old do not make mistakes; The result is not loaded, normal, 10g, installed on 64 bits to change the Oraparam.ini,

[Certified Versions]

#You can customise error message shown for Failure,provide value for Certified_version_failure_message

windows=4.0,5.0,5.1,5.2,6.0,6.1

Good, OK put on, test ODBC, all normal, everything OK, a program, still reported ora-06413.

Have no, look at Sqlnet.log, found:

Fatal NI Connect error 6413, connecting to: ( Description= (address_list= (address= (protocol=tcp) (host=115.29.114.xxx) (port=1521)) (Connect_data= (SERVICE_NAME =ORCL) (Cid= (Program=c:\test () \ttest.exe) (HOST=SNOWIND-PC) (User=snowind))) VERSION information:tnsfor 32-bit Win Dows:version 10.2.0.1.0-production time:12-12 Month -2016 21:20:45 tracing not turned on.

basically guess where the problem is. ( ay, by guessing the -_-!!) .

Open the Mode program , Data Link Properties again:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8B/86/wKiom1hQDRvRebsWAAB0DjZjKqk233.jpg "title=" Image005.jpg "alt=" Wkiom1hqdrvrebswaab0djzjkqk233.jpg "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8B/82/wKioL1hQDTPj89VUAABF6Asl0gE750.jpg "title=" Image006.jpg "alt=" Wkiol1hqdtpj89vuaabf6asl0ge750.jpg "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8B/82/wKioL1hQDUfyQezJAABAHYIfmjY270.jpg "title=" Image007.jpg "alt=" Wkiol1hqdufyqezjaabahyifmjy270.jpg "/>

Finally succeeded (can set off firecrackers).

Conclusion:

Do not put parentheses in the path, or you will die very face; the code in the exception processing will not add a lot of work, but also for the benefit of posterity;




This article from "Snowhill" blog, reproduced please contact the author!

VB6 program even Ora-06413 solve Codex

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.