This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 226136

Summary: Wrong Datatye Reported by Netbeans
Product: db Reporter: cwt137
Component: SQL EditorAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description cwt137 2013-02-14 19:27:54 UTC
Some background info:

Product Version: NetBeans IDE Dev (Build 2013-01-24_09-04-16 )
Java: 1.7.0_11; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

Using jTDS 1.3.0 JDBC driver to connect to a MS SQL Server.
Any column that is of the datatype of datetime is interpreted as a timestamp datatype inside of Netbeans.


How to replicate:
1) Create a table on a mssql server that has a column of type datetime. You can use Netbeans or any tool, it doesn't matter.

2) Verify that the column really is of type datetime by using SQL Server Management Studio, or a SQL Client written in Java like Aqua Data Studio.

3) Go to Netbeans database browser and right-click on the datetime column and select the "Properties" context menu item.

4) See what it says for "Data type"

Actual Results:
TIMESTAMP

Expected Results:
DATETIME
Comment 1 Jaroslav Havlin 2013-02-15 11:36:52 UTC
This is caused by JDBC driver for MS SQL Server.
(DATETIME is not a JDBC data type.)

See http://msdn.microsoft.com/en-us/library/ms378715.aspx,
section Datetime Types, 

This cannot be fixed in NetBeans, because it uses JDBC to accesses the database.