sql data type vs vb data type 
Author Message
 sql data type vs vb data type
sql        vbscript
===================
bit        boolean
tinyint    byte
smallint   int
int        long
money      currency
bigint     ??????


Sat, 28 Feb 2004 20:15:06 GMT
 sql data type vs vb data type

very long...


Quote:
> sql        vbscript
> ===================
> bit        boolean
> tinyint    byte
> smallint   int
> int        long
> money      currency
> bigint     ??????



Sat, 28 Feb 2004 20:43:12 GMT
 sql data type vs vb data type
i think  a bit in sql is 0 or 1

i think a boolean in vb is 0 or -1

i use "small int" in sql for this reason.

and i always write my checks on boolean for

= 0

or

<> 0

(i never check for = to 1 or = to -1)

..


Quote:
> sql        vbscript
> ===================
> bit        boolean
> tinyint    byte
> smallint   int
> int        long
> money      currency
> bigint     ??????



Mon, 01 Mar 2004 00:08:52 GMT
 sql data type vs vb data type
Standard SQL does not have bit, byte, Boolean or currency datatypes  The first two are too low level and physical for a high level language.  Boolean makes a real mess in the SQL model because of NULLs and three value logic.  The diffrent national laws and  rules for computing with currencies varied too much to be part of a standard when the Standard was written.  

There are also subtle differences between FLOAT and REAL, and between NUMERIC and DECIMAL datatypes in SQL-92.  

Be careful about what you decide to use, if you want to get or receive data from outside sources.  

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, datatypes, etc. in your schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 01 Mar 2004 00:51:33 GMT
 sql data type vs vb data type
Joe, of course, refers to SQL-92.
It might be worth noticing that SQL:1999 has some of these datatypes: bit and boolean
(as I remember it).

--
Tibor Karaszi, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com


Standard SQL does not have bit, byte, Boolean or currency datatypes  The first two are
too low level and physical for a high level language.  Boolean makes a real mess in
the SQL model because of NULLs and three value logic.  The diffrent national laws and
rules for computing with currencies varied too much to be part of a standard when the
Standard was written.

There are also subtle differences between FLOAT and REAL, and between NUMERIC and
DECIMAL datatypes in SQL-92.

Be careful about what you decide to use, if you want to get or receive data from
outside sources.

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys, constraints,
Declarative Referential Integrity, datatypes, etc. in your schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 01 Mar 2004 16:40:12 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Data Transfer from Long data type to SQL Server Text data type column

2. mssql data types vs JAVA data types

3. mssql data types vs JAVA data types

4. conversion of ODBC SQL data types to ODBC C data types

5. Mapping SQL Server Data Types and ADO Data Type Enums

6. Data Type SQL Server7.0 need a non decimal 1 E 19 data type

7. SQL timestamp data type - correspondency with c++ data type

8. Mapping ADO Data Types to SQL Server Data Types

9. Does VB a similar data type like the C++ Union type

10. Converting OLEDB data types to VC++ data types

11. Disallowed implicit conversion from data type nvarchar to data type money

12. Data type conversion error when saving numeric data types


 
Powered by phpBB® Forum Software