my dog learned polymorphism*
The moose likes JDBC and the fly likes JDBC Error MSSQL Uniqueidentifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Error MSSQL Uniqueidentifier" Watch "JDBC Error MSSQL Uniqueidentifier" New topic
Author

JDBC Error MSSQL Uniqueidentifier

TimB
Greenhorn

Joined: Sep 13, 2002
Posts: 3
I am attempting to run a callable statement and I am getting this error:

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Error converting data type nvarchar to uniqueidentifier.

this is the signature of the stored procedure.

CREATE PROCEDURE p_order_create
@output_message AS varchar(255) OUTPUT,
@executer_entity_id AS uniqueidentifier,
@executer_entity_hierarchy_id AS uniqueidentifier,
@executer_company_id AS uniqueidentifier,
@order_id AS uniqueidentifier OUTPUT,
@u_id_order_type AS uniqueidentifier,
@u_id_order_origination AS uniqueidentifier,
@entity_id_customer AS uniqueidentifier,
@entity_id_vendor AS uniqueidentifier,
@request_subject AS varchar(100) = NULL,
@request_description AS varchar(2000) = NULL,
@address_1 AS varchar(100) = '',
@address_2 AS varchar(100) = NULL,
@city AS varchar(50) = NULL,
@state AS char(2) = NULL,
@zip AS char(6) = '',
@zip4 AS char(4) = NULL,
@valid AS smallint = 0,
@latitude AS decimal(8,4) = NULL,
@longitude AS decimal(8,4) = NULL,
@reference_number AS varchar(50) = NULL,
@parcel_number AS varchar(50) = NULL,
@entity_id_source AS uniqueidentifier = NULL,
@reference_number_source AS varchar(50) = NULL,
@datetime_received AS datetime = NULL,
@u_id_order_priority as uniqueidentifier =null,
@order_number as varchar(12) =null

I am using the M$$QL Driver from M$ft. Here is the code that I am using to run the procedure in Java.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

"TimB",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Error MSSQL Uniqueidentifier