WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Data Query - Text file specification does not exist...

 
   Home -> Office -> Query DAO RSS
Next:  how to minimize and expand the rows?  
Author Message
Kevin N

External


Since: Nov 23, 2006
Posts: 7



(Msg. 1) Posted: Tue Mar 27, 2007 7:00 pm
Post subject: Data Query - Text file specification does not exist...
Archived from groups: microsoft>public>excel>querydao (more info?)

I am having problems with corruption of a Data Query in an Excel workbook
which works fine until I run the routine below which causes a
‘[Microsoft][ODBC Misrosoft Access Driver] The text file specification ‘…’
does not exist. You can not import, export or link using the specification.’
error message when I try to refresh data queries in other worksheets. When I
look in the Access MSysIMEXSpecs hidden system table there is a record ‘…’
relating to the supposedly missing text file specification! The routine was
written to import data from a crosstab query with inconsistent field names,
works fine and is shown below.

Sub forecastimport()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Const qryname = "q_mycrosstab"
Const dbsname = "mypath\myfile.mdb"
Const sht = "myworksheet"

Set dbs = OpenDatabase(dbsname)
' Open a forward-only-type Recordset object.
Set rst = dbs.OpenRecordset(qryname, dbOpenForwardOnly)

'Copy data onto worksheet
With Worksheets(sht)
..Cells.Clear
'Set-up headers
For iCols = 0 To rst.Fields.Count - 1
..Cells(1, iCols + 1).Value = rst.Fields(iCols).Name
Next
'Copy records
..Range("A2").CopyFromRecordset rst
End With

'Clean up
rst.Close
dbs.Close
Set dbs = Nothing
Set rst = Nothing
End Sub

I am using Office 2003.

Do you have any ideas or suggestions?
Back to top
Login to vote
Kevin N

External


Since: Nov 23, 2006
Posts: 7



(Msg. 2) Posted: Tue Mar 27, 2007 7:00 pm
Post subject: Clarification - Data Query - Text file specification does not exis [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have narrowed the problem down.

The problem:
Opening a recordset using the instruction below causes a failure refreshing
linked tables, linked to csv file, and queries related to these tables.

Set rst = qdfTemp.OpenRecordset()

Any suggestions would be greatly appreciated.
"Kevin N" wrote:

> I am having problems with corruption of a Data Query in an Excel workbook
> which works fine until I run the routine below which causes a
> ‘[Microsoft][ODBC Misrosoft Access Driver] The text file specification ‘…’
> does not exist. You can not import, export or link using the specification.’
> error message when I try to refresh data queries in other worksheets. When I
> look in the Access MSysIMEXSpecs hidden system table there is a record ‘…’
> relating to the supposedly missing text file specification! The routine was
> written to import data from a crosstab query with inconsistent field names,
> works fine and is shown below.
>
> Sub forecastimport()
> Dim dbs As DAO.Database
> Dim rst As DAO.Recordset
> Const qryname = "q_mycrosstab"
> Const dbsname = "mypath\myfile.mdb"
> Const sht = "myworksheet"
>
> Set dbs = OpenDatabase(dbsname)
> ' Open a forward-only-type Recordset object.
> Set rst = dbs.OpenRecordset(qryname, dbOpenForwardOnly)
>
> 'Copy data onto worksheet
> With Worksheets(sht)
> .Cells.Clear
> 'Set-up headers
> For iCols = 0 To rst.Fields.Count - 1
> .Cells(1, iCols + 1).Value = rst.Fields(iCols).Name
> Next
> 'Copy records
> .Range("A2").CopyFromRecordset rst
> End With
>
> 'Clean up
> rst.Close
> dbs.Close
> Set dbs = Nothing
> Set rst = Nothing
> End Sub
>
> I am using Office 2003.
>
> Do you have any ideas or suggestions?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Query DAO All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET