Hi,
Pl tell me the code to copy the existing table of Access or SQL and give the new file name to it from VB6 at Run time without changing the field name.

(k. S)

Recommended Answers

All 6 Replies

Do you have the code to open a database? Do you have the code to select what you want from the database? Do you want to keep the native database format or are you wanting to export it to something like a .CSV file? Are you looking to be able to back a database up? What code do you have? Please show us so we can help you help yourself.

Hi,

Which Database..? Access/MSSQL/Oracle..?

Hi,

Which Database..? Access/MSSQL/Oracle..?

Hi,
Presently I am using Access as backend.

I am using code like this
Under General tab
Dim cn as new ADODB. Connection
Dim rs as new ADODB. recordset

code to Select database is
rs.open "Select * from <table name>",cn,adopenstatic, adlockoptimistic
using ACCESS as backend

Hi,

Try this for access:

SELECT * INTO NewTabName FROM OldTabName

Regards
Veena

CREATE TABLE IF NOT EXISTS newTable SELECT * FROM anotherTable WHERE yourcondition='conditionvalue'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.