I am transfering data from Access Db to SQL-Server.
There are 483 records which must be inserted into the SQL-Server DB, but i get this error when i try to do it through code.
I did already transfer different other tables with this code.
Error attached.
Last edited by swatty; Feb 3rd, 2003 at 09:37 AM.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
Are you administering this database? It looks like the TempDb database hasn't got the automatically grow file flag set. In enterprise manager click on TempDb, and in the main window click on database properties. There should be an option called "automatically grow file", which if currently unchecked may solve your problem if you check this. It may be worth doing the same with the transaction log as well (clicking on the "transaction log" tab will reveal a similar window: check the same box here).
If you have to deal with the settings as they are, then you had better post the source and destination table definitions. It is probably using the TempDb database to fit your data into the SQL server datatypes.
Both are allready set with a percentage of 10 on the destination DB.
Tempdb is not there.
The thing is , there is a tempdb created to transfer my data.
Do you need the table definitions to check on it.
I have more columns in the destination table , but the required fields all have a default value.
I did the transfer through the import wizard , with an query i have edited because there are two fields which can be null but aren't null allowed in the destination table. It run without any errors and the table was filled correctly.
The problem is I need to get it through my code, without transfering it via SQL-Server Enterprise manager.
How is this possible ?
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
Type on SQL-Server Nullable Type on access DB
int NOT NULL Integer
nvarchar(3) NULL Text(3)
int NOT NULL Integer
int NOT NULL Integer
smalldatetime NOT NULL Short date
nvarchar(15) NOT NULL Text(15)
nvarchar(50) NOT NULL Text(50)
nvarchar(50) NULL Text(50)
nvarchar(50) NULL Text(50)
nvarchar(50) NULL Text(50)
nvarchar(50) NULL Text(50)
money NOT NULL Single
nvarchar(3) NOT NULL Text(3)
money NOT NULL Single
money NOT NULL Single
money NOT NULL Single
money NOT NULL Single
nvarchar(3) NOT NULL Text(3)
nvarchar(20) NULL Text(20)
nvarchar(6) NULL Text(6)
int NULL Integer
nvarchar(3) NULL Text(3)
int NULL Integer
int NULL Integer
nvarchar(20) NOT NULL Text(20)
smalldatetime NOT NULL Short date
nvarchar(20) NOT NULL Text(20)
smalldatetime NOT NULL Short date
money NULL Single
money NULL Single
money NULL Single
money NULL Single
money NULL Single
money NULL Single
Money NULL Single
Extra columns on SQL-Server Default
money NULL
money NULL
nvarchar(1) Not Null ‘K’
nvarchar(1) Not Null ‘K’
Money Not Null 1
Ntext NULL
Ntext NULL
Nvarchar(3) NULL
Nvarchar(3) NULL
Nvarchar(50) NULL
Nvarchar(50) NULL
Nvarchar(50) NULL
Money NULL
Money NULL
Money NULL
smalldatetime NULL
smalldatetime NULL
smalldatetime NULL
Nvarchar(5) Not Null ‘’
Nvarchar(10) Not Null ‘’
ntext NULL
int Not Null 1
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
To transfer this with an insert statement the table is first written to a tempdb. this one is 150 MB and for some reason has'nt got place enough to put in the data.
I filled the table through code with recordsets and it didn't throw me an error.
So I can continue, check this tempdb stuff later.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If