Ace08 Posted March 6, 2012 Posted March 6, 2012 Hi Guys, I've found a simple code in vb which creates a simple dbf file after translating it to autoit making the file seems ok however I'm encountering an error "The requested action with this object has failed." when I try to Add/Append columns Dim $tbl = ObjCreate("ADOX.Table") Dim $cat = ObjCreate("ADOX.Catalog") $cat.ActiveConnection = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & @ScriptDir & ";" & _ "Extended Properties=dBase III;" $tbl.NAME = "SAMPLEDB" $tbl.Columns.Append ("Column1", "adVarWChar") ;~ $tbl.Columns.Append ("Column2", "adInteger") ;~ $tbl.Columns.Append ("Column3", "adVarWChar") $cat.Tables.Append ($tbl) I was also able to check ptrex's sample however there are gibberish characters when i try to open it thru excel or scalc(Open Office) Work smarter not harder.My First Posted Script: DataBase
Ace08 Posted March 6, 2012 Author Posted March 6, 2012 (edited) Whew I was able to remove the error by removing "adVarWChar" from $tbl.Columns.Append ("Column1", "adVarWChar") However the header looks like "COLUMN1,C,254" anyone know why? Edited March 6, 2012 by Ace08 Work smarter not harder.My First Posted Script: DataBase
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now