Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Thursday, March 29, 2012

Error loading file to SQL Server 2005

I am trying to load a text file into SQL Server 2005 and I get the following
error messages at the validation stage:
Messages
?Error 0xc00470fe: Data Flow Task: The product level is insufficient for
component "Source - A00U3UNN_Y2006014_FAD_1_VDF" (1).
(SQL Server Import and Export Wizard)
?Error 0xc00470fe: Data Flow Task: The product level is insufficient for
component "Data Conversion 1" (31).
(SQL Server Import and Export Wizard)
Does anyone know what product level is insufficient?
Is the compatibility level of the database you are inserting into not at 90?
Are you using DTS or SSIS?
Andrew J. Kelly SQL MVP
"Robin" <Robin@.discussions.microsoft.com> wrote in message
news:E4E163EE-8A30-418B-8255-26A2EA155C1C@.microsoft.com...
>I am trying to load a text file into SQL Server 2005 and I get the
>following
> error messages at the validation stage:
> Messages
> . Error 0xc00470fe: Data Flow Task: The product level is insufficient for
> component "Source - A00U3UNN_Y2006014_FAD_1_VDF" (1).
> (SQL Server Import and Export Wizard)
> . Error 0xc00470fe: Data Flow Task: The product level is insufficient for
> component "Data Conversion 1" (31).
> (SQL Server Import and Export Wizard)
>
> Does anyone know what product level is insufficient?
>

Wednesday, March 21, 2012

Error In SQL Statement

Hi, I m Trying TO use A sql insert Query but it showing an error

i m trying to insert value in Filed Name PNR from Str.text and Coresspond Field Name PNR1 valuse is 1 less than from pnr.text and PNR1 is a Auto Number Field

my code for insert query is

Dim q1As OleDb.OleDbCommand =New OleDb.OleDbCommand("insert into res (PNR) values('" & Str.Text & "') where PNR1='" & pnr.Text - 1 & " ' ", con)

and Error is Shown by browser is as follows

Server Error in '/WebApplication1' Application.

Missing semicolon (;) at end of SQL statement.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.OleDb.OleDbException: Missing semicolon (;) at end of SQL statement.

Source Error:

Line 466: con.Open()Line 467: Dim q1 As OleDb.OleDbCommand = New OleDb.OleDbCommand("insert into res (PNR) values('" & Str.Text & "') where PNR1='" & pnr.Text - 1 & " ' ", con)Line 468: q1.ExecuteNonQuery()Line 469: con.Close()Line 470: End Sub


Source File:C:\Inetpub\wwwroot\WebApplication1\2.aspx.vb Line:468

Stack Trace:

[OleDbException (0x80040e14): Missing semicolon (;) at end of SQL statement.] System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112 System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +66 WebApplication1._2.Button2_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\WebApplication1\2.aspx.vb:468 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277



Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

I have to ask this, even though it seems so simple. Since the error says the query is missing a semi-colon at the end of the SQL statement, did you add a semi-colon and test it?

Jeff

|||

Is this SQL Server or Access?

In any case, your syntax is incorrect. Using a WHERE clause on an INSERT statement is invalid.

Also, use Parameters instead of concatenating UI-supplied text to SQL statements which will be executed.

|||

Try modify you q1 definition.

does you pnr contain number and you would like to subtract 1 from it?

you have to cast you pnr. to integer next subtract 1 and next convert result to string and insert it into query or do it this way:

