Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Error MSSQL Uniqueidentifier

 
TimB
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64837
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic