[AccessD] upsizing

Charlotte Foust cfoust at infostatsystems.com
Thu Jul 31 19:50:07 CDT 2008


We do use typed datasets (not datatableadapters, they're what our typed
datasets use), but those go out the window the minute you execute SQL
with ADO.Net directly against a datasource.  And there's no such thing
as an absolute Null.  If it's possible to break our app, the clients
will do so and our code is written to handle Access or SQL using the
same data providers.

Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Thursday, July 31, 2008 2:37 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] upsizing

Hi Charlotte

One way to get around this - if you really need to handle the value as a
numeric - is to use Abs():

  If Abs([YourYesNoField]) = 1 Then
    ' something
  End If

Another is to use DataTableAdapters and/or DAL to isolate you from this
low-level stuff. I couldn't imagine anything else than this is what you
do, but your reply indicates not. Is that really so?

/gustav

>>> cfoust at infostatsystems.com 31-07-2008 17:25 >>>
We have to be careful in our .Net code to always test for 0 or <> 0
because we run against both Access and SQL Server.  Trying to test for
True crashes on one or the other.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Wednesday, July 30, 2008 4:48 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] upsizing

oooooooooooooo.... I like that. :)

Susan H.


> Possiby because Access uses -1  for True and you can't represent that 
> with a bit?
>
> What value does SSMA store insert a True record (1 or -1)?
>
>
> On 30 Jul 2008 at 18:45, Susan Harkins wrote:
>
>> SSMA converts Access Yes/No fields to tinyint, instead of bit -- does

>> anyone have an explanation for that?
>>
>> My guess is it's because SQL Server's bit didn't support NULL's until

>> 7.0, but it seems like the wizard would keep up with something like 
>> that. I really can't recall if Access' Yes/No always supported NULLs 
>> or not.
>>
>> Susan H.



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list