Forum Discussion

lingling_chiang's avatar
lingling_chiang
Contributor
6 years ago
Solved

Error - Data Source not found and no default driver specified

I try to connect to our oracle database and execute the sql. I received the error data source not found and no default driver specified. Do we need to install the Microsoft driver in our computer? Or is there other way to connect to Oracle database besides using ADO?

 

var Cmd = ADO.CreateADOCommand();
Cmd.ConnectionString = "Driver=jdbc:oracle:thin;"
+ "Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=TLcInfOdaC00.afsc.ads)(PORT=1515))(CONNECT_DATA=(SERVICE_NAME=ting3r)));"
+ "Uid=sa_autotest;"
+ "Pwd=ting3;";

Cmd.CommandText = "SELECT bus1.bus_uid, name1.legal_name, name1.search_legal_name, type1.bus_type, add1.address_line1, com1.community, bus1.bus_number, tel1.telephone_routing_code, tel1.telephone_local_number, tel1.telcom_purpose, com1.community_uid, bus1.disaster_party_number, pvc.province_abbreviation, pvc.province_uid, email.email_address, email.ending_date, email.casl_received_date, email.subscribe_indicator " +
"FROM generic.v_province_xref pxr, envoy.v_province pvc, envoy.v_telcom tel1, envoy.v_community com1, envoy.v_address add1, envoy.v_address_xref addxref1, envoy.v_bus_legal_name name1, envoy.v_bus bus1, envoy.v_bus_type_history type1, envoy.v_email email " +
"WHERE name1.bus_uid = bus1.bus_uid AND pxr.parent_uid = bus1.bus_uid AND pxr.context_type_uid = 2 AND pxr.province_uid = pvc.province_uid AND NVL2(pvc.deactivation_date, pvc.deactivation_date,SYSDATE) >= SYSDATE AND name1.effective_date <= TRUNC(SYSDATE) + .99999 AND NVL2(name1.ending_date,name1.ending_date,TRUNC(SYSDATE)) >= TRUNC(SYSDATE) AND addxref1.unique_id (+) = bus1.bus_uid AND addxref1.contact_priority (+) = 'Primary' AND add1.address_uid (+) = addxref1.address_uid AND com1.community_uid (+) = add1.community_uid AND tel1.unique_id (+) = bus1.bus_uid AND tel1.contact_priority (+) = 'Primary' AND type1.bus_uid (+) = bus1.bus_uid AND SYSDATE BETWEEN NVL2(type1.EFFECTIVE_DATE, type1.EFFECTIVE_DATE,SYSDATE) AND NVL2(type1.ENDING_DATE, type1.ENDING_DATE,SYSDATE) AND bus1.bus_uid = email.unique_id (+) AND BUS1.BUS_UID = " + that.target_afsc_id + " AND PXR.ACTIVITY_TYPE_UID = 3 ORDER BY INITCAP(NAME1.LEGAL_NAME)";

 

The error occur on the line:
var RecSet = Cmd.Execute();

  • The computer is running on X86, however, the default TC12 is X64. Change to run X86 TC12, problem solved. Thanks.