473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Used SQL Upsizing Wizard, Application No Longer Runs

Excuse any errors in my description of the problem, as I'm only an
amateur with Access.

I've just created a simple VB application in A2000 that imports a text
file into a table, and works fine. I then used the Microsoft Upsizing
Wizard to create a new SQL database with an MS Access 2000 back end,
and guess what, it not longer works, but stops at the line

db.TableDefs.Delete ("tblData")

The code to the point where it 'stops' is as follows:

Dim objFile As TextFile
' Create new instance of TextFile class
Set objFile = New TextFile
' Set the Path property
objFile.Path = Trim(strDataInputFile.strFile)
strDataOutputFile = "c:\acag\temp\" & Mid(strDataInputFile.strFile, 15,
Len(Trim(strDataInputFile.strFile)) - 14)
Open strDataOutputFile For Output As 1
strDataErrorFile = "c:\acag\temp\Errors_Data.txt"
Open strDataErrorFile For Output As 2
Dim db As Database
Dim rstData As Recordset
Set db = CurrentDb
' delete previous table
db.TableDefs.Delete ("tblData")

Can anyone put me on the right track please.

-cicada-

Nov 13 '05 #1
3 1576
"-cicada-" <jo********@a1.com.au> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Excuse any errors in my description of the problem, as I'm only an
amateur with Access.

I've just created a simple VB application in A2000 that imports a text
file into a table, and works fine. I then used the Microsoft Upsizing
Wizard to create a new SQL database with an MS Access 2000 back end,
and guess what, it not longer works, but stops at the line

db.TableDefs.Delete ("tblData")

The code to the point where it 'stops' is as follows:

Dim objFile As TextFile
' Create new instance of TextFile class
Set objFile = New TextFile
' Set the Path property
objFile.Path = Trim(strDataInputFile.strFile)
strDataOutputFile = "c:\acag\temp\" & Mid(strDataInputFile.strFile, 15,
Len(Trim(strDataInputFile.strFile)) - 14)
Open strDataOutputFile For Output As 1
strDataErrorFile = "c:\acag\temp\Errors_Data.txt"
Open strDataErrorFile For Output As 2
Dim db As Database
Dim rstData As Recordset
Set db = CurrentDb
' delete previous table
db.TableDefs.Delete ("tblData")

Can anyone put me on the right track please.

-cicada-


What error do you get? Does tblData exist and if so, is it a linked table?
Or perhaps you are trying to delete the actual SQL Server table, rather than
the Access linked table.
Nov 13 '05 #2
Brian,

The error message is 'Path Not Found'

Yes, tblData does exist. In MS Access it shows in the Database window
under the table tab, but does not have the arrow next to it, to
indicate it is a linked table, as is usually the case. The table is
also listed in the SQL database, so having it listed in two databases,
without any indication of linking has confused me.
John Furphy

Brian Wilson wrote:
"-cicada-" <jo********@a1.com.au> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Excuse any errors in my description of the problem, as I'm only an
amateur with Access.

I've just created a simple VB application in A2000 that imports a text
file into a table, and works fine. I then used the Microsoft Upsizing
Wizard to create a new SQL database with an MS Access 2000 back end,
and guess what, it not longer works, but stops at the line

db.TableDefs.Delete ("tblData")

The code to the point where it 'stops' is as follows:

Dim objFile As TextFile
' Create new instance of TextFile class
Set objFile = New TextFile
' Set the Path property
objFile.Path = Trim(strDataInputFile.strFile)
strDataOutputFile = "c:\acag\temp\" & Mid(strDataInputFile.strFile, 15,
Len(Trim(strDataInputFile.strFile)) - 14)
Open strDataOutputFile For Output As 1
strDataErrorFile = "c:\acag\temp\Errors_Data.txt"
Open strDataErrorFile For Output As 2
Dim db As Database
Dim rstData As Recordset
Set db = CurrentDb
' delete previous table
db.TableDefs.Delete ("tblData")

Can anyone put me on the right track please.

-cicada-


What error do you get? Does tblData exist and if so, is it a linked table?
Or perhaps you are trying to delete the actual SQL Server table, rather than
the Access linked table.


Nov 13 '05 #3

"-cicada-" <jo********@a1.com.au> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Brian,

The error message is 'Path Not Found'

Yes, tblData does exist. In MS Access it shows in the Database window
under the table tab, but does not have the arrow next to it, to
indicate it is a linked table, as is usually the case. The table is
also listed in the SQL database, so having it listed in two databases,
without any indication of linking has confused me.
John Furphy

Brian Wilson wrote:
"-cicada-" <jo********@a1.com.au> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
> Excuse any errors in my description of the problem, as I'm only an
> amateur with Access.
>
> I've just created a simple VB application in A2000 that imports a text
> file into a table, and works fine. I then used the Microsoft Upsizing
> Wizard to create a new SQL database with an MS Access 2000 back end,
> and guess what, it not longer works, but stops at the line
>
> db.TableDefs.Delete ("tblData")
>
> The code to the point where it 'stops' is as follows:
>
> Dim objFile As TextFile
> ' Create new instance of TextFile class
> Set objFile = New TextFile
> ' Set the Path property
> objFile.Path = Trim(strDataInputFile.strFile)
> strDataOutputFile = "c:\acag\temp\" & Mid(strDataInputFile.strFile, 15,
> Len(Trim(strDataInputFile.strFile)) - 14)
> Open strDataOutputFile For Output As 1
> strDataErrorFile = "c:\acag\temp\Errors_Data.txt"
> Open strDataErrorFile For Output As 2
> Dim db As Database
> Dim rstData As Recordset
> Set db = CurrentDb
> ' delete previous table
> db.TableDefs.Delete ("tblData")
>
> Can anyone put me on the right track please.
>
> -cicada-


What error do you get? Does tblData exist and if so, is it a linked
table?
Or perhaps you are trying to delete the actual SQL Server table, rather
than
the Access linked table.


If all the tables should be in the SQL database, then the local table
shouldn't be there - so just manually delete it. Normally there should be
no need to delete the table, you can just delete all the records in it, but
if you really need to delete the table, you should make sure the table
exists with the function shown below.
If you need to delete a SQL Server table from an mdb file, then that is a
different matter. Let us know if you need code for that.
Function TableExists(strTableName As String) As Boolean

On Error GoTo Err_Handler

Dim dbs As DAO.Database
Dim tdf As DAO.TableDef

Set dbs = CurrentDb

For Each tdf In dbs.TableDefs
If tdf.Name = strTableName Then
TableExists = True
Exit For
End If
Next tdf

Exit_Handler:
On Error Resume Next
Set tdf = Nothing
Set dbs = Nothing

Exit Function

Err_Handler:
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler

End Function
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary Bouchard | last post by:
I have a Visual Basic 6 application that uses MDB or SQL Server databases. I was wondering if it was possible via Automation or ADO or some method, where I could programmicatlly upsize an MDB...
1
by: Big Time | last post by:
I have an Access 2000 DB that I've been considering upsizing to SQL Server 2K. I'm wondering if anyone can share their experiences in upsizing and let me know of any tips or pratfalls. I've been...
1
by: Arthur Cheung | last post by:
I use the upsizing wizard to upsize a db in MS Access2K into MSDE 2000 (Both are running on my local W2K machine). After answering the wizard questions, the system returns an error message...
1
by: John | last post by:
Hi I am using the upsizing wizard to move a table from access 2000 to sql server. The table does not get exported and all I am getting is a 'Table was skipped, or export failed' error in the...
2
by: Big Time | last post by:
I have an Access 2000 DB that I've been considering upsizing to SQL Server 2K. I'm wondering if anyone can share their experiences in upsizing and let me know of any tips or pratfalls. I've been...
3
by: Devonish | last post by:
I am planning to convert an existing Access database which has a back end (data tables and relationships only) on a server and a copy of the front end (form, queries, reports) on each of about a...
7
by: JM | last post by:
I'm using Access 2003 to attempt an upsize to SQL Server 2000. The Upsizing Wizard is giving me tons of problems with error messages like: 1. "Object is invalid. Extended properties not...
1
by: Jim Devenish | last post by:
I am continuing my exploration about upsizing to SQLServer from Access 2000. I have a split database with a front-end and a back-end, each of which is A2K. I have spent some time in bookshops...
3
by: Wayne | last post by:
I've just installed SQL Server 2005 Express together with SQL Management Studio Express on my local machine and I'm trying to upsize a data mdb to SQL Server using the upsizing wizard. The data...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.