We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

how to limit vb DataReport to show only the first 200 records to secure my mdb ?

zaheri
zaheri asked
on
Medium Priority
279 Views
Last Modified: 2013-12-25
Hello everybody,
I created a vb app that has a DataGrid where user through SQL select statement can search and then print the result from a DataReport...
my Question has two parts :
How to make the DataReport show only the first 200 records?
How secure my mdb? to hide or change extention of it or any other solution please...
Thanks
Comment
Watch Question

Jim HornSQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015

Commented:
Perhaps a better idea would be to bind your DataReport to a query that has SELECT TOP 200 in it.
leclairm.Net Developer  ERP integration

Commented:
As for securing it, you can check out the links that myself and Computron posted here

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/VB_Databases/Q_21784678.html

regarding setting the database password / userpassword on the fly.

Author

Commented:
Dear Jimhorn and Dear Leclairm,
First of all I hope that you accept my apology for being that late to reply to appreciated answers since i was away
and busy somewhere abroad...

regarding my question...about making a query I thought this may take a big file size on the user HD each time to create
a query...Besides I really do not know how to do this if it is a practicle thing...

I want to avoid securing my mdb by a password... Iam doing this program without having learnt any course in programming it is as a hobbey so do not bother by stupid answer if I tell you I could not follow the link you gave...

folk I do not want to be rude but if I do not hear from you the next 2 hours I will split the points
and again I do apologise for the whole issue... thanx in advance.
Jim HornSQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015
Commented:
A query is basically text that specifies what tables/fields you are using.
For example, if your existing data source points to a table that has 10,000 records, you are loading 10,000 records.
By creating a query that only returns the TOP 200 records of that table, then using it as your data source, you are loading 200 records, which will be much faster and take less memory.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
leclairm.Net Developer  ERP integration

Commented:
Also, if you want the easiest way to password protect your mdb,

open the database in exclusive mode (file/open, then choose open exclusive on the "open" combo box)

go to tools/security/set database password.

This will prompt you to type and retype a password that will be required each time you open it.

Cheers,

Mike
.Net Developer  ERP integration
Commented:
In visual basic, you can then pass this password in your connection string:

dim conn as new adodb.connection
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Yourdb.mdb;Jet OLEDB:Database Password=YourPassword;"

I hope this helps.

Author

Commented:
Thank you Both for your patience that was helpfull and I'll try this out...
:-)
Jim HornSQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015

Commented:
Thanks for the split.  Good luck with your project.  -Jim
leclairm.Net Developer  ERP integration

Commented:
You're welcome and thanks for the split.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.