Thursday, March 29, 2012
error 18456 when running job
Ive got a job that creates a folder both on the local box
and on the remote box. This job has run every nite
successfully for a few weeks now. Last nite it failed with
message: Login failed for user 'NT AUTHORITY\ANONYMOUS
LOGON'. [SQLSTATE 28000] (Error 18456). The step failed.
I havent changed anything security or services related.
The sql services for both boxes run in the same domain
admin account.
Any ideas?
Thanks, Chris.Try making the job owner sa. I've seen this and it ideespeared when I did that.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"chris" <chrisr@.fingps.com> wrote in message news:034901c36693$a4ce8750$a501280a@.phx.gbl...
> sql2k sp3
> Ive got a job that creates a folder both on the local box
> and on the remote box. This job has run every nite
> successfully for a few weeks now. Last nite it failed with
> message: Login failed for user 'NT AUTHORITY\ANONYMOUS
> LOGON'. [SQLSTATE 28000] (Error 18456). The step failed.
> I havent changed anything security or services related.
> The sql services for both boxes run in the same domain
> admin account.
> Any ideas?
> Thanks, Chris.
Thursday, March 22, 2012
error 15247 while creating subscription
I have a local and a remote sql server that connect to remote via dial-up
connection.
In local server, I'm member of sysadmin server role but in remote server
just member of dbowner database role.
I create my publication on the local but when I want to create pull
subscription
at the subscriber(remote server) I get this error:User does not have
permission to perform this action(error 15247).
When I try to create push subscription from local server, the error is
something like: Cannot initialize the
subscription.
Any help would be greatly appreciated.
Thanks in advance.
Amin
Amin,
please check that your remote server's agent in the PAL on the publisher.
Also, that the subscriber been added to the list of potential subscribers
(sp_addsubscriber).
HTH,
Paul Ibison
|||Paul,
My local server is both publisher and distributor. All agents are running
locally. sa login is in PAL of my publication. Would you please write me
more detail.
Thanks,
Amin
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uTbm#x7VEHA.584@.TK2MSFTNGP09.phx.gbl...
> Amin,
> please check that your remote server's agent in the PAL on the publisher.
> Also, that the subscriber been added to the list of potential subscribers
> (sp_addsubscriber).
> HTH,
> Paul Ibison
>
|||Amin,
when replicating between non-trusted domains, several configuration changes
are necessary compared to the normal setup. Please have a look at this
article, which explains them: http://support.microsoft.com/?id=321822.
You'll need to set up an alias, consider pass-through security or SQL
security and the account used on subscriber must be in the PAL on the
publisher. Also you might need to edit the HOSTS file to resolve the IP
address. To test at various stages, try to use Query Analyser on the
subscriber to connect to the publisher using the subscriber agent's login.
HTH,
Paul Ibison
Error 15185: There is no remote user 'sa' mapped to local user '(null)' from the remote serv
I am trying to add a linked server from a AMD x64 server (Windows 2003) with SQL Server 2005 64 bit to a Server running SQL 2000. These are not in the same domain.
I can create a linked server using the option "Be made using the login's current security context" but can not when trying to specify the security context, i.e. sa and the sa password. When I try I get the following message:
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sa' mapped to local user '(null)' from the remote server 'DTS_FSERVER'.
I have several other x64 server that I have no problem creating a linked server and specifying sa and the sa password.
The problem with using "the login's current security context" option is that I get an error when trying to run any Jobs against the linked server. The job fails withe the following error:
Executed as user: NT AUTHORITY\SYSTEM. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416). The step failed.
I'm sure the two errors are related. Any ideas what is going on?
What is your context on the server when you get the first error message? How do your sp_addlinkedserver and sp_addlinkedsrvlogin commands look like?
For the second error message, the jobs probably execute with the SQL Agent service account credentials, which is LocalSystem and is unmapped. You should check the SQL Server Tools General forum for more information about SQL Agent.
Thanks
Laurentiu
i have both servers in the same domain however when i try to link it show the above mentioned error. when i try to link from ne other server i m able to do but not from the clustered one.
please reply asap.
|||
Iam trying to create a linked server(which is 32 bit SQL Server 2000) on 64 bit SLQ Server 2005 and iam receiving the following error.
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'user1' mapped to local user '(null)' from the remote server 'SERVER1'.
Kerry- were you able to fix the error that you received. Anyone who are aware of this, please help me.
Thanks
|||Sorry, no we were never able to completely solve this. We have created linked servers using windows integrated security and as long as the user exists on both machines it does allow some limited access.sqlError 15185: There is no remote user 'sa' mapped to local user '(null)' from the remote serv
I am trying to add a linked server from a AMD x64 server (Windows 2003) with SQL Server 2005 64 bit to a Server running SQL 2000. These are not in the same domain.
I can create a linked server using the option "Be made using the login's current security context" but can not when trying to specify the security context, i.e. sa and the sa password. When I try I get the following message:
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sa' mapped to local user '(null)' from the remote server 'DTS_FSERVER'.
I have several other x64 server that I have no problem creating a linked server and specifying sa and the sa password.
The problem with using "the login's current security context" option is that I get an error when trying to run any Jobs against the linked server. The job fails withe the following error:
Executed as user: NT AUTHORITY\SYSTEM. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416). The step failed.
I'm sure the two errors are related. Any ideas what is going on?
What is your context on the server when you get the first error message? How do your sp_addlinkedserver and sp_addlinkedsrvlogin commands look like?
For the second error message, the jobs probably execute with the SQL Agent service account credentials, which is LocalSystem and is unmapped. You should check the SQL Server Tools General forum for more information about SQL Agent.
Thanks
Laurentiu
i have both servers in the same domain however when i try to link it show the above mentioned error. when i try to link from ne other server i m able to do but not from the clustered one.
please reply asap.|||
Iam trying to create a linked server(which is 32 bit SQL Server 2000) on 64 bit SLQ Server 2005 and iam receiving the following error.
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'user1' mapped to local user '(null)' from the remote server 'SERVER1'.
Kerry- were you able to fix the error that you received. Anyone who are aware of this, please help me.
Thanks
|||Sorry, no we were never able to completely solve this. We have created linked servers using windows integrated security and as long as the user exists on both machines it does allow some limited access.Error 15185: There is no remote user 'sa' mapped to local user '(null)' from the remote
I am trying to add a linked server from a AMD x64 server (Windows 2003) with SQL Server 2005 64 bit to a Server running SQL 2000. These are not in the same domain.
I can create a linked server using the option "Be made using the login's current security context" but can not when trying to specify the security context, i.e. sa and the sa password. When I try I get the following message:
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sa' mapped to local user '(null)' from the remote server 'DTS_FSERVER'.
I have several other x64 server that I have no problem creating a linked server and specifying sa and the sa password.
The problem with using "the login's current security context" option is that I get an error when trying to run any Jobs against the linked server. The job fails withe the following error:
Executed as user: NT AUTHORITY\SYSTEM. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416). The step failed.
I'm sure the two errors are related. Any ideas what is going on?
What is your context on the server when you get the first error message? How do your sp_addlinkedserver and sp_addlinkedsrvlogin commands look like?
For the second error message, the jobs probably execute with the SQL Agent service account credentials, which is LocalSystem and is unmapped. You should check the SQL Server Tools General forum for more information about SQL Agent.
Thanks
Laurentiu
i have both servers in the same domain however when i try to link it show the above mentioned error. when i try to link from ne other server i m able to do but not from the clustered one.
please reply asap.|||
Iam trying to create a linked server(which is 32 bit SQL Server 2000) on 64 bit SLQ Server 2005 and iam receiving the following error.
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'user1' mapped to local user '(null)' from the remote server 'SERVER1'.
Kerry- were you able to fix the error that you received. Anyone who are aware of this, please help me.
Thanks
|||Sorry, no we were never able to completely solve this. We have created linked servers using windows integrated security and as long as the user exists on both machines it does allow some limited access.Error 15185: There is no remote user 'sa' mapped to local user '(null)' from the remote
I am trying to add a linked server from a AMD x64 server (Windows 2003) with SQL Server 2005 64 bit to a Server running SQL 2000. These are not in the same domain.
I can create a linked server using the option "Be made using the login's current security context" but can not when trying to specify the security context, i.e. sa and the sa password. When I try I get the following message:
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sa' mapped to local user '(null)' from the remote server 'DTS_FSERVER'.
I have several other x64 server that I have no problem creating a linked server and specifying sa and the sa password.
The problem with using "the login's current security context" option is that I get an error when trying to run any Jobs against the linked server. The job fails withe the following error:
Executed as user: NT AUTHORITY\SYSTEM. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416). The step failed.
I'm sure the two errors are related. Any ideas what is going on?
What is your context on the server when you get the first error message? How do your sp_addlinkedserver and sp_addlinkedsrvlogin commands look like?
For the second error message, the jobs probably execute with the SQL Agent service account credentials, which is LocalSystem and is unmapped. You should check the SQL Server Tools General forum for more information about SQL Agent.
Thanks
Laurentiu
i have both servers in the same domain however when i try to link it show the above mentioned error. when i try to link from ne other server i m able to do but not from the clustered one.
please reply asap.|||
Iam trying to create a linked server(which is 32 bit SQL Server 2000) on 64 bit SLQ Server 2005 and iam receiving the following error.
Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'user1' mapped to local user '(null)' from the remote server 'SERVER1'.
Kerry- were you able to fix the error that you received. Anyone who are aware of this, please help me.
Thanks
|||Sorry, no we were never able to completely solve this. We have created linked servers using windows integrated security and as long as the user exists on both machines it does allow some limited access.Sunday, March 11, 2012
error 1069: The service did not start due to logon problems
The local sql server that was working fine earlier does not start now. I have already created tables and accessed them using stored procedures.
I get an error 1069: The service did not start due to logon problems. I have only changed my domain password. I do not remember what authentication I chose for log on.
Any suggestions would be helpful.
Thanks
try this article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254
error 1069: The service did not start due to logon problems
The local sql server that was working fine earlier does not start now. I have already created tables and accessed them using stored procedures.
I get an error 1069: The service did not start due to logon problems. I have only changed my domain password. I do not remember what authentication I chose for log on.
Any suggestions would be helpful.
Thanks
try this article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254
error 1069
wanted to change it to run under my NT a/c. I went to
control panel, services and tried changing the account to
this account and gave my NT credentials. It wouldn't start
and I get logon failure error 1069.
Am I missing anything here?
thanks,
balaYou can change it in Enterprise manager (Properties of the Server).
What rights does the new account have on the domain? You need log on locally
rights.
Is it your personal account or an account specific for SQL Server only? It
is best to use a dedicated account as SQL will stop working if your password
expires.
Look at http://support.microsoft.com/defaul...kb;en-us;283811
(HOW TO: Change the SQL Server or SQL Server Agent Service Account Without
Using SQL Enterprise Manager in SQL Server 2000)
Regards
Mike Epprecht, Microsoft SQL Server MVP
Epprecht Consulting (PTY) LTD
Johannesburg, South Africa
Mobile: +27-82-552-0268
IM: mike@.NOSPAMepprecht.net
Specialist SQL Server Solutions and Consulting
"bala" <balal@.microsoft.com> wrote in message
news:00ff01c3d613$d8533400$a401280a@.phx.gbl...
quote:
> I have been running my SQL under Local System a/c. I
> wanted to change it to run under my NT a/c. I went to
> control panel, services and tried changing the account to
> this account and gave my NT credentials. It wouldn't start
> and I get logon failure error 1069.
> Am I missing anything here?
> thanks,
> bala
Error 1068: Could not start the SQLServerAgent Service
I'm getting the following error message:
(
Could not start the SQLServerAgent Serviceon local computer
Error 1068 : The dependency service or group failed to
start
)
This server is a subscriber in a transactional replication
and it was working until yesterday.
Does anybody have a solution.
Thanks in advance.Mattew,
Hmmm. Probably means that something changed. Here is one KB article. Does
it apply?
http://support.microsoft.com/default.aspx?scid=kb;en-us;307288
A more general article (non-SQL Server) on the topic:
http://support.microsoft.com/default.aspx?scid=kb;en-us;827328
Russell Fields
"Mattew" <anonymous@.discussions.microsoft.com> wrote in message
news:19d5001c44d8c$610cb740$a401280a@.phx.gbl...
> Hi,
> I'm getting the following error message:
> (
> Could not start the SQLServerAgent Serviceon local computer
> Error 1068 : The dependency service or group failed to
> start
> )
> This server is a subscriber in a transactional replication
> and it was working until yesterday.
> Does anybody have a solution.
> Thanks in advance.|||Dear friends hi,
I read the articles you mentioned, and as I understood,
the resolution is:
(To resolve the problem, use these steps:
Change the startup account of both the MSSQLSERVER and
SQLServerAgent to use the Local System account.
Restart the computer. )
As I told you before, the problem is that I can not start
the 'SqlServer' and 'SqlServer agent', so I cann't go and
change the startup account. I don't know, I may be
confused, but I just encountered this Error (Error 1068)
while starting up the SQLServer.
Thanks for any suggestion in advance,
Mattew
>--Original Message--
>Mattew,
>Hmmm. Probably means that something changed. Here is
one KB article. Does
>it apply?
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;307288
>A more general article (non-SQL Server) on the topic:
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;827328
>Russell Fields
>"Mattew" <anonymous@.discussions.microsoft.com> wrote in
message
>news:19d5001c44d8c$610cb740$a401280a@.phx.gbl...
>> Hi,
>> I'm getting the following error message:
>> (
>> Could not start the SQLServerAgent Serviceon local
computer
>> Error 1068 : The dependency service or group failed to
>> start
>> )
>> This server is a subscriber in a transactional
replication
>> and it was working until yesterday.
>> Does anybody have a solution.
>> Thanks in advance.
>
>.
>|||If that turns out to be the problem, perhaps the following articles will
help.
Changing SQL Server Services Accounts After Install
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_
afterinstall_4p0z.asp
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht
_install_4yi1.asp
Russell Fields
"Mattew" <anonymous@.discussions.microsoft.com> wrote in message
news:1a20c01c44e3d$d0f168b0$a301280a@.phx.gbl...
> Dear friends hi,
> I read the articles you mentioned, and as I understood,
> the resolution is:
> (To resolve the problem, use these steps:
> Change the startup account of both the MSSQLSERVER and
> SQLServerAgent to use the Local System account.
> Restart the computer. )
> As I told you before, the problem is that I can not start
> the 'SqlServer' and 'SqlServer agent', so I cann't go and
> change the startup account. I don't know, I may be
> confused, but I just encountered this Error (Error 1068)
> while starting up the SQLServer.
> Thanks for any suggestion in advance,
> Mattew
> >--Original Message--
> >Mattew,
> >
> >Hmmm. Probably means that something changed. Here is
> one KB article. Does
> >it apply?
> >
> >http://support.microsoft.com/default.aspx?scid=kb;en-
> us;307288
> >
> >A more general article (non-SQL Server) on the topic:
> >http://support.microsoft.com/default.aspx?scid=kb;en-
> us;827328
> >
> >Russell Fields
> >"Mattew" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:19d5001c44d8c$610cb740$a401280a@.phx.gbl...
> >> Hi,
> >>
> >> I'm getting the following error message:
> >> (
> >> Could not start the SQLServerAgent Serviceon local
> computer
> >> Error 1068 : The dependency service or group failed to
> >> start
> >> )
> >> This server is a subscriber in a transactional
> replication
> >> and it was working until yesterday.
> >> Does anybody have a solution.
> >>
> >> Thanks in advance.
> >
> >
> >.
> >
Error 1068: Could not start the SQLServerAgent Service
I'm getting the following error message:
(
Could not start the SQLServerAgent Serviceon local computer
Error 1068 : The dependency service or group failed to
start
)
This server is a subscriber in a transactional replication
and it was working until yesterday.
Does anybody have a solution.
Thanks in advance.Mattew,
Hmmm. Probably means that something changed. Here is one KB article. Does
it apply?
http://support.microsoft.com/defaul...kb;en-us;307288
A more general article (non-SQL Server) on the topic:
http://support.microsoft.com/defaul...kb;en-us;827328
Russell Fields
"Mattew" <anonymous@.discussions.microsoft.com> wrote in message
news:19d5001c44d8c$610cb740$a401280a@.phx
.gbl...
> Hi,
> I'm getting the following error message:
> (
> Could not start the SQLServerAgent Serviceon local computer
> Error 1068 : The dependency service or group failed to
> start
> )
> This server is a subscriber in a transactional replication
> and it was working until yesterday.
> Does anybody have a solution.
> Thanks in advance.|||Dear friends hi,
I read the articles you mentioned, and as I understood,
the resolution is:
(To resolve the problem, use these steps:
Change the startup account of both the MSSQLSERVER and
SQLServerAgent to use the Local System account.
Restart the computer. )
As I told you before, the problem is that I can not start
the 'SqlServer' and 'SqlServer agent', so I cann't go and
change the startup account. I don't know, I may be
confused, but I just encountered this Error (Error 1068)
while starting up the SQLServer.
Thanks for any suggestion in advance,
Mattew
>--Original Message--
>Mattew,
>Hmmm. Probably means that something changed. Here is
one KB article. Does
>it apply?
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;307288
>A more general article (non-SQL Server) on the topic:
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;827328
>Russell Fields
>"Mattew" <anonymous@.discussions.microsoft.com> wrote in
message
> news:19d5001c44d8c$610cb740$a401280a@.phx
.gbl...
computer[vbcol=seagreen]
replication[vbcol=seagreen]
>
>.
>|||If that turns out to be the problem, perhaps the following articles will
help.
Changing SQL Server Services Accounts After Install
http://msdn.microsoft.com/library/d...-us/instsql/in_
afterinstall_4p0z.asp
and
http://msdn.microsoft.com/library/d...-us/howtosql/ht
_install_4yi1.asp
Russell Fields
"Mattew" <anonymous@.discussions.microsoft.com> wrote in message
news:1a20c01c44e3d$d0f168b0$a301280a@.phx
.gbl...[vbcol=seagreen]
> Dear friends hi,
> I read the articles you mentioned, and as I understood,
> the resolution is:
> (To resolve the problem, use these steps:
> Change the startup account of both the MSSQLSERVER and
> SQLServerAgent to use the Local System account.
> Restart the computer. )
> As I told you before, the problem is that I can not start
> the 'SqlServer' and 'SqlServer agent', so I cann't go and
> change the startup account. I don't know, I may be
> confused, but I just encountered this Error (Error 1068)
> while starting up the SQLServer.
> Thanks for any suggestion in advance,
> Mattew
>
> one KB article. Does
> us;307288
> us;827328
> message
> computer
> replication
Error 1068: Could not start the SQLServerAgent Service
I'm getting the following error message:
(
Could not start the SQLServerAgent Serviceon local computer
Error 1068 : The dependency service or group failed to
start
)
This server is a subscriber in a transactional replication
and it was working until yesterday.
Does anybody have a solution.
Thanks in advance.
Mattew,
Hmmm. Probably means that something changed. Here is one KB article. Does
it apply?
http://support.microsoft.com/default...b;en-us;307288
A more general article (non-SQL Server) on the topic:
http://support.microsoft.com/default...b;en-us;827328
Russell Fields
"Mattew" <anonymous@.discussions.microsoft.com> wrote in message
news:19d5001c44d8c$610cb740$a401280a@.phx.gbl...
> Hi,
> I'm getting the following error message:
> (
> Could not start the SQLServerAgent Serviceon local computer
> Error 1068 : The dependency service or group failed to
> start
> )
> This server is a subscriber in a transactional replication
> and it was working until yesterday.
> Does anybody have a solution.
> Thanks in advance.
|||Dear friends hi,
I read the articles you mentioned, and as I understood,
the resolution is:
(To resolve the problem, use these steps:
Change the startup account of both the MSSQLSERVER and
SQLServerAgent to use the Local System account.
Restart the computer. )
As I told you before, the problem is that I can not start
the 'SqlServer' and 'SqlServer agent', so I cann't go and
change the startup account. I don't know, I may be
confused, but I just encountered this Error (Error 1068)
while starting up the SQLServer.
Thanks for any suggestion in advance,
Mattew
>--Original Message--
>Mattew,
>Hmmm. Probably means that something changed. Here is
one KB article. Does
>it apply?
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;307288
>A more general article (non-SQL Server) on the topic:
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;827328
>Russell Fields
>"Mattew" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:19d5001c44d8c$610cb740$a401280a@.phx.gbl...
computer[vbcol=seagreen]
replication
>
>.
>
|||If that turns out to be the problem, perhaps the following articles will
help.
Changing SQL Server Services Accounts After Install
http://msdn.microsoft.com/library/de...us/instsql/in_
afterinstall_4p0z.asp
and
http://msdn.microsoft.com/library/de...us/howtosql/ht
_install_4yi1.asp
Russell Fields
"Mattew" <anonymous@.discussions.microsoft.com> wrote in message
news:1a20c01c44e3d$d0f168b0$a301280a@.phx.gbl...[vbcol=seagreen]
> Dear friends hi,
> I read the articles you mentioned, and as I understood,
> the resolution is:
> (To resolve the problem, use these steps:
> Change the startup account of both the MSSQLSERVER and
> SQLServerAgent to use the Local System account.
> Restart the computer. )
> As I told you before, the problem is that I can not start
> the 'SqlServer' and 'SqlServer agent', so I cann't go and
> change the startup account. I don't know, I may be
> confused, but I just encountered this Error (Error 1068)
> while starting up the SQLServer.
> Thanks for any suggestion in advance,
> Mattew
> one KB article. Does
> us;307288
> us;827328
> message
> computer
> replication
Friday, February 17, 2012
Error
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
>
Error
I am getting the following error
"An error occured during local report processing.Error during processing of 'Validate' report parameter "
Any idea about this error
Do u have any default values or available values for your 'Validate' parameter? If yes, can u give the details?
Shyam
|||Yes I have default values.That value depends on user selection.If the date difference is less than 15 days.Script will be raised(That I have written using custom code).
|||can u pls type the whole custom code you have written and then the expression you have used for the default value of the parameter?
Shyam
|||CUSTOM CODE:
Function CheckSignificantDate(i as integer) as Integer
Dim msg as String
msg = ""
If ( i = 15 ) Then
msg=" Date Diff should be more than 15 Days"
End If
If msg <> "" Then
MsgBox(msg, 16, "Report Validation")
Err.Raise(6,Report) 'Raise an overflow
End If
End Function
EXPRESSION:
=CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))
Here I am facing one more problem.In custom code if I take condition (i < 15), for each value script is raising.(i.e for every number.ex: 1,24,33,67..... )
|||
why is that extra comma at the end of your expression (marked in red below)
CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))
You are calling the code for all values, so better check the date differentce in the expression itself (using IIf function) and then call the code.
Shyam
|||Could please help me how to call that function using IIF condition.I can't able to do.
|||IIf(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value) < 15, CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value)), 0)
Shyam
|||But still I am getting the same problem.
|||Thanks Shyam I got the solution
|||Dates problem was solved.After generation of script I am getting the following error.
"An error occured during local report processing.Error during processing of 'Validate' report parameter "