How to specify UNSIGNED Byte in MS Access?

Hi.  I have a MATLAB program that interacts with an MS Access database
via MATLAB's "fastinsert" command.

In one table, I'm inserting RGB pixel values, so it seemed natural
that I'd use the "Byte" field size; however I eventually ran into a
problem: I'm not allowed to insert values higher than 127 into the
Byte columns!  This would make sense if I had specified a signed-byte,
but is there even such a thing?  The Access documentation states that
"Byte" can handle values from 0-255, and I haven't found anything else
to explain this.

A simple way around this is to just specify the field size as, say
Integer, but that also seems like a waste of space.

Does anyone know what I'm doing wrong?

- Chris

0
chris
4/3/2007 3:44:20 PM
access 16762 articles. 2 followers. Follow

4 Replies
1058 Views

Similar Articles

[PageSpeed] 49

As the documentation says, Access *only* has the unsigned byte (at least in 
the interface.)

If you are getting a different result, then you don't have the data in an 
Access table. Perhaps the table is linked from another database.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<chris.peressotti@gmail.com> wrote in message
news:1175615060.347943.214980@e65g2000hsc.googlegroups.com...
> Hi.  I have a MATLAB program that interacts with an MS Access database
> via MATLAB's "fastinsert" command.
>
> In one table, I'm inserting RGB pixel values, so it seemed natural
> that I'd use the "Byte" field size; however I eventually ran into a
> problem: I'm not allowed to insert values higher than 127 into the
> Byte columns!  This would make sense if I had specified a signed-byte,
> but is there even such a thing?  The Access documentation states that
> "Byte" can handle values from 0-255, and I haven't found anything else
> to explain this.
>
> A simple way around this is to just specify the field size as, say
> Integer, but that also seems like a waste of space.
>
> Does anyone know what I'm doing wrong?
>
> - Chris 

0
Allen
4/3/2007 3:59:51 PM
> As the documentation says, Access *only* has the unsigned byte (at least in
> the interface.)
>
> If you are getting a different result, then you don't have the data in an
> Access table. Perhaps the table is linked from another database.

It's definitely Access (I created it) but I realize now that the
problem definitely lies with MATLAB -- working in Access' spreadsheet
mode, I was able to manually set the value in a Byte column to be
higher than 127.  So I've started a new thread over there.

Thanks!

- Chris

0
chris
4/3/2007 7:25:03 PM
Hum, I am able to insert values...as long as they fall in the range

0-255

Are you perhaps using a "expression"?

Just put a cbyte(your expression) to "cast" the values to byte...it should 
work...



-- 
Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com


0
Albert
4/3/2007 7:38:04 PM
> Hum, I am able to insert values...as long as they fall in the range
> 0-255
> Are you perhaps using a "expression"?
> Just put a cbyte(your expression) to "cast" the values to byte...it should
> work...

I decided that the "problem" must lie with MATLAB, so I contacted
their support department and here's the answer:
"TINYINT's can only go from -128 to 127.  We are adhering to the Java
types and will probably not want to change it in FASTINSERT. You can
use INSERT instead, as you just did, since it doesn't use the Java set
methods. Alternatively you can change the data type of the field in MS
Access to Integer.

A quick fix would also be to change line 149 of fastinsert from
setByte to setInt; however I do not know if this will affect any
future operations. Please let me know the results of trying out the
above suggestions."

This may not be of much interest to the majority of MS Access users,
but I thought it'd be useful to post in case anyone else happens to be
trying (and failing) the same thing.

Thanks for your help/suggestions,

- Chris

0
chris
4/9/2007 2:40:39 PM
Reply:

Similar Artilces:

Integration for SOP does not pick up credit card specified in source field
Version 8 Integration for SOP does not pick up the credit card specified in the source field it uses the default credit card against the debtor. Can someone let me know if there is a fix for this issue or if this is something that needs fixing in integration manager. kind regards Jen I have an integration in version 8 that pulls in credit card information and I have not seen this behavior. Do you have the original version of IM 8.0 or do you have any service packs installed? "Jen" wrote: > Version 8 Integration for SOP does not pick up the credit card specified in >...

How to specify UNSIGNED Byte in MS Access?
Hi. I have a MATLAB program that interacts with an MS Access database via MATLAB's "fastinsert" command. In one table, I'm inserting RGB pixel values, so it seemed natural that I'd use the "Byte" field size; however I eventually ran into a problem: I'm not allowed to insert values higher than 127 into the Byte columns! This would make sense if I had specified a signed-byte, but is there even such a thing? The Access documentation states that "Byte" can handle values from 0-255, and I haven't found anything else to explain this. A simple wa...

The specified date is invalid
Hello, We have specified the date settings for our CRM 3.0 (Rollup 2) installation as dd-mm-yyyy. When I'm adding a date, like 31/12/07 I get a warning: The specified date is invalid. Enter a date in the format: DD/MM/YYYY. When I enter a date like 31-12-07 I get no warning (and that's OK). Does anyone know were to change the date warning, so I can replace the / by - ? I didn't found it at the Messages section of the Contact entity. The system settings are set to dd-mm-yyyy. Thanks in advantage. LCOW- You can adjust the display of the date by going to ... Settings >...

A program is trying to access email addresses you have stored in Outlook
I have jsut installed OfficeXP pro on WinXP Pro. When I reply to a mail, I get this message: "A program is trying to access email addresses you have stored in Outlook. Do you allow this? If this is euexpected, it may be a virus, you should choose no. etc etc." I have tried but to no avial to determine which program is doing that and if it is a valid program. Does anyone has this experience or do anyone know how to find out what program it is that is doing that? Thanks. Outlook 2002 SP3 adds additional properties to the list of those that are affected by the security features...

Getting cursor to go to specified cell on opening
I want users when opening a location to open with the cursor at a specific spot rather than the last place I saved. Any ideas how? -- lewisjohn78 ------------------------------------------------------------------------ lewisjohn78's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30444 View this thread: http://www.excelforum.com/showthread.php?threadid=501047 Put something like this into a General module: Option Explicit sub auto_open() application.goto thisworkbook.worksheets("Sheet99").range("a99"),scroll:=true end sub Change the work...

Excel front ends to Access Database
We are in the process of converting all our old 95 databases and I have one with excel front ends. Upon converting the DB to Access 2000 and reentering the Excel front end the DB is unrecognized. Any suggestions? Thanks! ...

Roadmap MS POS? pos3?
Hi all, I'm about to purchase MS POS 2.0 The questions i have are: 1. what can we expect from the next version of MS POS? 2. will the previous versions be upgradeable to the 'next version'? will it be a free upgrade or should we also pay for it? 3. is there a roadmap available? i ask this because it will take my customer at least 3 months to type in the 10,000+ inventory items, which means he'll be operational in Q1-2008 and i think(?) a newer version of MS POS should be available round that time. thanks in advance for the response.. ...

Reporting on MS Project Server in java
Hello, I am trying to use MS Project server PSI in java. I could create java stubs by using the wsdl. Now if I want to see all the projects, I couldn' find any API in the Project Web Service. I couldn't find any help related to the same. Is there any way where I can get list of Projects availaible in MS Project Server or do I need to go through the reporting database route? I wanted to use the WEB SERVICE route as I dont have to worry about the security. Any help would be appreciated. Thanks in advance, Milind. Milind: The correct place to ask developer questions ...

Accounting with Ms Access
Hello all I have been working on a database for are small retail Tile company (we do everything by pen and paper now). I have been able to setup a working Orders/Invoice table and forms, CreditMemo table and forms, and PurchaseOrder table and forms all based on the Northwind Sample Database. "Thanks to all the help here". I have been searching for a sample database with accounting. With A/R, A/P, Billing Statements and so on. I am not a programmer or accountant so the chance of me doing something wrong is pretty good. I am hoping that someone has a add-in MsAccess database for ...

Getting MS Outlook 2007 up and running
Hi, New duo-core computer comes with MS Office 2007 suite. When I try to install Outlook, getting this message: (paraphrase): "Cannot connect to server to get configuration" I went ahead and established Outlook without an email feature. How can I install the email feature? Thank you, GA japavrata@gmail.com Please don't paraphrase the error message. The exact message is important. Did you create a profile for Outlook to use? Did you include the correct POP3 and SMTP servernames provided by your ISP? If you're not using an ISP, are you connecting to an Exchange server (a...

Search not confined to specified discussion group
I believe there has been a change in how searches work on this discussion group. When I do a search, it no longer is confined to the discussion area specified Search for xxxx In: yyyyy but searches all discussion groups. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message...

DAO Recordset With Access Office 2002 Database
I have a very old MFC project that uses CDaoRecordset. the recordset was created with the new class wizard and used a database that was created with an old version of Access. As I have upgraded Microsoft Office (I'm now using 2002) the recordset and database have still been accessible from my program. But now I want to add another recordset and I try to do so in the same manner (with the new class wizard) and I am told that the database is an unrecognizable format. This database has been opened and saved by the latest versions of Access as they have been installed and there h...

how do i unblock an attachment from ms outlook
See if the info here helps: http://www.slipstick.com/outlook/esecup/getexe.htm "olekellez" <olekellez@discussions.microsoft.com> wrote in message news:811F560C-86FF-4A3D-99CE-BE90130D5C89@microsoft.com... > http://www.slipstick.com/outlook/esecup/getexe.htm=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 "olekellez" &l...

ms access 2003 template?
i am an administrative professional for the marine corps. in my current office we are using 4 different logbooks/excel tracking systems to keep accountability of documents as they pass from person to person. we are spending more time keeping track of documents than actually working. then when someone wants to know what the status of a document is we've got to start at one tracker.. then move to the next and next until we find where in the process it is... excel trackers are great but cannot be open/updated by more than one person at a time. access seems to be the right direction. ...

Server Propeties -> Directory access question in Exchange2003 Server
Hi all, Not sure if this should be in the Exchange group or the AD group, so I'll try here first. I am about to retire one of our DCs and after moving all the roles off the DC to another DC I thought I would just do a double check before demoting the DC back to a member server. The thing I have come across is that on our Exchange 2003 server under Server proprties -> Directory Access I see some referrences to the DC I am about to demote. This has me worried and I am not 100% sure how I reset these to point to one of the other DCs in our domain. Basically the DC about to go app...

Write Access Error When Using CFileDialog
void myClass::OnBnClickedBrowseOutput() { UpdateData(TRUE); CFileDialog openDlg( TRUE, _T("*.*"), NULL, OFN_HIDEREADONLY, NULL); if( openDlg.DoModal() == IDOK ) { output = openDlg.GetPathName(); UpdateData(FALSE); } } The code above is how I open a CFileDialog in order to grab the path name. The problem I am having is that when execute my code and click on the browse button, it seems to work fine. I close my application and rebuild it, and when I rebuild it, it tells me this: LINK : fatal error LNK1168: cannot open ../../../bin/myfile.exe for writing It does this eve...

automate email from MS Access
I have email addresses in an Access table that i want to drop into a "to" field of a a new message - can i automate this? CAn i also do it for an email i have saved as draft or canned message? Hi Adam As long as you can display the address in a text box on a form there's no problems. Have a look at this post http://groups.google.com/group/microsoft.public.access/browse_thread/thread/d027ec1c58326b5a/f4e7f6921bed3101?lnk=st&q=#f4e7f6921bed3101 -- Wayne Manchester, England. "Adam" wrote: > I have email addresses in an Access table that i want to drop in...

Access 2002 runtime
Hi guys! Where can I find or how do I go about finding the Access 2002 runtime? (Not the update) Any help would be appreciated! If you are asking where you can obtain/purchase this functionality, it is available only with the purchase of MS Office XP Developer's Edition. If you have purchased MS Office XP Developer's Edition and done a complete install, the Packaging Wizard is installed by default to C:\Program Files\Microsoft Office Developer\Packaging Wizard. Please post back if this does not answer your question. hth, -- Cheryl Fischer Law/Sys Associates Houston, TX "J....

OWA access #11
Hi, We did the exchange server migration last week from exchange/windows 2000 to 2003 under the same AD. Everything is working fine now. For the old exchange 2000 (which is the AD GC, DNS and exchange Master server) will keep to running for another two week. The OWA in our intranet is working fine but outside is not. Because of the NAT IP address is still pointing to the old exchange 2000. We want to know how to setup auto-forward to allow user outside our network still can use the OWA. Thanks, Gary. Hi, You will need to have the IP forwarded to the new server (unless the old Exc...

Failed Virtual Allocate Bytes:FAIL_VIRTUAL_RESERVE on 32-bit SQLSe
All, We have a 32-bit SQLServer 2005 (9.00.3353.00) on a Windows 2003 SP2 box.It has 12GB of RAM. I had initially set the Minimum Server memory to 4048 and Maximum Server memory to the Default setting - Which means SQLServer would acquire and release RAM as and when it is required by the OS. I understand that this setting is only for the Buffer Pool. We do have CLR enabled as we have some encryption routines that run and SQLServer is the only software o that runs on this box. Everynight, we run a DBCC of all the databases via the maintenance plan and sometime back, I notic...

Access 2003 and Access 2007 Synchronization
I'm setting up a new business relationship with a company in Portugal. They use Access 2003. I have just bought MS Office Professional 2007 (with Access 2007). Our plan is that they will send, once a month or so, their Access db then we will update and add to that db and then return it after another month or so. There probably won't be a lot of updates on our end so the monthly cycle should work. After they synchronize, they will send a new version of the db and we will start over. My goal is to keep everything as simple as possible partially because I don't know how skillf...

MS Office '04 swells my fontTablesAnnex
So this is bothering me enough to tell y'all. (This happens with 10.3.5 and 10.3.6) I have the entire Adobe Font Folio OTF Edition in my ~/Library/Fonts/. After months of working perfect with Adobe CS and MS Office X, my fontTablesAnnex file was around 6MB. All was well. The first time I launch any MS Office 2004 app the fontTableAnnex file skyrockets north of 200MB. Now I realize that Office needs to build it's own cache, but why can't it leave the system cache alone? Is it possible to change this behavior? Considering reverting to Office X Bill In article <1113350349.81619...

Specifying chart graph
How can I specify on the same chart which fields I want to be displayed as Column and which fields I want to be displayed as Line? I have over seven fields. Let's say I want columns B through E to be columns and the other columns to be lines. Thanks in advance. Forget about the built-in custom types. Make a column chart. Then select a series you want to change to a line, choose Chart Type from the Chart menu, and choose a line style. Select another you want to change and press the F4 function key, and repeat as required. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials a...

making only specified columns visible
I am trying to create a macro that will allow the user of a spreadsheet to only view specified columns. It is easier to describe using an example: 1/05 1/05 2/05 2/05 3/05 matt 2 4 6 5 3 chris 3 4 2 7 1 sara 1 1 9 8 5 ann 5 4 3 3 6 If the user only wants to see data for the month of Feb., is there a way to have a macro hide all columns except those with a column heading of 2/05? Thank you for your help in advance. The following code goes in the sheet module. It assumes the column headings ar...

New users can't access mailboxes
We have a single windows 2000 domain with an exchange 2003 server (2003 O.S.) which has been working fine for some while. The last user account I created was a month or so back which was OK , but I've recently created a couple of new accounts that are having problems. They can log onto the domain successfully , but when I try and set up Outlook 2003 for them I get an error "the name could not be matched to a name in the address list" I've tried two genuine users and a couple of "test" ones as well all with the same symptoms. If I try and send them an email I ...