define excel table in vb 2005 using oledb excel file
Hi, i am making an application that will use a access database and an excel spread sheet. It will basically save data from mutiple text box inputted by the user into both excel and access. The part of the application i need help with is below what i am trying to do is learn how to define the table in the excel tables. I have looked around and have had no progress with defining tables field. Below i have included in the comments the definition type for each column. If possible I would like to have a complete list of excel definition for the field I can use with excel oledb. Any help will be surely appreciated. thx.
dim fName as string = textbox1.text
dim lName as string = textbox2.text
dim ClientID as string = textbox3.text
' Create a excel workbook with a table named Interviews. The table has 10
' fields: ClientID (autoNumber), lastName (char 20), firstName(20),
' phone(number), email(20), date(date), time(time), Voicemail(true/false),
' callBack(true/false), Scheduled(true/false).
Dim conn As New OleDbConnection()
conn.ConnectionString = m_sConn1
Dim cmd1 As New OleDbCommand()
cmd1.Connection = conn
cmd1.CommandText = "CREATE TABLE Interviews (ClientId autoNumber, lastName varchar(20), firstName varchar(20))" ' and so on.........................................
cmd1.CommandText = "INSERT INTO Interviews (ClientId, lastName, firstName) values (" & ClientID & lName & fName & ")" ' and so on............................................
By lew26 in forum Database
Last Post: 06-08-2006, 09:19 PM
By cooldude.i2k in forum VB Classic
Last Post: 08-05-2005, 03:13 AM
By David in forum VB Classic
Last Post: 09-04-2001, 07:38 AM
By Mahendra Gunawan in forum VB Classic
Last Post: 05-02-2001, 07:55 AM
By Lori Taylor in forum VB Classic
Last Post: 06-14-2000, 11:06 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL