Hi, im new to programming so pleaser bear with me
Im trying to make a program that creates a table for every entry on a table(store) and inherits (store sample). But it has error. Can somebody please point out to me what im doing wrong.......
Im trying to make a program that creates a table for every entry on a table(store) and inherits (store sample). But it has error. Can somebody please point out to me what im doing wrong.......
Code:
Dim cmdstr As String = ""
Dim rdstr As String = ""
rdstr = "SELECT store FROM stores"
con1.Open()
con2.Open()
Dim cmdread As New OleDbCommand(rdstr, con2)
Dim objreader As OleDbDataReader = cmdread.ExecuteReader()
Dim cmdmke As New OleDbCommand(cmdstr, con1)
Do While objreader.Read()
objreader.Read()
cmdstr = "CREATE TABLE [" + objreader("store") + "] INHERITS [store sample]"
Label1.Text = objreader("store")
cmdmke.ExecuteNonQuery() <<<<<<<<<<< ERROR!!!
Loop
con1.Close()
con2.Close()
Last edited by a moderator: