Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-03-2011, 04:52 PM   PM User | #1
promsi1960
New to the CF scene

 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
promsi1960 is an unknown quantity at this point
ODBC Code for Oracle vs SQL Server

I have an application that has only needed to connect to a SQL Server DB thru ODBC to call a function. Now it needs to call the same function with an Oracle back-end.

This is the code for SQL Server and it works perfectly:

public function generateMasterKey($project_name, $table_name) {
$master_key = odbc_result($this->odbc->Prepare("DECLARE @as_master_key varchar(26) EXEC [dbo].[GET_UNIQUE_MASTER_KEY] @as_project_name = N'$project_name', @as_database_site = N'CMPL', @as_user_initials = N'SK', @as_table = N'".$table_name."', @as_master_key = @as_master_key OUTPUT SELECT @as_master_key as N'master_key'"), 'master_key');

return $master_key;
}

Now I just need the syntax for an Oracle DB.

I am new to Oracle - so any help would be very much appreciated.
promsi1960 is offline   Reply With Quote
Reply

Bookmarks

Tags
odbc, oracle, sql server

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:32 AM.


Advertisement
Log in to turn off these ads.