Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to VB

Status
Not open for further replies.

amberH

Programmer
Jun 10, 2002
36
CA
Hello,
I have a general question to ask.
I had created a database, and using VBA was pulling data from text files to populate the database.
Now I've been asked to move the data automatically into SQL Server (which I know next to nothing about) AND instead of using Access VBA, to make an .exe file in VB 6.
I'm wondering what kind of a learning curve this is going to be.
I've copied and pasted my code into VB, and so far, nothing seems very similar.
Can anyone point me to a helpful site to figure out where to begin, and what the main differences between the two are??

Thanks,
amber
 

VBA is a subscript of VB like javascript is a subscript of java.

The learning curve should not be that great for a lot of the common functions. The ADO that you will need to learn will be somewhat similar to the DAO of the access database but there will be distinct differences especially when connecting to the SQL server. Over all you should not have a problem.


 
It should be very easy, IMO. One thing you might need to think about is different SQL syntax with SQL Server. For example, using a ' instead of a # around dates on your INSERT INTO statements.

You'll have to make a connection string to the SQL Server, which is really easy. The way I usually do this is make an ADO object, use the connection string wizard, and paste the text into my code and then delete the ADO object.

You'll find that VB is much easier to work with than VBA.
 
Javascript is not a subset of Java. It is a completely independant scripting language originally developed by Netscape under a completely different name (LiveScript), and eventually renamed Javascript to jump on the Java bandwagon. Since it's release Sun and Netscape have formed an alliance which has resulted in Java and JavaScript (or, more accurately ECMA-262, an open standard which means that MS could release JScipt) mutually interoperable, but that's about it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top