I'm trying to add a record to a table and am getting Error 8152:
String or binary data would be truncated.
Here is my statement written with VBA in an Access project.
Both datatypes are nvarchar
Private Sub cmdCreateJob_Click()
Dim strJcn As String
Dim strParcTag As String
Dim strSql As String
strJcn = 999999
strParcTag = Me.cboEquipID.Column(0)
strSql = "INSERT INTO ESR (ESR_JCN,ESR_PARCTAG)" _
& " VALUES ('strJcn','strParcTag')"
DoCmd.RunSQL strSql
End Sub
Can anyone see what I'm doing wrong? Thanks.Can you post your DDL for table ESR?
Perayu
"AkAlan" <AkAlan@.discussions.microsoft.com> wrote in message
news:E21FB5F9-31A7-4FA4-89AD-49F37A3CA0E7@.microsoft.com...
> I'm trying to add a record to a table and am getting Error 8152:
> String or binary data would be truncated.
> Here is my statement written with VBA in an Access project.
> Both datatypes are nvarchar
> Private Sub cmdCreateJob_Click()
> Dim strJcn As String
> Dim strParcTag As String
> Dim strSql As String
> strJcn = 999999
> strParcTag = Me.cboEquipID.Column(0)
> strSql = "INSERT INTO ESR (ESR_JCN,ESR_PARCTAG)" _
> & " VALUES ('strJcn','strParcTag')"
> DoCmd.RunSQL strSql
> End Sub
> Can anyone see what I'm doing wrong? Thanks.
>
>
>|||Check the ESR_JCN column length and strJcn string length
and ESR_PARCTAG column length and strParcTag string length
The data length must be longer than column length
Thanks & Rate the Postings.
-Ravi-
"AkAlan" wrote:
> I'm trying to add a record to a table and am getting Error 8152:
> String or binary data would be truncated.
> Here is my statement written with VBA in an Access project.
> Both datatypes are nvarchar
> Private Sub cmdCreateJob_Click()
> Dim strJcn As String
> Dim strParcTag As String
> Dim strSql As String
> strJcn = 999999
> strParcTag = Me.cboEquipID.Column(0)
> strSql = "INSERT INTO ESR (ESR_JCN,ESR_PARCTAG)" _
> & " VALUES ('strJcn','strParcTag')"
> DoCmd.RunSQL strSql
> End Sub
> Can anyone see what I'm doing wrong? Thanks.
>
>
>|||It looks like this VB(?) code is wrong: " VALUES ('strJcn','strParcTag')".
You are inserting 'strJcn', not the value of strJcn, to ESR_JCN column. You
need to try something like " VALUES ('" + integerToString(strJcn) + "', '"
+ strParcTag+ "')". But I am not sure what the syntact is for concatinate
the single quots in VB.
Perayu
"AkAlan" <AkAlan@.discussions.microsoft.com> wrote in message
news:E21FB5F9-31A7-4FA4-89AD-49F37A3CA0E7@.microsoft.com...
> I'm trying to add a record to a table and am getting Error 8152:
> String or binary data would be truncated.
> Here is my statement written with VBA in an Access project.
> Both datatypes are nvarchar
> Private Sub cmdCreateJob_Click()
> Dim strJcn As String
> Dim strParcTag As String
> Dim strSql As String
> strJcn = 999999
> strParcTag = Me.cboEquipID.Column(0)
> strSql = "INSERT INTO ESR (ESR_JCN,ESR_PARCTAG)" _
> & " VALUES ('strJcn','strParcTag')"
> DoCmd.RunSQL strSql
> End Sub
> Can anyone see what I'm doing wrong? Thanks.
>
>
>|||Ok I got everything to work up until I add the datOpenDate field. It only
puts 12:00 AM in the record when I put 1 mar 06 in the form. Here is what I
have so far:
I have tried formatting the datefield but no go. Thanks,
strJcn = "'" & NextJCN() & "'"
strParcTag = "'" & Me.cboEquipID.Column(0) & "'"
strPerfWc = "'" & Me.cboPWC & "'"
strRptby = "'" & Me.cboReportedBy.Column(0) & "'"
strDisc = "'" & Me.txtDisc & "'"
datOpenDate = “’” & Me.txtOpenDate & “’”
strSQL = "INSERT INTO ESR
(ESR_JCN,ESR_PARCTAG,ESR_DISC,ESR_RPTBY,
ESR_OPEN_DATE)" _
& " VALUES (" & strJcn & "," & strParcTag & "," & strDisc & "" _
& "," & strRptby & ", " & datOpenDate & " )"
DoCmd.RunSQL strSQL
"Perayu" wrote:
> It looks like this VB(?) code is wrong: " VALUES ('strJcn','strParcTag')"
.
> You are inserting 'strJcn', not the value of strJcn, to ESR_JCN column. Yo
u
> need to try something like " VALUES ('" + integerToString(strJcn) + "', '
"
> + strParcTag+ "')". But I am not sure what the syntact is for concatinate
> the single quots in VB.
> Perayu
> "AkAlan" <AkAlan@.discussions.microsoft.com> wrote in message
> news:E21FB5F9-31A7-4FA4-89AD-49F37A3CA0E7@.microsoft.com...
>
>|||It looks like you have typo here: datOpenDate = "'" & Me.txtOpenDate & "'".
"'" should be "'".
Perayu
"AkAlan" <AkAlan@.discussions.microsoft.com> wrote in message
news:2ABA6908-E32F-4C09-9BC0-BCF089F15C0F@.microsoft.com...
> Ok I got everything to work up until I add the datOpenDate field. It only
> puts 12:00 AM in the record when I put 1 mar 06 in the form. Here is what
> I
> have so far:
> I have tried formatting the datefield but no go. Thanks,
> strJcn = "'" & NextJCN() & "'"
> strParcTag = "'" & Me.cboEquipID.Column(0) & "'"
> strPerfWc = "'" & Me.cboPWC & "'"
> strRptby = "'" & Me.cboReportedBy.Column(0) & "'"
> strDisc = "'" & Me.txtDisc & "'"
> datOpenDate = "'" & Me.txtOpenDate & "'"
> strSQL = "INSERT INTO ESR
> (ESR_JCN,ESR_PARCTAG,ESR_DISC,ESR_RPTBY,
ESR_OPEN_DATE)" _
> & " VALUES (" & strJcn & "," & strParcTag & "," & strDisc & "" _
> & "," & strRptby & ", " & datOpenDate & " )"
> DoCmd.RunSQL strSQL
>
> "Perayu" wrote:
>
Showing posts with label record. Show all posts
Showing posts with label record. Show all posts
Thursday, March 22, 2012
Monday, March 19, 2012
Error 7105, how to fix it?
Hi
I am getting error 7105 Severity: 22 on one of my tables (about 1000
record), It seems 2 of the records has been corrupted. I can select other
records and edit the records as long as these 2 records are not part of
select query.
I have read microsoft support and they say that service pack2 should solve
this problem but my server already has service pack 3.
I can not choose these records to delete it, what is the solution, any idea?> I am getting error 7105 Severity: 22 on one of my tables (about 1000
> record), It seems 2 of the records has been corrupted. I can select other
> records and edit the records as long as these 2 records are not part of
> select query.
> I have read microsoft support and they say that service pack2 should solve
> this problem but my server already has service pack 3.
> I can not choose these records to delete it, what is the solution, any
idea?
What does DBCC CHECKDB report?
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.
I am getting error 7105 Severity: 22 on one of my tables (about 1000
record), It seems 2 of the records has been corrupted. I can select other
records and edit the records as long as these 2 records are not part of
select query.
I have read microsoft support and they say that service pack2 should solve
this problem but my server already has service pack 3.
I can not choose these records to delete it, what is the solution, any idea?> I am getting error 7105 Severity: 22 on one of my tables (about 1000
> record), It seems 2 of the records has been corrupted. I can select other
> records and edit the records as long as these 2 records are not part of
> select query.
> I have read microsoft support and they say that service pack2 should solve
> this problem but my server already has service pack 3.
> I can not choose these records to delete it, what is the solution, any
idea?
What does DBCC CHECKDB report?
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.
Friday, March 9, 2012
Error 5149: Not enough disk space
Newbie question:
Importing a 25,000,000 record .csv file into SQL2000 fails
with a disk space error. I go into sql enterprise manager
to increase the size of the database and it will only let
me go to about 4000 MB. I need about 30GIG. At 5000 MB
enterprise manager says:
Error 5149: ModifyFile encountered operating system error
112 (There is not enough space on the disk while
attempting to expand physical file).
I have 50GIG free on that disk.
What am I doing wrong'"Ben Silvert" <anonymous@.discussions.microsoft.com> wrote in message
news:1be701c39fc7$d4faa450$3101280a@.phx.gbl...
> Newbie question:
> Importing a 25,000,000 record .csv file into SQL2000 fails
> with a disk space error. I go into sql enterprise manager
> to increase the size of the database and it will only let
> me go to about 4000 MB. I need about 30GIG. At 5000 MB
> enterprise manager says:
> Error 5149: ModifyFile encountered operating system error
> 112 (There is not enough space on the disk while
> attempting to expand physical file).
> I have 50GIG free on that disk.
> What am I doing wrong'
It's possible that you are either running out of transaction log space (on
either the target database) or on tempdb -- check that you have enabled
database file autogrow, or have size the database large enough to hold the
imported data (my preference).
If this fails, you may want to watch the server os page file (performance
monitor) in case the os is swapping out memory to disk...
Steve|||I'm getting this error when I go into properties of the
database, Data Files tab, Space Allocated (MB) column. I
try to change the entry from 4000 to 5000, and it gives me
the 5149 error. I'm not trying to import the data, yet.
When I tried before to import the data it failed with a
message the Primary File Group ran out of space. So I
deleted the database, made a new one, and tried to set the
data file size, to no avail.
The database is set to grow automatically, and it grows
unlimited.
>--Original Message--
>"Ben Silvert" <anonymous@.discussions.microsoft.com> wrote
in message
>news:1be701c39fc7$d4faa450$3101280a@.phx.gbl...
>> Newbie question:
>> Importing a 25,000,000 record .csv file into SQL2000
fails
>> with a disk space error. I go into sql enterprise
manager
>> to increase the size of the database and it will only
let
>> me go to about 4000 MB. I need about 30GIG. At 5000 MB
>> enterprise manager says:
>> Error 5149: ModifyFile encountered operating system
error
>> 112 (There is not enough space on the disk while
>> attempting to expand physical file).
>> I have 50GIG free on that disk.
>> What am I doing wrong'
>It's possible that you are either running out of
transaction log space (on
>either the target database) or on tempdb -- check that
you have enabled
>database file autogrow, or have size the database large
enough to hold the
>imported data (my preference).
>If this fails, you may want to watch the server os page
file (performance
>monitor) in case the os is swapping out memory to disk...
>Steve
>
>.
>|||Could it be the version of SQL? I have the personal
edition?
>--Original Message--
>Newbie question:
>Importing a 25,000,000 record .csv file into SQL2000
fails
>with a disk space error. I go into sql enterprise manager
>to increase the size of the database and it will only let
>me go to about 4000 MB. I need about 30GIG. At 5000 MB
>enterprise manager says:
>Error 5149: ModifyFile encountered operating system error
>112 (There is not enough space on the disk while
>attempting to expand physical file).
>I have 50GIG free on that disk.
>What am I doing wrong'
>.
>
Importing a 25,000,000 record .csv file into SQL2000 fails
with a disk space error. I go into sql enterprise manager
to increase the size of the database and it will only let
me go to about 4000 MB. I need about 30GIG. At 5000 MB
enterprise manager says:
Error 5149: ModifyFile encountered operating system error
112 (There is not enough space on the disk while
attempting to expand physical file).
I have 50GIG free on that disk.
What am I doing wrong'"Ben Silvert" <anonymous@.discussions.microsoft.com> wrote in message
news:1be701c39fc7$d4faa450$3101280a@.phx.gbl...
> Newbie question:
> Importing a 25,000,000 record .csv file into SQL2000 fails
> with a disk space error. I go into sql enterprise manager
> to increase the size of the database and it will only let
> me go to about 4000 MB. I need about 30GIG. At 5000 MB
> enterprise manager says:
> Error 5149: ModifyFile encountered operating system error
> 112 (There is not enough space on the disk while
> attempting to expand physical file).
> I have 50GIG free on that disk.
> What am I doing wrong'
It's possible that you are either running out of transaction log space (on
either the target database) or on tempdb -- check that you have enabled
database file autogrow, or have size the database large enough to hold the
imported data (my preference).
If this fails, you may want to watch the server os page file (performance
monitor) in case the os is swapping out memory to disk...
Steve|||I'm getting this error when I go into properties of the
database, Data Files tab, Space Allocated (MB) column. I
try to change the entry from 4000 to 5000, and it gives me
the 5149 error. I'm not trying to import the data, yet.
When I tried before to import the data it failed with a
message the Primary File Group ran out of space. So I
deleted the database, made a new one, and tried to set the
data file size, to no avail.
The database is set to grow automatically, and it grows
unlimited.
>--Original Message--
>"Ben Silvert" <anonymous@.discussions.microsoft.com> wrote
in message
>news:1be701c39fc7$d4faa450$3101280a@.phx.gbl...
>> Newbie question:
>> Importing a 25,000,000 record .csv file into SQL2000
fails
>> with a disk space error. I go into sql enterprise
manager
>> to increase the size of the database and it will only
let
>> me go to about 4000 MB. I need about 30GIG. At 5000 MB
>> enterprise manager says:
>> Error 5149: ModifyFile encountered operating system
error
>> 112 (There is not enough space on the disk while
>> attempting to expand physical file).
>> I have 50GIG free on that disk.
>> What am I doing wrong'
>It's possible that you are either running out of
transaction log space (on
>either the target database) or on tempdb -- check that
you have enabled
>database file autogrow, or have size the database large
enough to hold the
>imported data (my preference).
>If this fails, you may want to watch the server os page
file (performance
>monitor) in case the os is swapping out memory to disk...
>Steve
>
>.
>|||Could it be the version of SQL? I have the personal
edition?
>--Original Message--
>Newbie question:
>Importing a 25,000,000 record .csv file into SQL2000
fails
>with a disk space error. I go into sql enterprise manager
>to increase the size of the database and it will only let
>me go to about 4000 MB. I need about 30GIG. At 5000 MB
>enterprise manager says:
>Error 5149: ModifyFile encountered operating system error
>112 (There is not enough space on the disk while
>attempting to expand physical file).
>I have 50GIG free on that disk.
>What am I doing wrong'
>.
>
Friday, February 24, 2012
Error 2812 Could not Find Store Procedure dbo.MSmerge_expand_sp_A2F.......
Hi i am running SQL 2005 and i have a merge replication.
Sudently when i am trying to insert a new record on a table i am
getting this Error.
Error 2812 Could not Find Store Procedure
dbo.MSmerge_expand_sp_A2F......
Can anyone help please
Thanks
Savvas Christodoulou
Sounds like this proc is missing. Can you locate it on other subscribers? If
so copy it here.
Normally when you get errors like this your replication metadata is
inconsistent and it is best solved by regenerating and redistributing the
snapshot.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<savvaschr@.nodalsoft.com.cy> wrote in message
news:1163094573.683827.298500@.m73g2000cwd.googlegr oups.com...
> Hi i am running SQL 2005 and i have a merge replication.
> Sudently when i am trying to insert a new record on a table i am
> getting this Error.
> Error 2812 Could not Find Store Procedure
> dbo.MSmerge_expand_sp_A2F......
> Can anyone help please
> Thanks
> Savvas Christodoulou
>
Sudently when i am trying to insert a new record on a table i am
getting this Error.
Error 2812 Could not Find Store Procedure
dbo.MSmerge_expand_sp_A2F......
Can anyone help please
Thanks
Savvas Christodoulou
Sounds like this proc is missing. Can you locate it on other subscribers? If
so copy it here.
Normally when you get errors like this your replication metadata is
inconsistent and it is best solved by regenerating and redistributing the
snapshot.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<savvaschr@.nodalsoft.com.cy> wrote in message
news:1163094573.683827.298500@.m73g2000cwd.googlegr oups.com...
> Hi i am running SQL 2005 and i have a merge replication.
> Sudently when i am trying to insert a new record on a table i am
> getting this Error.
> Error 2812 Could not Find Store Procedure
> dbo.MSmerge_expand_sp_A2F......
> Can anyone help please
> Thanks
> Savvas Christodoulou
>
Subscribe to:
Posts (Atom)