472,146 Members | 1,376 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

help needed with error 3011

i have developed some functions in module using which i want to download CSV files from a Stock exchange server. everything is fine but i am unable to download CSV file, i get following msg "[COLOR="Red"]3011 The Microsoft Jet database engine could not find the object 'http://www.nseindia.com/content/historical/EQUITIES/2007/SEP/'. Make sure the object exists and that you spell its name and the path name correctly.[/COLOR]" however when i check the values in debug windows everything is fine even the file URL is constructed properly. for reference the code is
Expand|Select|Wrap|Line Numbers
  1. ============================================
  2. Option Explicit
  4. Function ImportBhavCopy(dtFrom As Date, dtTo As Date)
  5. On Error GoTo errHandler
  6. Dim dtDate As Date
  8. For dtDate = dtFrom To dtTo Step -1
  9.     'Debug.Print GetURL(dtDate)
  10.     DoCmd.TransferText acImportDelim, "", "Quotes", GetURL(dtDate), True, ""
  11. Next
  13. errHandler:
  14. Debug.Print err.Number & " " & err.Description
  15. Exit Function
  16. End Function
  17. Function GetURL(dtTemp As Date) As String
  18. Dim strTemp As String
  19. strTemp = "http://www.nseindia.com/content/historical/EQUITIES/"
  20. strTemp = strTemp & GetYear(dtTemp) & "/"
  21. strTemp = strTemp & UCase(GetMonthName(dtTemp)) & "/cm"
  22. strTemp = strTemp & GetDay(dtTemp)
  23. strTemp = strTemp & UCase(GetMonthName(dtTemp))
  24. strTemp = strTemp & GetYear(dtTemp) & "bhav.csv"
  25. GetURL = strTemp
  26. End Function
  28. Function GetMonthName(dtTemp As Date) As String
  29. GetMonthName = MonthName(Month(dtTemp), True)
  30. End Function
  31. Function GetDay(dtTemp As Date) As String
  32. If Day(dtTemp) < 10 Then
  33.     GetDay = "0" & CStr(Day(dtTemp))
  34. Else
  35.     GetDay = CStr(Day(dtTemp))
  36. End If
  37. End Function
  39. Function GetYear(dtTemp As Date) As String
  40. GetYear = CStr(Year(dtTemp))
  41. End Function
  43. ============================================
i will really appreciate if anyone can help me with this. i need this to be completed as soon as possible. need to submit this for a project.
Oct 19 '07 #1
2 2466
3,080 Expert 2GB
Could be a corruption sign as described in:

Some MS Access database recovery steps:

1) Create a backup of the corrupt database. (Just in case of)

2) Create a new database and use File/Get external data/Import to get all objects of the damaged database.

3) Try these Microsoft solutions:
Repair A97/A2000:
and/or read the article:
ACC2000: How to Troubleshoot Corruption in a Microsoft Access Database

4) Bit "heavier":
Access decompile:

5) Try a recovery tool / Table rescue
Table datarecovery:
Access recovery:

6) Ask a company (will cost $$'s ! )

check also: http://www.granite.ab.ca/access/corruptmdbs.htm

Oct 19 '07 #2
3,532 Expert 2GB
While Access error messages are notorious for not being accurate, in this case, as the message says, the object


does not exist! Try copying it and pasting it into your browser's address box. You have to take it all the way back to


before you can connect to the site. I think you need to check your references again for the correct URL.

Welcome to TheScripts!

Linq ;0)>
Oct 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Praetorian Prefect | last post: by
reply views Thread by Dirk.Emmermacher | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.