Newbie needs help with invalid argument

Newbie needs help with invalid argument

Post by Maurice Muonek » Wed, 09 Dec 1998 04:00:00



I am trying to read data from a database table on CD.  I am opening another
database on my hard drive, and then trying to 'attach' the table on CD to
the database on my hard drive.  I get an invalid argument message using the
code below.

Private Sub Form_Load()
Dim cdbName As String, dBS As String
Dim myStr, lakeStr, netStr, dateStr As String, lakeRS, netRS, dateRS As
Recordset
Dim origDB As Database
Dim NewTdf As TableDef  'table def for attached table

cdbName = "E:\DATA\READ_CD\FISHDATA.MDB"    'This is the path for the data
on CD
myStr = App.Path & "\FishData.MDB"     'define database path for data on
harddrive
Set origDB = OpenDatabase(myStr) ''define species code list database

Set NewTdf = origDB.CreateTableDef("cdPrim")
NewTdf.SourceTableName = "Primary"
NewTdf.Connect = ";DATABASE = '" & cdbName & "';"

origDB.TableDefs.Append NewTdf  'append or attach external table to current
database  THIS IS WHERE IT BUGS DOWN

End Sub

 
 
 

1. Need help on Invalid Argument

I used to use ODBC to get data from tables in a Btrive engine database to
Access2K. It worked fine until yesterday. I used Get External Data->Import
to
get data. Yesterday, in the middle of getting data, a message "Invalid
Argument" popped up and the process stopped. I tried again and again, only
to see the same message. Worst of all, I now could not get to any table in
that database. Every time I tried, this error message would pop up
immediately.
Any suggestion?
Thanks
Gary

2. DTS and RI constraints

3. Please Help...Linking MBD's with code -- ERROR 3001 - Invalid Argument

4. Corrupt windows

5. Help Please, need to pass arguments to a URL using SQL Server Job

6. A strange DBGrid problem.

7. Help needed on DTS: meaning of the 4 arguments of the Execute method of IDTSCustomTask

8. problem with system.data.dll development vs live

9. Need Help about Name Argument!!

10. Help Please, need to pass arguments to a URL using SQL Server Job

11. Invalid procedure call or argument "DTSDestination"

12. PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument

13. CompactDatabase gives "3001: Invalid Argument"