Source language: Translate to:

Access DB using Yes/No Field

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Re: Access DB using Yes/No Field

Postby datadon » Thu Mar 06, 2014 9:49 am

I just exported all the data to an excel file and then created a new database. Imported it all and tried again. No cigar. Same issue.

I did create a new simple database with a few records and columns and tried it and YEP it worked fine.

So something is amiss with the data or size or cols names or ?

And as a matter of fact, if I choose another column, text type and put an X in it and try to query by that, I get the same problem.

There is something dark about this database...... ;-)

Don
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: Access DB using Yes/No Field

Postby Wrangler » Thu Mar 06, 2014 9:55 am

I see in your opencode.txt file in your download that you open the table. Did you also open the database first?

Can you post all the code you use to open the db?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Access DB using Yes/No Field

Postby datadon » Thu Mar 06, 2014 10:03 am

Yes I opened the database when starting the pub.

The table comes up fine in the rectangle. It just doesn't query. I tried moving the query to after displaying the data and it doesn't care.

In my sample simple db that works I can place the query either side of display and it still works.

I'm thinking more and more that is a unique issue related to size or names or something. The database works great except for this query issue.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: Access DB using Yes/No Field

Postby Wrangler » Thu Mar 06, 2014 10:07 am

And you also tried

dbpQuery "CSI" "48Sections" "Choose = True" and not dbpQuery "CSI" "48Sections" "Choose = TRUE"?

And verified that the field choose is boolean?

Can you email me the pub?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Access DB using Yes/No Field

Postby mishem » Thu Mar 06, 2014 10:26 am

What exactly does "Cannot perform this operation on a closed dataset" mean.


I also have this error. But it does not always appear. Basically, when there is a reference to both the text fields of type String, Char or Memo.

How did the base? Maybe she was assigned to what some permissions?
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: Access DB using Yes/No Field

Postby Gaev » Thu Mar 06, 2014 11:03 am

Don:

I tried some queries on your .mdb file.

There appears to be something "not kosher" with the file ... perhaps because you created this out of the .accdb file (which may or may not be corrupted already).

1) I had no problem opening the database and table and viewing it in a Rectangle/Grid.

2) Except for one occasion, the dbpQuery always returned the error message "Cannot perform this operation on a closed dataset" ... including queries on the other fields in the Table.

3) On the other occasion, it (incorrectly) displayed all records.


The only other thing I can say is to try and use a Table name that begins with a letter (instead of 48Sections) ... and field names that are not likely to conflict with Reserved Names (like Number and Choose).

Might be best to create a new .mdb type of database ... manually populate it ... and see if the Queries work ... and if they do, export the records from the current database and import into the new one.

If you want, I can manually create an .mdb database with the same types of fields ... and send it to you.
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Access DB using Yes/No Field

Postby datadon » Thu Mar 06, 2014 11:22 am

Thanks Gaev

I think my zip file should have had an .mdb version as well. I've been getting the same errors with both types.

I did create a simple database and try the query and they do work. There is something here that is out of sorts of some kind.

I will rename the table and try that. Looked up reserved words and did not find Choose, Select was bad but Choose did not show on list.

I appreciate all taking time with this. When I get a solution, good or bad I will post and let everyone know.

Don
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: Access DB using Yes/No Field

Postby datadon » Thu Mar 06, 2014 11:58 am

My thanks to all who have helped with this.

THE PROBLEM HAS BEEN SOLVED!!!!

It was the table name. 48Sections

Gaev was right. You can't use a number in the name like that. I renamed the table and the problem went away.

The database worked fine except for the query. So I think we all learned something. At least I know I did.

Thanks for ALL your help.

Don
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: Access DB using Yes/No Field

Postby Wrangler » Thu Mar 06, 2014 12:05 pm

I was just in the middle of trying that myself! Glad you got it to work. Something to be noted.

So, why is it so hard for Access to tell us that? And why is there nothing comes up when googling that? Go figure.

Maybe sometime Dave can add that to the reserved check in dbpro......
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Access DB using Yes/No Field

Postby datadon » Thu Mar 06, 2014 12:14 pm

Some people love their bar and some people love their truck. Me I love this place. (ok I like my bar and my truck too)

Everyone got involved and PROBLEM SOLVED. How good is that!

Don
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: Access DB using Yes/No Field

Postby Gaev » Thu Mar 06, 2014 12:51 pm

Don:
It was the table name. 48Sections
You can't use a number in the name like that. I renamed the table and the problem went away.

Yee Haa !!! ... Hail Mary pass worked once again !!!
Looked up reserved words and did not find Choose

I did too ... did not find Choose ... but Number sounded suspicious ... in any case, I err on the side of caution and never use field/table names that sound like something the software will (now or in the future) decide to grab for its own use ... and the "start with a letter" habit comes from my mainframe (before PC) days when IBM was anal about such things.

Wrangler:
So, why is it so hard for Access to tell us that?

Looks like the later version of Access (the one that supports .accdb type of files) supports Table names that start with numbers ... but the older version of Access (the one that used .mdb) did not (at least within the Query command) ... and when it encountered such a name, it interpreted the "invalid Table name" as a case of "database Table not opened before the query request" ... hence the error message "Cannot perform this operation on a closed dataset" ... "dataset" used to be IBM lingo for file ... I guess it is MS lingo for Table !!!
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Access DB using Yes/No Field

Postby Wrangler » Thu Mar 06, 2014 1:25 pm

Everyone got involved and PROBLEM SOLVED. How good is that!


That technique has worked since the beginning of mankind. If we ALL help each other, we will all make it. :) People can move mountains, if we decide to do so.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Access DB using Yes/No Field

Postby Gaev » Thu Mar 06, 2014 4:36 pm

Wrangler:
People can move mountains

Been there, done that ... only it was made of paper mache ... and was only 5 feet high :!:
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Access DB using Yes/No Field

Postby datadon » Thu Mar 06, 2014 5:13 pm

Not bad Gaev, not bad

When I was over in Saudi Arabia years ago, i visited the Red Sea. While there I grabbed a couple of water bottles and grabbed some of the water to bring back and show my family. My friend Joe was with me and did not get any water. On the way home he expressed to me that he wished he had gotten some of that water also to bring back. Me being the nice guy I am said, here, take one of mine, I got two of them.

I guess you could say I "Divided the Red Sea" Wonder what Moses would say about that!

True story.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Re: Access DB using Yes/No Field

Postby Neosoft Support » Thu Mar 06, 2014 6:29 pm

I'm glad you guys figured this out. Good work!

I didn't realize that table names can't begin with a number, but then I've probably never tried it.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

PreviousNext

Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests

cron