Dim q1 As OleDb.OleDbCommand = New OleDb.OleDbCommand("insert into res (PNR) values('" & Str.Text & "') where PNR1=(" & pnr.Text & "-1) ",

Thanks

Monday, March 19, 2012

Error in SP using Dreamweaver

Hi,
I am calling a stored procedure from DreamWeaver, but I am getting an error,
perhaps someone can help (It has to do with the last field (text), if I use
nvarchar instead works fine.
SP:
CREATE procedure Addtemplatestocase
@.FirmId int ,@.CaseId int , @.SecLtr nvarchar(50), @.LtrName nvarchar(100),
@.LtrBody text
as
INSERT
INTO LetterMrgs (FirmId ,CaseId,SecLtr ,LtrName,LtrBody)
VALUES (@.FirmId ,@.CaseId, @.SecLtr , @.LtrName, @.LtrBody)
GO
Error:
Technical Information (for support personnel)
a.. Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
[Microsoft][ODBC SQL Server Driver]String data, right truncation
/BlueDotBeta2005/Intranet/Cases/Documents/AddtemplatesSP.asp, line 128
Any help is appreciated.
AleksI use Dreamweaver all the time and use the integrated environment. Are you
using DW to try to create an SP? or calling an update sp? I would not
recomend this.
for this question:you seem to be attempting to insert a value that is larger
than the field size.
thanks
kes
"Aleks" wrote:

> Hi,
> I am calling a stored procedure from DreamWeaver, but I am getting an erro
r,
> perhaps someone can help (It has to do with the last field (text), if I us
e
> nvarchar instead works fine.
> SP:
> CREATE procedure Addtemplatestocase
> @.FirmId int ,@.CaseId int , @.SecLtr nvarchar(50), @.LtrName nvarchar(100),
> @.LtrBody text
> as
> INSERT
> INTO LetterMrgs (FirmId ,CaseId,SecLtr ,LtrName,LtrBody)
> VALUES (@.FirmId ,@.CaseId, @.SecLtr , @.LtrName, @.LtrBody)
> GO
>
> --
> Error:
> Technical Information (for support personnel)
> a.. Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
> [Microsoft][ODBC SQL Server Driver]String data, right truncation
> /BlueDotBeta2005/Intranet/Cases/Documents/AddtemplatesSP.asp, line 128
> Any help is appreciated.
> Aleks
>
>|||I know.
The stored procedure is in the Database (MS SQL 2000) I am using DW to call
the SP and pass on the paramters.
I am copying from a text field to a text field, so this should not happen. I
don't know what I am doing wrong.
Aleks
"Kurt Schroeder" <KurtSchroeder@.discussions.microsoft.com> wrote in message
news:E24C59E3-5248-494B-A60D-F0F13B6EB148@.microsoft.com...
>I use Dreamweaver all the time and use the integrated environment. Are you
> using DW to try to create an SP? or calling an update sp? I would not
> recomend this.
> for this question:you seem to be attempting to insert a value that is
> larger
> than the field size.
> thanks
> kes
> "Aleks" wrote:
>|||ok, let's try and break it down.
1. can you do the same operation out side of dream weaver?
"Aleks" wrote:

> I know.
> The stored procedure is in the Database (MS SQL 2000) I am using DW to cal
l
> the SP and pass on the paramters.
> I am copying from a text field to a text field, so this should not happen.
I
> don't know what I am doing wrong.
> Aleks
>
> "Kurt Schroeder" <KurtSchroeder@.discussions.microsoft.com> wrote in messag
e
> news:E24C59E3-5248-494B-A60D-F0F13B6EB148@.microsoft.com...
>
>|||sorry this this posted back auto...
1. try it out of deamweaver
a. try it in wisql
b. create a cfm or asp.net quick template using the sqlname space
2. if they work it may have to do with the odbc driver. I've found that the
odbc namespace does not work as well as oledb or sqldb, but you don't have a
choice with DW. This is philosophy, but vs.net does work better with
asp.net.
I'm not a MS only person, i've used DW since it was HomeSite and still do
for all my CFM stuff and some asp.net where the code was not created in
vs.net, it works ok, but does not connect to sql as well.
thanks
kes
"Aleks" wrote:

> I know.
> The stored procedure is in the Database (MS SQL 2000) I am using DW to cal
l
> the SP and pass on the paramters.
> I am copying from a text field to a text field, so this should not happen.
I
> don't know what I am doing wrong.
> Aleks
>
> "Kurt Schroeder" <KurtSchroeder@.discussions.microsoft.com> wrote in messag
e
> news:E24C59E3-5248-494B-A60D-F0F13B6EB148@.microsoft.com...
>
>

Friday, February 17, 2012

Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#

Hi,
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
Thanks
Hi Rob
"Rob Dob" wrote:

> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't have
enough space available.
John

Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#

Hi,
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
ThanksHi Rob
"Rob Dob" wrote:
> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't have
enough space available.
John

Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#

Hi,
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
ThanksHi Rob
"Rob Dob" wrote:

> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100
k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't hav
e
enough space available.
John