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 - Wrong Datatye Reported by Netbeans
Summary: Wrong Datatye Reported by Netbeans
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 19:27 UTC by cwt137
Modified: 2013-02-15 11:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.