The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Oracle does not work in SLX scripts
Posted: 31 May 06 2:54 PM
|
sertraline alcohol blackout sertraline and alcohol fiogf49gjkf0d Our 5.2 customized scripts are filled with Oracle-specific statements being executed on the database. Since upgrading to 6.2, none of this code works. Is there a way to execute Oracle SQL syntax through SalesLogix scripts? See the example below. The use of DUAL (an Oracle-specific table) throws an error. I have also gotten errors when using Oracle outer joins and functions. Did Oracle syntax functionality disappear in 6.2 or is there a way to get it to work?
Option Explicit
Sub main
Dim sql Dim cn Dim rs
sql = "select count(*) cnt from account" 'works 'sql = "select count(*) cnt from dual" 'does not work Set cn = Application.GetNewConnection Set rs = CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseClient rs.LockType = adLockBatchOptimistic rs.Source = sql Set rs.ActiveConnection = cn rs.Open
Do While Not rs.EOF MsgBox rs.Fields("cnt").Value rs.MoveNext Loop
rs.Close cn.Close
Set rs = Nothing Set cn = Nothing
End Sub |
|
|
|
Re: Oracle does not work in SLX scripts
Posted: 31 May 06 3:49 PM
|
fiogf49gjkf0d Nevermind...I figured it out...this did the trick:
cn.Open "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=Username; Password=asdasd;" |
|
|
|
Re: Oracle does not work in SLX scripts
Posted: 09 Jun 06 5:23 PM
|
fiogf49gjkf0d FYI - The SalesLogix OLEDB Provider is intentionally designed to be "DB agnostic". Basically it's oriented around ANSI SQL 93 with limits (EX: No ALTER, etc).
It's also designed to get rather "cranky" about certain key or reserved words. The list is rather long. I thought I'd posted it here once before. |
|
|
|