Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection to SQL Server Express 2014 - Impossible to connect

FC60May 26 2016 — edited May 26 2016

Hello,

I try to use SQL Developer 4.1 (JDBC 1.3.1) to conncet SQL Server Express 2014.

I use hostname=localhost and port = 1433/OAE;instance=SQLEXPRESS (OAE is my DB)

My error message is in french, but I think is "Test failure - Impossible to connect to server Microsoft SQL Server on localhost"

The TCP/IP protocol for SS is enable; I use Windows authentication.

Thanks for the help.

Comments

unknown-7404

In a package, I have a function to retrieve a list of records in a refcursor.

Just for clarification a cursor DOES NOT contain data. It is just a pointer you can use to FETCH data.

The records are of type "user defined type"

When I execute this function, the output variables log shows that my <Return Value> --> value

as one column of my_user_defined_type(columnA, columnB, ...)

The
values displayed are
"oracle.jdbc.proxy.oracle$1proxy$1NullProxy$2java$1sql$2Struct$$$Proxy@<an
hexadecimal value per record>

Ok - what would expect a pointer to look like?

There IS NO DATA until something/someone does a FETCH on the cursor.

1. I have a list of the top ten movies for 2016 and provide a telephone number you can use to get the list

2. You write a function to retrieve a telephone number you can use to get that list.

3. You execute the function.

Ok - all you have is the telephone number. Specifically you DO NOT have the list.

If you want the list you have to CALL the telephone number and FETCH the list.

Yanovic

Wow!

What a brilliant answer!

Really!

I did not know about that!

Try to be more nice in your reply

Yanovic

ok.

I want to understand why I cannot see this function result in SQL Developper under the Output Variables - log

Function retrieve_list  return ref cursor

IS

  Type t_ref_cursor is ref cursor

  v_ref_cursor t_ref_cursor

begin

  open  v_ref_cursor  for

   select my_user_defined_type (columnA, columnB)

   from table zzz;

return v_ref_cursor ;

end;

But it works if i remove the constructor (user defined type) in the query...like this

Function retrieve_list  return ref cursor

IS

  Type t_ref_cursor is ref cursor

  v_ref_cursor t_ref_cursor

begin

  open  v_ref_cursor  for

   select columnA, columnB

   from table zzz;

return v_ref_cursor ;

end;

Yanovic

Here are screeshot from SQL Developer of what i'm saying.

With User defined type :

with_user_defined_type.jpg

Without User defined type :

without_user_defined_type.jpg

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 23 2016
Added on May 26 2016
0 comments
368 views