troubleshooting Question

Insert Records in MySQL database using VB 6.0

Avatar of GarySB
GarySB asked on
Visual Basic ClassicMySQL Server
16 Comments1 Solution457 ViewsLast Modified:
If I can get the VB code to read all files in a folder and then print its Filename & Contents to a new file and loop until done, that would be half the work.  After I would need from a MySQL writer the code to embed around each section to insert each one as a new record.  I will then re-write the VB6.0 code with the MySQL instructions to achieve adding all my text files to a table as described below.

I have a text file on my local computer that i want to add its file name and contents into a new record.

File Name needs to go into Field2 and the actual text needs to go into Field3.

This will require two steps since I cannot read my local files in cpanel from my computer i want to create the required file locally in a text file that i will copy and execute in cpanel.

Using VB 6.0 Create a new text file. ( I have about 200 text files, so it needs to loop).  
Read first text file.
Open & write required MySQL syntax to insert record embeding File Name to Field2 and the text contents to field3.
Loop to read all text files.
Print out to new text file.  Now open and copy new text file into procedure section to insert new records in cpanel.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 16 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros