Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Wednesday, March 7, 2012

error 0x80004005 when copying tables between servers

hi
I've got a job which copy tables between different servers .
I am feeding the tables one by one and the process of copying is in a loop so I have cotrol over the copying process.
it works fine but sometimes randomly I am getting

Execution failed with the following error: "ERROR : errorCode=-1071636471 description=SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}".

and the process fails and this might happen for in any point and on any table and sometimes it runs all the way successfully!!
any idea what the problem might be!
ThanksDo the tables have exactly the same structure? If not then I'd suggest it is as indicated a simple conversion error due to a type mismatch.|||Yes they are exactly the same is if it isn't it shouldn't run successfully sometimes!|||

Kolf wrote:

Yes they are exactly the same is if it isn't it shouldn't run successfully sometimes!

Unless they aren't the same, but normally the data can be explicitly cast to the destination type. Perhaps, though, that sometimes there is data in the source that cannot be cast.

How do you copy the tables?|||using the SSIS Object trasfer task object, and also I have to mention it is from sql 2000 to 2005
thanks|||

Kolf wrote:

using the SSIS Object trasfer task object, and also I have to mention it is from sql 2000 to 2005
thanks

Can you by chance post the create table statement for your table in SQL Server 2000?

Error : SQL server does not exist or access denied.

Error : SQL server does not exist or access denied.
We are replacing the box the SQL server resides on and we have set up the
new server as a copy of the old one. It is a Win2000server with DNS and
active directory.
SQL server ver 8.00.760
We are able to:
Attach to the new server from workstations including exploring and
mapping the drives (actually our old server mappings worked)
We can establish an ODBC connection to the SQL server from the new box
and it tests fine so the server is started and running.
We were able to get one workstation to access the SQL server after
enabling name pipes but another still could not.
We are able to connect to the old DNS server and SQL server from all
workstations with no difficlties. Only one of the servers is connected at at
ime.
We can not set up an ODBC connection from any other workstation attached to
the new server. This is the error message we receive:
Connection failed:
SQL State 01000
SQL Server error: 10060
[Microsoft][ODBC SQL Server driver[tcp/ip sockets] Connectionopen (Connect
()).
Connection failed:
SQL State 08001
SQL Server error 17
[Microsoft][ODBC SQL Server driver[tcp/ip sockets] SQL Server does not exist
or access denied.
There is no firewall in between the server and workstations (a fire wall
resides between the server and the internet with NAT enabled).
Login is set to use both windows and SQL authentication. We have tried it
as SQL only login with the same error message.
We have worked through Microsoft document 328306 "Potential causes of the
"SQL Server does not exist or access denied" error message"
Any ideas where our problem is?
Thank you,
Michael
Hi All,
We are facing exactly similar problem. Does anyone have any idea/thoughts as
to why this could be happening and what we can do to troubleshoot/solve this
problem.
Many Thanks,
Parag
"MABrown58" wrote:

> Error : SQL server does not exist or access denied.
> We are replacing the box the SQL server resides on and we have set up the
> new server as a copy of the old one. It is a Win2000server with DNS and
> active directory.
> SQL server ver 8.00.760
> We are able to:
> Attach to the new server from workstations including exploring and
> mapping the drives (actually our old server mappings worked)
> We can establish an ODBC connection to the SQL server from the new box
> and it tests fine so the server is started and running.
> We were able to get one workstation to access the SQL server after
> enabling name pipes but another still could not.
> We are able to connect to the old DNS server and SQL server from all
> workstations with no difficlties. Only one of the servers is connected at at
> ime.
> We can not set up an ODBC connection from any other workstation attached to
> the new server. This is the error message we receive:
> Connection failed:
> SQL State 01000
> SQL Server error: 10060
> [Microsoft][ODBC SQL Server driver[tcp/ip sockets] Connectionopen (Connect
> ()).
> Connection failed:
> SQL State 08001
> SQL Server error 17
> [Microsoft][ODBC SQL Server driver[tcp/ip sockets] SQL Server does not exist
> or access denied.
> There is no firewall in between the server and workstations (a fire wall
> resides between the server and the internet with NAT enabled).
> Login is set to use both windows and SQL authentication. We have tried it
> as SQL only login with the same error message.
> We have worked through Microsoft document 328306 "Potential causes of the
> "SQL Server does not exist or access denied" error message"
> Any ideas where our problem is?
> Thank you,
> Michael
|||Since you didn't provide any specifics (other than "exactly similar"), how
about:
http://support.microsoft.com/?kbid=328306
http://support.microsoft.com/?kbid=888228
http://www.aspfaq.com/
(Reverse address to reply.)
"Parag Gaikwad" <Parag Gaikwad@.discussions.microsoft.com> wrote in message
news:7F1BC52B-CF3E-4661-B50B-5DA4E460F666@.microsoft.com...
> Hi All,
> We are facing exactly similar problem. Does anyone have any idea/thoughts
as
> to why this could be happening and what we can do to troubleshoot/solve
this
> problem.
> Many Thanks,
> Parag

Error : SQL server does not exist or access denied.

Error : SQL server does not exist or access denied.
We are replacing the box the SQL server resides on and we have set up the
new server as a copy of the old one. It is a Win2000server with DNS and
active directory.
SQL server ver 8.00.760
We are able to:
Attach to the new server from workstations including exploring and
mapping the drives (actually our old server mappings worked)
We can establish an ODBC connection to the SQL server from the new box
and it tests fine so the server is started and running.
We were able to get one workstation to access the SQL server after
enabling name pipes but another still could not.
We are able to connect to the old DNS server and SQL server from all
workstations with no difficlties. Only one of the servers is connected at at
ime.
We can not set up an ODBC connection from any other workstation attached to
the new server. This is the error message we receive:
Connection failed:
SQL State 01000
SQL Server error: 10060
[Microsoft][ODBC SQL Server driver[tcp/ip sockets] Connectionopen (Connect
()).
Connection failed:
SQL State 08001
SQL Server error 17
[Microsoft][ODBC SQL Server driver[tcp/ip sockets] SQL Server does not exist
or access denied.
There is no firewall in between the server and workstations (a fire wall
resides between the server and the internet with NAT enabled).
Login is set to use both windows and SQL authentication. We have tried it
as SQL only login with the same error message.
We have worked through Microsoft document 328306 "Potential causes of the
"SQL Server does not exist or access denied" error message"
Any ideas where our problem is?
Thank you,
MichaelHi All,
We are facing exactly similar problem. Does anyone have any idea/thoughts as
to why this could be happening and what we can do to troubleshoot/solve this
problem.
Many Thanks,
Parag
"MABrown58" wrote:
> Error : SQL server does not exist or access denied.
> We are replacing the box the SQL server resides on and we have set up the
> new server as a copy of the old one. It is a Win2000server with DNS and
> active directory.
> SQL server ver 8.00.760
> We are able to:
> Attach to the new server from workstations including exploring and
> mapping the drives (actually our old server mappings worked)
> We can establish an ODBC connection to the SQL server from the new box
> and it tests fine so the server is started and running.
> We were able to get one workstation to access the SQL server after
> enabling name pipes but another still could not.
> We are able to connect to the old DNS server and SQL server from all
> workstations with no difficlties. Only one of the servers is connected at at
> ime.
> We can not set up an ODBC connection from any other workstation attached to
> the new server. This is the error message we receive:
> Connection failed:
> SQL State 01000
> SQL Server error: 10060
> [Microsoft][ODBC SQL Server driver[tcp/ip sockets] Connectionopen (Connect
> ()).
> Connection failed:
> SQL State 08001
> SQL Server error 17
> [Microsoft][ODBC SQL Server driver[tcp/ip sockets] SQL Server does not exist
> or access denied.
> There is no firewall in between the server and workstations (a fire wall
> resides between the server and the internet with NAT enabled).
> Login is set to use both windows and SQL authentication. We have tried it
> as SQL only login with the same error message.
> We have worked through Microsoft document 328306 "Potential causes of the
> "SQL Server does not exist or access denied" error message"
> Any ideas where our problem is?
> Thank you,
> Michael|||Since you didn't provide any specifics (other than "exactly similar"), how
about:
http://support.microsoft.com/?kbid=328306
http://support.microsoft.com/?kbid=888228
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Parag Gaikwad" <Parag Gaikwad@.discussions.microsoft.com> wrote in message
news:7F1BC52B-CF3E-4661-B50B-5DA4E460F666@.microsoft.com...
> Hi All,
> We are facing exactly similar problem. Does anyone have any idea/thoughts
as
> to why this could be happening and what we can do to troubleshoot/solve
this
> problem.
> Many Thanks,
> Parag

Sunday, February 26, 2012

Error (Data mining): A catalog is not set for this session

I downloaded a copy of sql server and when I run the following query in the sql management studio after choosing new query , DMX I get the above error

CREATE MINING MODEL [NBSample]

(

CustomerKey LONG KEY,

Gender TEXT DISCRETE,

[Number Cars Owned] LONG DISCRETE,

[Bike Buyer] LONG DISCRETE PREDICT

)

Using Microsoft_Naive_Bayes

Also in the pane Mining Model I get the message No mining models found. The only error I get when I installed SQL server was a COM plus registration error. I am running Windows XP SP2. Can someone please help.

Vijay Mukhi

HOD Helios

Apoligies from the bottom of my heart. I was reading the tutorial in the middle of the night and did not create a database. After creating a database the above query works like a charm. I am using sql server to create an expert system for detecting malware. I tried dozens of neural network , bayesain network , SVM , etc products and believe sql server is far ahead. Sorry once again for the post.

Vijay Mukhi

Helios

Error (1552) ODBC, Insert Execute Error

Hi, I have a program called dbms/copy that I use to conver clarion database tables. The program first creates the table, if already exists I delete and recreate. This part works fine. When it tries to insert the records I get the following error message:

Error (1552)

ODBC, Insert Execute Error -> Buffer Contained 100 Records but only 0 Records were written

I created a System DSN ODBC link to the SQL Server. I tried using the "sa" user, as well as creating a user and checking off all available permissions. It seems to be a permissions problem to me, although it appears I have permission to do everything. It is definately able to connect since it has no problem creating/deleting/recreating the table in the SQL Server database.

I tried doing the same import with an ODBC connection to a Microsoft Access database and it works without any problems.

Any idea what's giving me this error?I turned on ODBC tracing and the following errors showed up in the SQL.log file:

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 6 <SQL_ATTR_CURSOR_TYPE>
SQLPOINTER 0x00000001
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code -1 (SQL_ERROR)
SQLHSTMT 00E51F98
SQLINTEGER 6 <SQL_ATTR_CURSOR_TYPE>
SQLPOINTER 0x00000001
SQLINTEGER 0

DIAG [24000] [Microsoft][ODBC Driver Manager] Invalid cursor state (0)

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 7 <SQL_ATTR_CONCURRENCY>
SQLPOINTER 0x00000003
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code -1 (SQL_ERROR)
SQLHSTMT 00E51F98
SQLINTEGER 7 <SQL_ATTR_CONCURRENCY>
SQLPOINTER 0x00000003
SQLINTEGER 0

DIAG [24000] [Microsoft][ODBC Driver Manager] Invalid cursor state (0)

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 5 <SQL_ATTR_ROW_BIND_TYPE>
SQLPOINTER 0x00000000
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 00E51F98
SQLINTEGER 5 <SQL_ATTR_ROW_BIND_TYPE>
SQLPOINTER 0x00000000
SQLINTEGER 0

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 27 <SQL_ATTR_ROW_ARRAY_SIZE>
SQLPOINTER 0x00000064
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 00E51F98
SQLINTEGER 27 <SQL_ATTR_ROW_ARRAY_SIZE>
SQLPOINTER 0x00000064 (BADMEM)
SQLINTEGER 0

dbmswin7 f58-b90 ENTER SQLBulkOperations
SQLHSTMT 00E51F98
SQLSMALLINT 4

dbmswin7 f58-b90 EXIT SQLBulkOperations with return code -1 (SQL_ERROR)
SQLHSTMT 00E51F98
SQLSMALLINT 4

DIAG [S1092] [Microsoft][ODBC SQL Server Driver]Invalid attribute/option identifier (0)

dbmswin7 f58-b90 ENTER SQLRowCount
HSTMT 00E51F98
SQLLEN * 0x0012F7F4

dbmswin7 f58-b90 EXIT SQLRowCount with return code 0 (SQL_SUCCESS)
HSTMT 00E51F98
SQLLEN * 0x0012F7F4 (0)

dbmswin7 f58-b90 ENTER SQLDisconnect
HDBC 00E515E8

dbmswin7 f58-b90 EXIT SQLDisconnect with return code 0 (SQL_SUCCESS)
HDBC 00E515E8

Originally posted by UltraSmooth
Hi, I have a program called dbms/copy that I use to conver clarion database tables. The program first creates the table, if already exists I delete and recreate. This part works fine. When it tries to insert the records I get the following error message:

Error (1552)

ODBC, Insert Execute Error -> Buffer Contained 100 Records but only 0 Records were written

I created a System DSN ODBC link to the SQL Server. I tried using the "sa" user, as well as creating a user and checking off all available permissions. It seems to be a permissions problem to me, although it appears I have permission to do everything. It is definately able to connect since it has no problem creating/deleting/recreating the table in the SQL Server database.

I tried doing the same import with an ODBC connection to a Microsoft Access database and it works without any problems.

Any idea what's giving me this error?

Friday, February 24, 2012

Error ! SQL XML Bulkload Please help

Hi guys
I am running COM component from SQL server jobs.
The COM component uses SQLXML bulk object to copy the data to SQL server.
I do get following error. The error comes some times only some. It is not consistant
can anyone tell me why it is happening some times only and how to resolve it
thanks in advance
error :-
Executed as user: myserver\Administrator. Error Code: 0 Error Source= Microsoft XML Bulkload for SQL Server Error Description: The error log file could not be created. Make sure you have the appropriate permissions and that the ErrorLogFilePath is valid
. Error on Line 1. The step failed.
Did you check the obvious permission and size issues for the log file
location?
Thanks
Michael
"Nitin" <Nitin@.discussions.microsoft.com> wrote in message
news:D780E0E2-3FA2-4F6B-BFFD-987E528682C8@.microsoft.com...
> Hi guys
> I am running COM component from SQL server jobs.
> The COM component uses SQLXML bulk object to copy the data to SQL server.
> I do get following error. The error comes some times only some. It is not
> consistant
> can anyone tell me why it is happening some times only and how to resolve
> it
> thanks in advance
> error :-
> Executed as user: myserver\Administrator. Error Code: 0 Error Source=
> Microsoft XML Bulkload for SQL Server Error Description: The error log
> file could not be created. Make sure you have the appropriate permissions
> and that the ErrorLogFilePath is valid. Error on Line 1. The step
> failed.
|||Yes
I did check the permission and size thats not the problem
funny thing is that if i run the job explicitly it does runs properly but if i schedule it to run automatically it gives me this error
thanks
Nitin
"Michael Rys [MSFT]" wrote:

> Did you check the obvious permission and size issues for the log file
> location?
> Thanks
> Michael
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:D780E0E2-3FA2-4F6B-BFFD-987E528682C8@.microsoft.com...
>
>
|||This sounds like you run the scheduled job with less permissions than when
you do. Is the scheduled job running as a different user?
Michael
"Nitin" <Nitin@.discussions.microsoft.com> wrote in message
news:C6033E80-4C72-44D5-B59C-3B750EE27C23@.microsoft.com...[vbcol=seagreen]
> Yes
> I did check the permission and size thats not the problem
> funny thing is that if i run the job explicitly it does runs properly but
> if i schedule it to run automatically it gives me this error
> thanks
> Nitin
> "Michael Rys [MSFT]" wrote:
|||Hi Michael
The schedule job gets run by SQL server Agent and the SQL server agent is running under administrator user. The SQL server job is calling is COM+ (in which i am using SQLXML bulkupload) and it runs under seperate user which has also got the administrator
permission. I dont know this happens some times only.
thanks for your kind support
Nitin
"Michael Rys [MSFT]" wrote:

> This sounds like you run the scheduled job with less permissions than when
> you do. Is the scheduled job running as a different user?
> Michael
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:C6033E80-4C72-44D5-B59C-3B750EE27C23@.microsoft.com...
>
>
|||Hi Michael
The schedule job gets run by SQL server Agent and the SQL server agent is running under administrator user. The SQL server job is calling is COM+ (in which i am using SQLXML bulkupload) and it runs under seperate user which has also got the administrator
permission. I dont know this happens some times only.
thanks for your kind support
Nitin
"Michael Rys [MSFT]" wrote:

> This sounds like you run the scheduled job with less permissions than when
> you do. Is the scheduled job running as a different user?
> Michael
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:C6033E80-4C72-44D5-B59C-3B750EE27C23@.microsoft.com...
>
>
|||Hi Michael
The schedule job gets run by SQL server Agent and the SQL server agent is running under administrator user. The SQL server job is calling is COM+ (in which i am using SQLXML bulkupload) and it runs under seperate user which has also got the administrator
permission. I dont know this happens some times only.
thanks for your kind support
Nitin
"Michael Rys [MSFT]" wrote:

> This sounds like you run the scheduled job with less permissions than when
> you do. Is the scheduled job running as a different user?
> Michael
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:C6033E80-4C72-44D5-B59C-3B750EE27C23@.microsoft.com...
>
>
|||Hi Michael
The schedule job gets run by SQL server Agent and the SQL server agent is running under administrator user. The SQL server job is calling is COM+ (in which i am using SQLXML bulkupload) and it runs under seperate user which has also got the administrator
permission. I dont know this happens some times only.
thanks for your kind support
Nitin
"Michael Rys [MSFT]" wrote:

> This sounds like you run the scheduled job with less permissions than when
> you do. Is the scheduled job running as a different user?
> Michael
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:C6033E80-4C72-44D5-B59C-3B750EE27C23@.microsoft.com...
>
>
|||Are you possibly running two jobs at once and one can not access the file
because the other still has it open?
Irwin
Irwin Dolobowsky
Program Manager - SqlXml
http://blogs.msdn.com/irwando
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nitin" <Nitin@.discussions.microsoft.com> wrote in message
news:75EB6BBE-9E47-4279-9D89-D2D5BC418B59@.microsoft.com...[vbcol=seagreen]
> Hi Michael
> The schedule job gets run by SQL server Agent and the SQL server agent is
> running under administrator user. The SQL server job is calling is COM+
> (in which i am using SQLXML bulkupload) and it runs under seperate user
> which has also got the administrator permission. I dont know this happens
> some times only.
> thanks for your kind support
> Nitin
>
> "Michael Rys [MSFT]" wrote:
|||Irwin
Possibly this could be the cause , I will keep different file name and try to run the jobs so that it wont use same file name
will let you know whats the outcome
thanks for your help
Nitin
"Irwin Dolobowsky [MS]" wrote:

> Are you possibly running two jobs at once and one can not access the file
> because the other still has it open?
> Irwin
> --
> Irwin Dolobowsky
> Program Manager - SqlXml
> http://blogs.msdn.com/irwando
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Nitin" <Nitin@.discussions.microsoft.com> wrote in message
> news:75EB6BBE-9E47-4279-9D89-D2D5BC418B59@.microsoft.com...
>
>

Sunday, February 19, 2012

Error - Building Replication

Hi,I am building the Transactional Replication.It thro's Error Like below.
The process could not bulk copy out of table
'[dbo].[syncobj_0x3435344541393145]'.
I/O error while writing BCP data-file
Category : ODBC
Source : ODBC SQL Server Driver
But I have Checked the Space in Both OLTP and Replication Server it has
enough space.
Is prob in ODBC Driver? pls guide me to rectify this Prob.
Regards
Sivaraman Latchapathi
Do a select * from syncobj_0x3435344541393145 to see if there aren't
physical problems with this table. Also do a sp_helptext
syncobj_0x3435344541393145 to see if this view can't benefit from indexes on
the base tables.
Now check the event log to see if you can't see disk error problems.
These errors tend to be transitory.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Shiv" <Shiv@.discussions.microsoft.com> wrote in message
news:5483C669-8B80-4A67-927A-EDDFDFCFC790@.microsoft.com...
> Hi,I am building the Transactional Replication.It thro's Error Like below.
> The process could not bulk copy out of table
> '[dbo].[syncobj_0x3435344541393145]'.
> I/O error while writing BCP data-file
> Category : ODBC
> Source : ODBC SQL Server Driver
> But I have Checked the Space in Both OLTP and Replication Server it has
> enough space.
> Is prob in ODBC Driver? pls guide me to rectify this Prob.
> Regards
> Sivaraman Latchapathi
>
|||Hi, As u said syncobj_0x3435344541393145 is View ... i can able to see the
record
in that view also i can able to query physical table which is related to
that view.
"Hilary Cotter" wrote:

> Do a select * from syncobj_0x3435344541393145 to see if there aren't
> physical problems with this table. Also do a sp_helptext
> syncobj_0x3435344541393145 to see if this view can't benefit from indexes on
> the base tables.
> Now check the event log to see if you can't see disk error problems.
> These errors tend to be transitory.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Shiv" <Shiv@.discussions.microsoft.com> wrote in message
> news:5483C669-8B80-4A67-927A-EDDFDFCFC790@.microsoft.com...
>
>
|||ok, now try to bcp out of this view into the file system to see if you can
do this successfully.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Shiv" <Shiv@.discussions.microsoft.com> wrote in message
news:FF248563-F4E8-4AD5-89FE-DD42EF330917@.microsoft.com...[vbcol=seagreen]
> Hi, As u said syncobj_0x3435344541393145 is View ... i can able to see the
> record
> in that view also i can able to query physical table which is related to
> that view.
> "Hilary Cotter" wrote:

Friday, February 17, 2012

Error

If someone could tell me how to solve the error:
The process could not bulk copy out of table
'[dbo].[syncobj_0x4530303342304638]'.
I/O error while writing BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: 0)
Thanks
This normally means a disk error or perhaps a disk full problem.
Cheers,
Paul Ibison, SQL Server MVP (www.replicationanswers.com)

Error

Hi. I have a SQL backend and an Access data project front end. Each user has
a local copy of the front end on their computer. I have a function set up to
read data off a CD and import it to the system -- this function works on all
computers except one. On the problematic machine, I keep getting Error 8152
-
String or binary data would be truncated. Here's the line of code that
triggers the error:
DoCmd.RunSQL "UPDATE [Table1] SET [Pub Date] = SUBSTRING([Pub Date], 1, 2) +
'/01/' + SUBSTRING([Pub Date], 3, 4)"
What is happening here is that a number of date fields come into the system
in mm/yyyy format. This causes some problems, so I loaded them into a temp
table as a string, and am inserting 01 for the day in the middle. Once that'
s
complete I'll cast it into a datetime and append the records to the live
data. As I said, this all works for every computer but one. The machine in
question has all the correct Access references, and the user is a member of
the correct group and has all the privileges he needs. Is anyone familiar
with this error? Why would it trigger for one user and not the others?mike wrote:
> Hi. I have a SQL backend and an Access data project front end. Each
> user has a local copy of the front end on their computer. I have a
> function set up to read data off a CD and import it to the system --
> this function works on all computers except one. On the problematic
> machine, I keep getting Error 8152 - String or binary data would be
> truncated. Here's the line of code that triggers the error:
> DoCmd.RunSQL "UPDATE [Table1] SET [Pub Date] = SUBSTRING([Pub Date],
> 1, 2) + '/01/' + SUBSTRING([Pub Date], 3, 4)"
> What is happening here is that a number of date fields come into the
> system in mm/yyyy format. This causes some problems, so I loaded them
> into a temp table as a string, and am inserting 01 for the day in the
> middle. Once that's complete I'll cast it into a datetime and append
> the records to the live data. As I said, this all works for every
> computer but one. The machine in question has all the correct Access
> references, and the user is a member of the correct group and has all
> the privileges he needs. Is anyone familiar with this error? Why
> would it trigger for one user and not the others?
The date format you are using is not a portable format. For a date-only
value, you should use:
YYYYMMDD
David Gugick
Imceda Software
www.imceda.com|||David: Thanks for your response, but the data I'm trying to manipulate is of
type varchar. I handle the date conversion later. Also, the code works just
fine on all the computers except one.
I did some more investigating and discovered that when I try to load data
using the problem computer, the system creates and saves copies of the temp
tables I use for data import and manipulation. All other users re-use the
previously defined tables. The new user-specific temp tables default to data
type nvarchar, rather than varchar. When I switched the appropriate fields
from nvarchar to varchar the code worked fine. Go figure.
"David Gugick" wrote:

> mike wrote:
> The date format you are using is not a portable format. For a date-only
> value, you should use:
> YYYYMMDD
> --
> David Gugick
> Imceda Software
> www.imceda.com
>