Results for "Category: Databases/ Data Access/ DAO/ ADO"
This code will copy all fields from all tables in a database and add them to another identical database. My company has Rep submitting database reports all the time. I need to append the data from the reports database to a live database. At first I was running querys I had made in the database but our file structure changed and that was no long an option. This is about as simple as it gets but someone might find it useful.
Simple Database Application with find function.
This is Easy. Very Easy. 10 lines of code, 30 of comments. I'm sick to death of trying to find simple, concise code that tells me what I need to know. This is an example of how to access a SQL Database from VB, and how to use the data returned.
GoXML is a wrapper class for MSXML 2.0 / 2.6 / 3.0 / 4.0, offering access to some of the more basic elements in your xml documents. Use GoXML and easy-to-learn XPath to open, create, modify and save XML documents without a hassle. Don't worry about available MS XML Parser version, GoXML will autodetect it for you! The included code sample illustrates the use of all methods and properties. PLEASE VOTE OR COMMENT, THANKS!
This application will take any table from any database, and converts it into a HTML page, with nice looking tables. I have included a database with the entire 2000-2001 hockey season schedule as an example. The user can then view the schedule for any given date and convert it into a HTML page. Good idea if you're a hockey fan and want to update your page with the games scheduled for the day. Please remember to vote for me!
Haven't made a visual basic program for a long time. Made this for a place that I work. I haven't finished the program yet but couldn't wait to see any comments you make.
It explains the basics on Database managing with ADO using Datagrid.
Using this Program one can browse for Access Database through Network or local computer, pick a table you want to make an XML file from, and finally push a button to create a file in XML format. One can also display the newly created XML file and print it into Textbox with further "copy-and-paste". For database browsing I used an API call: GetOpenFileName Lib "comdlg32.dll" instead of bulky CommonDialog Control. For getting a tablenames of the database I used OpenSchema(adSchemaTables)for create Connection and then simply added tablenames into Combobox. Then I used File access VB feature to write an XML file from access table, reading column names and columns, converting it into XML format and writing on disk. The last feature this program has to print out a newly created XML file into Textbox for analysis and, if necessary, "copy-and-paste".
Use this class to create select, insert, update, delete sql queries. It automatically manages datatype and build data according. I generated this code in order to reduce my time in creation of queries.
An alternative method of reading an MS Excel Spreadsheet.
Basically I took the most common database commands and wrapped them into an Active X DLL. Step 1 – Compile the DLL Step 2 – Open and run the “Test” program Hope this helps some of you newbies
This is a prefabricated database browser to be used with bookmark- and clone-supporting SQL databases (MS-Access for example). It lets the user browse a database or search for specific entries and then select an entry for further processing. The appearance and contents are customizable. Everything above the blue line is part of the OCX Control. Simply stick it in a form, set a few properties and you're go with a commercial quality browser/record selector. A cross linked help file is included. Download is only 20.5 kB.
VBRSGen is a handy VB 6.0 Add-In that creates formatted ADO/DAO recordset and SQL code from Access database tables and queries. Generates variables, sets objects, etc. Also includes a simple "Where" clause creator tool and a results preview grid. Code is ready to paste from the Clipboard or Notepad. Some SQL statements aren't parsed properly, but these can be easily edited; this still saves a lot of time in repetitive ADO/DAO database coding. I'm making this available elsewhere as shareware for $20, but because the PSC community has provided so much invaluable support and helpful code, feel free to download the open source code here for your own personal use at no charge! This was originally posted in early April 2002 and received amazing feedback and dozens of "5-Globe" votes, until the PSC database had some problems. So please vote and leave feedback to let me know what you think!
2 functions to convert a 38 character GUID eg. {2E1EFAD8-4AD9-48A6-B9A9-75505F2B9A51} to a compact/compressed 16 character VB String eg. @#$%
I just put a bunch of controls on a form to play around with it and thought others might be interested in looking at it. Basically it allows you to conect to a mySQL database and ADD, EDIT, and DELETE records. You will need to create a table in mySQL called feedback with the following Fields. Field username Type varchar Size 50 Field emailaddress Type varchar size 50 Field subject Type varchar Size 50 Field message Type Text Requirements: This program requires that you have mySQL loaded somewhere you can connect to it. You must also have myODBC loaded on your machine. This program uses Windows ODBC 0to connect to your mySQL database. Written in VB6
Shows how ADO technology connects globaly. Also shows how to integrate ADO Data Control and the Data Grid. This project uses the phonebook concept to show these concepts.
Class object that can be compiled or copied and pasted into your application that will dynamically create MS Access ODBC DSN's for you.
Here are two functions that will allow you to read and write a Large Binary Object (BLOB) to and from a database. This could be used to store and retrieve images, documents, etc inside the database it self. This is great for those of use that have a lot of Binary files around that we want to keep in a central place that can be backed up and protected with the same security that a database offers. This code will work with *ANY* database that ADO can connect to.
how to use SQL to extract desired information from a database
I did not write this code by myself , i had found it at http://support.microsoft.com/support/kb/articles/Q246/3/35.ASP With this code you can transfer the contents of an ADO recordset to a Microsoft Excel worksheet by automating Excel , this code will work only with Excel 2000 or 2002 , for Execl 97 use my previous examples, or just look at this examlpe for basic knowledge at the IF statement.