Important alert: (current site time 7/16/2013 2:58:35 AM EDT)
 

winzip icon

SQL Server Database Control 1.0

Email
Submitted on: 8/5/2003 5:37:12 PM
By: Issam Hijazi 
Level: Beginner
User Rating: By 104 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 52535
author picture
(About the author)
 
     Here is a list of this control futures: 1. Login in to MS SQL Server 2. Backup, repair and restore databases 3. Upload databases and delete databases 4. Control the server (Start, Stop, Pause and Continue) 5. Check Server Status (Started, Stoped or Paused) 5. Check connection if active to server or not 6. List databases in the MS SQL Server, list teables and fields in table 7. Open connection with database and SQL statments (like select) 8. Save any file to Binary Field in table (like upload picture to table) 9. Display picture saved in database field to object (like Picture control) 10. Save a file from database field (like picture or txt files) to harddisk 11. Check if EOF or BOF 12. Find any record easy 13. Add, Edit, Update and Delete records 14. Bind the database fields to VB Objects (like Text Box or Label) 15. Bind the database table to MSFLEXGRID32 control 16. Handle All errors easy (no visible run time or desgin time errors), all hadled by name & num. Its the easiest, coolest code ever seen! You can learn even how to upload and download files from MS SQL Server! Its learning control and can be used for your projects as well! I hope you like it, if yes, please rate it, thx anyway! :)
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
8/6/2003 7:06:55 AMIssam Hijazi

Hello all there,,

OK, Now this zip contains the code, enjoy it!! I'm sorry for what happened before!!

Just please rate it!
(If this comment was disrespectful, please report it.)

 
8/6/2003 9:35:52 AM

Hi it looks very nice your control, but can you tell me how to restore a DB after i have back it up.
(If this comment was disrespectful, please report it.)

 
8/6/2003 8:07:59 PMIssam Hijazi

thanx X programmer,

you can restore the database by this line:
sqlSDBC1.RestoreDatabaseFromFile (the db backup file name without any extension as you backed up it, the path of this file)

e.g. sqlSDBC1.RestoreDatabaseFromFile northwind, c:\my documents

while the backed up file name is northwind.bak! got it, hope so!

tell me what you say and plz rate this control! take care!
(If this comment was disrespectful, please report it.)

 
8/6/2003 9:45:14 PM

Code is excellent, highly recommended.
Makes life easier!!!
(If this comment was disrespectful, please report it.)

 
8/7/2003 3:13:06 AM

Hello code maker, i have been loking for a code like yours for long time, I am very pleased that you have done it.
Thanks for your comments about restore, it seems to work. I am a beginner in Sql Server, so please tell me what about the logfile *.ldf do i need too back it up and restore it ??.
(If this comment was disrespectful, please report it.)

 
8/7/2003 7:52:15 AMIssam Hijazi

no you don't have to backup and restore the log file! if you backup database in the sql server, its real backup with full tables and fields and data on it!! so, no require to backup the log file :)

tell me what you say, and plz tell others about it and make them rate it.
(If this comment was disrespectful, please report it.)

 
8/7/2003 1:43:30 PMJ. Berz

incredibly stuff!
Realy Good job!

5 globes from me!!!
(If this comment was disrespectful, please report it.)

 
8/7/2003 4:49:52 PM

I think it really a wonderful pice of coding> Yhanks for all you help!!
(If this comment was disrespectful, please report it.)

 
8/8/2003 6:32:46 PMJim K

Nice code Issam.
(If this comment was disrespectful, please report it.)

 
8/8/2003 10:29:23 PMAndrew Stickney

I gave it 5*'s, excellent code...
(If this comment was disrespectful, please report it.)

 
8/9/2003 10:20:07 AM

good job, but a psc submission without
source code is not acceptable.
(If this comment was disrespectful, please report it.)

 
8/9/2003 10:41:12 AM

great work, its just what I was searching for!! thx, i give rate it Excellent because it deserve!
(If this comment was disrespectful, please report it.)

 
8/9/2003 10:44:40 AMIssam Hijazi

Dear user that posted on 8/9/2003 10:20:07 AM, the source code is include, you can check it out!! Please, don't say (psc submission
without
source code is not acceptable) while the source code is included!!

If you have problem, please let me know!!!

P.S: I hope you all rate this control! thx
(If this comment was disrespectful, please report it.)

 
8/9/2003 1:02:19 PMAbhishek Gupta (abhitimes)

Really liked your logic.
It made clear about sql server commands, now i am confident. thanx a lot.
(If this comment was disrespectful, please report it.)

 
8/9/2003 1:35:07 PMDENCIO

Nice work you got there I've learned a lot from it.. 5 gloves from me
(If this comment was disrespectful, please report it.)

 
8/9/2003 1:59:09 PMHyperHacker

Looks pretty good, but I can't seem to rate anything, because my ad-blocker is messing up the verification code images. I gotta fix that. >_<
(If this comment was disrespectful, please report it.)

 
8/9/2003 2:33:31 PMStryksta Guy

5 Globes!
(If this comment was disrespectful, please report it.)

 
8/9/2003 7:33:46 PM

I did not test your code yet, but the idea itself seems to be nice. I only noticed one thing, I think you should have included a test project with your control to make it easy to know how to use this OCX.

Anyway, thanks for sharing and wish you best luck.
(If this comment was disrespectful, please report it.)

 
8/9/2003 7:43:42 PMIssam Hijazi

hello my friend who posted on 8/9/2003 7:33:46 PM, sure I'll will include an example prject.

thx for your rate
(If this comment was disrespectful, please report it.)

 
8/10/2003 9:51:44 PMShashir Reddy

NICE!!
(If this comment was disrespectful, please report it.)

 
8/11/2003 10:54:56 AM

issam go a head u r rocking us wth ur new code,so keep on this great work.
take care buddy
(If this comment was disrespectful, please report it.)

 
8/11/2003 9:49:15 PMIssam Hijazi

Hello programmers, I would like first thanks the persons whom voted for the code and others downloaded it and found it useful even if they don't voted!!

I had upload on the date you see this feedback posted a new code, its not really new code, but its edited for better. You can notice that in some parts!! If you have any question about any part pleae contact me!!
(If this comment was disrespectful, please report it.)

 
8/13/2003 1:07:15 AM

Thank's...
(If this comment was disrespectful, please report it.)

 
8/14/2003 10:24:37 PMIssam Hijazi

Hello all,

I updated the code now, updated of course for better! I also add a comments for each line in the code! So, you will get it all easy for understanding!

Its really now works for real programs and for learning stuff! Everything you need now is included!

Please, if you need anything (ANYTHING) in databases stuff, please contact me asking you question, I'll be happy to answer you! Or, if you need anyhting thats not included in this control, aslo contact me!

Thanks all for your support!, I really feel happy when I found you like the code and appreciate it!
(If this comment was disrespectful, please report it.)

 
8/16/2003 10:21:17 PMLuis Ibarra

Excellent code! something to have in my own code bank.
(If this comment was disrespectful, please report it.)

 
8/18/2003 1:22:00 AM

Issam, I voted with 5 globes and I wish that I can vote again with another 5 globes.

Thanks man.
(If this comment was disrespectful, please report it.)

 
8/18/2003 10:50:51 AMDAProgs

Super code!!
Nicely commented...
5*

Continue the good work
(If this comment was disrespectful, please report it.)

 
8/21/2003 11:21:45 AMAsif Shahzad

well, this is greate ActiveX
(If this comment was disrespectful, please report it.)

 
8/22/2003 3:20:59 AM

well, nice piece of code...
But I suggest, u make it as an activex dll rather than activex control.
The control made by use doesnt have any relevant design time properties, so why make it a control.
Make it a DLL and let programmers use it by adding a reference to their project.

Still good work as a beginner.
(If this comment was disrespectful, please report it.)

 
8/22/2003 9:50:35 AMIssam Hijazi

thanks used give me feedback on 8/22/2003 3:20:59 AM, I will work on your advice, but this will dont in the next version of it, not this, as I will add many other futures!

thanks for your suggestion anyway!
(If this comment was disrespectful, please report it.)

 
8/29/2003 7:07:24 PM

I can't belive, I have just registered in PSC and I can find everything I need! this is great web site, also I want to thank the code of this code very much, its just what I need, really great JOO! :)

Keep on this good work!

I rated it Excellent cause its really deserve it!
(If this comment was disrespectful, please report it.)

 
8/30/2003 1:35:27 PMNabhan Ahmed

Very nice cood, man .
(If this comment was disrespectful, please report it.)

 
8/30/2003 1:35:47 PMNabhan Ahmed

Very nice code, man .
(If this comment was disrespectful, please report it.)

 
8/31/2003 2:50:57 AM

i rate ***** for this code.

jomblo keren
(If this comment was disrespectful, please report it.)

 
8/31/2003 5:31:11 PM

good work!
(If this comment was disrespectful, please report it.)

 
9/6/2003 6:15:02 AM

Good work Issam...
(If this comment was disrespectful, please report it.)

 
9/14/2003 2:20:53 AMMOB

Super code!!
Nicely
commented...
5*
Thnaks Isam :)

(If this comment was disrespectful, please report it.)

 
9/14/2003 11:45:27 AMIssam Hijazi

Thanks you all, there is really great people, I mean it, thanks to all those wrote there Feedback and ones who tell me about some bugs and others rated it or do both! also thanks to others who downloaded it and use it, im just happy with that at least! you are really all great! thank you again. and i say peace on those who voted bad on the code just because problem with there selves!

Thanks again, and welcome to new users use it in the future.

Any help, please contact me, I will help you with plesure! Also, any project you want I can do it for you.
(If this comment was disrespectful, please report it.)

 
9/17/2003 5:42:19 AM

Nice looking code, could you tell me though how i can set the SQL Server to Auto start when the operating system starts.
(If this comment was disrespectful, please report it.)

 
9/20/2003 9:34:24 AM

Excuse me, I'm new in SQL Server. can you tell me using your SQl Control in VB? Thanx
(If this comment was disrespectful, please report it.)

 
10/9/2003 7:13:27 PMShazbot

*****
(If this comment was disrespectful, please report it.)

 
10/15/2003 4:59:14 AM

please send me codes
(If this comment was disrespectful, please report it.)

 
11/1/2003 7:25:26 AMPeter van Velzen

Hey there, where can I get 'Microsoft SQLDMO Object Library'? ('SQLDMO.dll')

Evry time I try to run the code It gives the error:
"Missing: Microsoft SQLDMO Object Library"
(If this comment was disrespectful, please report it.)

 
1/28/2004 9:10:12 PMIssam Hijazi

you can make sql server 2000 start automaticlly by open your service manger, then check the aut start with windows check box, that set :)
(If this comment was disrespectful, please report it.)

 
1/28/2004 9:12:56 PMIssam Hijazi

well, hello new sql user, this is ActiveX control, ocx, can be added to the project like other integrated control (textbox, label...), the beifit of using it are GREAT, everything can be sone automated, also, its good to learn the techniq also, its really good for all beginners.

new version comming soon, but with GREAT other futures guys, so you just wait :)
(If this comment was disrespectful, please report it.)

 
1/28/2004 9:21:48 PMIssam Hijazi

hello there asking about SQLDMO, its good question ;), well SQLDMO library is installed by default by SQL Server not by MS Access :), this control name is SQL Server Control, so what do you think?? dont need SQL Server be installed on the system?? this YES!

well, the good here about ur quesion is, what if you want to remote SQL Server?? how can i get my SQLDMO libray files?? well i tell you how, coz i asked by self the same question, first of all search a computer hold SQL Server 2000 for the following files and copy them to a folder:
(If this comment was disrespectful, please report it.)

 
1/28/2004 9:22:10 PMIssam Hijazi



sqlclnt.rsp
sqldmo.dll
sqldmo.rll
sqlparse.dll
sqlresld.dll
sqlsv r32.dll
sqlstr.dll
sqlsvc.dll
sqlsvc.rll
sqlwid.dll
sqlwoa.dll
W95SCM.dll

r emember,
if you are installing sql server in the station or the client tools for sql server, then no need for these files coz they already exist, BUT if you going to use this computer on a computer dont hold sql server or sql server connectivity things then get them all, any 1 miss, mean no work! include them all in your installation....

oh lsn btw, you have to register the file (sqldmo.dll) only, not all of them, only this file, by regsvr32 control....

i worked hard, and search a lot to figure this out...

cheers :)
(If this comment was disrespectful, please report it.)

 
1/28/2004 9:24:45 PMIssam Hijazi

i forget to tell this, if you didn't find any file, dont ask me "well, i search my computer, and don find it!" first make sure SQL Server is installed on the computer, then if you didn't find a file, then go search the internet, copy its name with extension and search the internet, work on it alone!!

again, you only need to do all this if you want to use this control on computer dont hold SQL Server 2000 or SQL Server Connectivity Components (Part of SQL Server 2000)

thats all!
(If this comment was disrespectful, please report it.)

 
12/3/2004 12:10:21 PMAlain GUERIN

EXCELENT !
5 globes is a minimum, nice work, nice code.
Tx for sharing Issam
(If this comment was disrespectful, please report it.)

 
5/24/2005 8:41:12 AM

Excellent
(If this comment was disrespectful, please report it.)

 
6/26/2006 10:20:21 AMMTIG

Muy bien y muchas gracias! You get 5 from me.
(If this comment was disrespectful, please report it.)

 
2/18/2007 9:59:31 PMlarcile

Excelete!!!!!
(If this comment was disrespectful, please report it.)

 
2/1/2008 3:37:30 PMAjay Lyardson

5* from me
(If this comment was disrespectful, please report it.)

 
2/22/2008 1:07:02 AMYoung-ho Kook

How can I use this?
Please send me a sample code...^^
(If this comment was disrespectful, please report it.)

 
6/4/2008 7:08:47 AMFares Hanini

5***** Excellent!
Thanks to send a help if you have it.

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.