DJEZ
02-19-2015, 07:47 AM
HELLO,
I manually connected a file named classeur1.csv and I changed the type of some columns. The table name is linked t_externe
Tomorrow will use the file classeur2.csv.
How to change the source of the t_externe way of a take classeur2.csv data without deleting t_externe.
I tried the following code but does not work.
Set tbl = db.TableDefs("t_externe")
Debug.Print tbl.Connect
'return me: Text;DSN=CLASSEUR1 SpÈcification d'attache;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=850;DATABASE=C:\Document s and Settings\DAVID_JEZEQUEL\Bureau
tbl.Connect = "Text;DSN=CLASSEUR2 SpÈcification d'attache;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=850;DATABASE=C:\Document s and Settings\DAVID_JEZEQUEL\Bureau"
tbl.RefreshLink
I manually connected a file named classeur1.csv and I changed the type of some columns. The table name is linked t_externe
Tomorrow will use the file classeur2.csv.
How to change the source of the t_externe way of a take classeur2.csv data without deleting t_externe.
I tried the following code but does not work.
Set tbl = db.TableDefs("t_externe")
Debug.Print tbl.Connect
'return me: Text;DSN=CLASSEUR1 SpÈcification d'attache;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=850;DATABASE=C:\Document s and Settings\DAVID_JEZEQUEL\Bureau
tbl.Connect = "Text;DSN=CLASSEUR2 SpÈcification d'attache;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=850;DATABASE=C:\Document s and Settings\DAVID_JEZEQUEL\Bureau"
tbl.RefreshLink