Page 1 of 1

exception:SqlDbType.NChar data type is not supported by dot

Posted: Fri 01 Apr 2011 11:50
by nickcole
when I use UniCommandBuilder.DeriveParameters(cmd) ,it throw exception:SqlDbType.NChar data type is not supported by dotConnect Universal
I think type convert wrong!

StoredProcedure:

Code: Select all

create PROCEDURE [dbo].[usp_InsertDept]
	@DEPTNO int,
	@DNAME varchar(14),
	@LOC nchar(13)
AS
INSERT INTO [dbo].[Dept] (
	[DEPTNO],
	[DNAME],
	[LOC]
) VALUES (
	@DEPTNO,
	@DNAME,
	@LOC
)
myCode:

Code: Select all

     Dim cn As New UniConnection("Provider=SQL Server;User Id=sa;Password=hhzstsll;Data Source=IBM008;Database=test;Type System Version=SQL Server 2005;")
        Dim cmd As UniCommand = New UniCommand("usp_InsertDept", cn)

        cn.Open()
        cmd.CommandType = CommandType.StoredProcedure
        UniCommandBuilder.DeriveParameters(cmd)

        Debug.Print(cmd.Parameters(3).UniDbType.ToString)


win xp sp3
vs2010
SQL Server 2005
Devart dotConnect Universal 3.20.44

Posted: Tue 05 Apr 2011 16:22
by Shalex
We have reproduced the error. We will investigate the issue and post here about the results.

Posted: Wed 06 Apr 2011 16:20
by Shalex
We have fixed the bug with mapping SqlDbType.NChar to UniDbType. I will post here when the corresponding build of dotConnect Universal is available for dowload.

Posted: Thu 07 Apr 2011 13:18
by nickcole
thanks!
Shalex wrote:We have fixed the bug with mapping SqlDbType.NChar to UniDbType. I will post here when the corresponding build of dotConnect Universal is available for dowload.

Posted: Fri 08 Apr 2011 07:44
by Shalex
New build of dotConnect Universal 3.20.46 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/univer ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .

For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20712 .