Code Page Problem With IBM ISeries Source

Nov 19, 2007

Hello,
I'm not up to speed on the IBM database and provider technologies, and I have an issue that I'm not clear on. I am using the .Net ODBC Data Provider in a connection mananger. The DSN uses the iSeries Access ODBC Driver. I have iSeries Access for Windows version 5 release 4 installed on laptop where I have built the package.

I have a sql command configured in a DataReader source that uses the connection manager. Between the source and sql server table destination, I have a Derived Column transform that converts the columns from Unicode to non unicode data.

When I run the package, I get an error that states that the package failed because a particular column, 'ADDR1' is set to fail if truncation occurs. I set up error output to a text file so that I could look at the failing row(s). The text file had to be set up using UTF-8 before it would accept data. The ADDR1 column at the destination will accept 30 characters. The data in the ADDR1 column of the failing row is 19 characters long, but I think there is a carriage return character present. I have tried TRIM in the exression for the column, but no luck. I have tried code pages 65001, and 37 in the Derived Column transform, but that has not worked. I remembered to set up DefaultCodePage and AlwaysUseDefaultCodePage for the OLE DB destination for each code page change.

Am I not using the correct code page, or do I need to do something else to clean up the data?

Thank you for your help!

cdun2

View 9 Replies


ADVERTISEMENT

Configuring The Code Page Of A OLEDB Source.

Jun 25, 2007

hi,

i have a number of interfaces in which i have used oledb source.

the problem i am facing is oledb source components code page is not configurable now if i want to deploy the interface in a different environment which has a database with a different collation it gives a error that oledb source needs new metadata.

has anybody faced this problem earlier.please give me a solution to this problem ..

thanks in advance.

srikanth

View 1 Replies View Related

ODBC Connection With Stored Procedure On ISeries As Data Source

Mar 6, 2006

I have created a stored procedure on the iSeries that creates a cursor and opens it.  I am trying to write my report to use the stored procedure. I cannot get the data source to work.  How do I create my data source so that it uses the stored procedure?  My SP has three parameters I am trying to pass from the report.  The parms are created in the layout.

Thank you

View 6 Replies View Related

Code Page

Dec 6, 2006

Hello,

I am getting following error

Error: 0xC02020F4 at Data Flow Task, OLE DB Source [1]: The column "dbname" cannot be processed because more than one code page (936 and 1252) are specified for it.

Error: 0xC02020F4 at Data Flow Task, OLE DB Source [1]: The column "dbsize" cannot be processed because more than one code page (936 and 1252) are specified for it.

Error: 0xC02020F4 at Data Flow Task, OLE DB Source [1]: The column "Owner" cannot be processed because more than one code page (936 and 1252) are specified for it.

Error: 0xC02020F4 at Data Flow Task, OLE DB Source [1]: The column "Status" cannot be processed because more than one code page (936 and 1252) are specified for it.

Error: 0xC02020F4 at Data Flow Task, OLE DB Source [1]: The column "CompLevel" cannot be processed because more than one code page (936 and 1252) are specified for it.



When I run the package itself it is working fine and when I am calling the package from another package getting this error. From Parent package I sending servername for olde db source to this package.

Thanks.

View 24 Replies View Related

Amo And Creating Data Source And Data Source View Code

Feb 2, 2008

,
Hi
In this code how can I create a new data source and new data source view and model and structure that it run dynamic.
In this code I have a lot of errors, that they are about server and database don€™t have in current code,
In this code, first I should definition server or no?

Database dbNew = new Database (databaseName,
Utils.GetSyntacticallyValidID(databaseName, typeof(Database)));
srv.Databases.Add(dbNew);
dbNew.Update(true);
***********************************************************

How can I create data source and data source view and model and structure?
Please say code of that, and guide me.
databasename and srv is unknown.
Do I add other reference with analysis services?
Please explain about these codes:
************************************************************************
1)
RelationalDataSource dsNew = new RelationalDataSource(
datasourceName,
Utils.GetSyntacticallyValidID(
datasourceName,
typeof(RelationalDataSource)));

db.DataSources.Add(dsNew);
dsNew.ConnectionString = connectionString;

dsNew.Update();
2)

RelationalDataSourceView rdsv;

rdsv = db.DataSourceViews.Add(
datasourceviewName,
Utils.GetSyntacticallyValidID(
datasourceviewName,
typeof(RelationalDataSourceView)));

rdsv.DataSourceID = ds.ID
***************************************************************
3)
OleDbConnection cn = new OleDbConnection(ds.ConnectionString);
OleDbCommand cmd = new OleDbCommand(
"SELECT * FROM [" + tableName + "] WHERE 0=1", cn);
OleDbDataAdapter ad = new OleDbDataAdapter(cmd);

DataSet dss = new DataSet();
ad.FillSchema(dss, SchemaType.Source);

*************************************************************
4)

// Make sure we have the name we thought

dss.Tables[0].TableName = tableName;

// Clone here - the original DataTable already belongs to a DataSet
rdsv.Schema.Tables.Add(dss.Tables[tableName].Clone());
rdsv.Update();


5)

MiningStructure ms = db.MiningStructures.Add(miningstructureName, Utils.GetSyntacticallyValidID(miningstructureName,
typeof(MiningStructure)));
ms.Source = new DataSourceViewBinding(dsv.ID);
ms.CaseTableName = "Customer";

Add columns:
ScalarMiningStructureColumn smsc;

// From table "Customer" we will add a couple of columns
// CustomerID - key
smsc = new ScalarMiningStructureColumn("Customer ID",
Utils.GetSyntacticallyValidID("Customer ID", typeof(ScalarMiningStructureColumn)));
smsc.IsKey = true;
smsc.Content = "Key";
smsc.KeyColumns.Add("Customer", "customer_id", OleDbType.Integer);
ms.Columns.Add(smsc);

*******************************************
6)

MiningModel mm = ms.MiningModels.Add(miningmodelName,
Utils.GetSyntacticallyValidID(miningmodelName,
typeof(MiningModel)));


mm.Algorithm = "Microsoft_Decision_Trees";
mm.Parameters.Add("COMPLEXITY_PENALTY", 0.3);


MiningModelColumn mc = new MiningModelColumn("Customer ID",
Utils.GetSyntacticallyValidID("CustomerID",
typeof(MiningModelColumn)));
mc.SourceColumnID = ms.Columns["Customer ID"].ID;
mc.Usage = "Key";
mm.Columns.Add(mc);


mm.Update();

Please exactly say, whatever I want
Thanks a lot for your answer
Please don€™t move this question because I don€™t know where I should write this.

View 1 Replies View Related

SqlDataSource - Where To Put It ? On The Page - In The Code Behind ?

Nov 19, 2006

Hi,
I have the following Sql Data Source that I wish to bring back on my page:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FrogConnectionString %>"
SelectCommand="ProposalsCheckNewCustomerData" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:FormParameter FormField="MaritalStatusID" Name="MartialStatusID" Type="Int32" />
<asp:FormParameter FormField="LivingStatusID" Name="LivingStatusID" Type="Int32" />
<asp:FormParameter FormField="DealerID" Name="DealerID" Type="Int32" />
<asp:FormParameter FormField="VehicleTypeID" Name="VehicleTypeID" Type="Int32" />
<asp:FormParameter FormField="FinanceTypeID" Name="FinanceTypeID" Type="Int32" />
<asp:FormParameter FormField="MediaSourceID" Name="MediaSourceID" Type="Int32" />
<asp:FormParameter FormField="DealerContactID" Name="DealerContactID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
The recordset brings back 7 values that I wish to populate into 7 Labels.
1. Should the SqlDataSource be on the page (between the Head tags) or within the Page_Load command of the Page Behind ?- If its on the page behind do any of you have any sample code to show me how to get the recordset up and running ?
2. How would I bind the results to a label ?- Within my old asp pages it was simple (I'm not saying its not simple here, I am still getting my head around vb.net)- eg <%=rsX("MaritalStatus")%> I guess its something very similar
Thanks for any pointersFizzystutter
 

View 4 Replies View Related

Code Page Conversion...

May 6, 2008

I'm grabbing data from a DB2 database on an AS/400.

Everything seemed fine and dandy until I started on one particular very big table. It turns out that some of the text fields in this table have characters specific to French. i.e. the funny 'oe' character and something that looks like at shrunken '<' sign.

The error being generated is:



Code Snippet
Text was truncated or one or more characters had no match in the target code page



The Code page on the DB2 box is 285, the default code page on the target SQL Server box is 1252. I've tried forcing the use of the default code page (1252), but the same happens.

Anyone know what I'm doing wrong? Is there another Code page value I should try using?

View 3 Replies View Related

AS/400 With Arabic Code Page (420)

Aug 12, 2007

Hi yeah.

I am doing a project which retrieves data from a AS/400 machine.
The code page of the machine is 420.
I used "OLE DBIBM DB2 UDB for iSeries IBMDASQL OLE DB Provider" to connect from SQL Server.
The problem is, all the arabic characters coming from this machine becomes unreadable, becoming some machine code text.
What could be the problem and how can I solve this?

Thank you.

View 2 Replies View Related

TRUNCATION OR CODE PAGE

Jun 14, 2006

I have a very nasty error on ssis,

Text was truncated or one or more characters had no match in the target code page

This can not be truncation because the field is empty, the second thing is that when i read the file it reads 62000 odd rows but there are 64000 rows.

if i just read the entire file and write the entire file in a scipt i loose 13 rows

I have tried different code pages and non have worked.

Does anyone have an idea



View 3 Replies View Related

Getting Code Page Errors....

Feb 9, 2006

I am importing some data from my IBM DB2 Z/OS mainframe to SQL Server 2005 using the SSIS import wizard. The wizard automatically converted the DB2 string data before trying to store it to SQL Server. The code page that the wizard chose to do its conversion is the 1252 Ansi Latin. However, I am getting the following error on the address field...."one or more characters had no match in the target code page". Can someone suggest another code page? ASCII? IBM 37?

View 3 Replies View Related

Code Page Error

May 28, 2008

Can anyone tell me y is this error occuring?


[01989 Flat File Source [1781]] Error: Data conversion failed. The data conversion for column "StreetAddress1" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[01989 Flat File Source [1781]] Error: The "output column "StreetAddress1" (1822)" failed because truncation occurred, and the truncation row disposition on "output column "StreetAddress1" (1822)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

[01989 Flat File Source [1781]] Error: An error occurred while processing file "G:MembershipUpdatesLocalSubmissions1989TabDelimitedText1989_raw.txt" on data row 957.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "01989 Flat File Source" (1781) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADCANCELLED. Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.

Please help me to solve this

View 3 Replies View Related

How To Find Out The Character Set/code Page

Jul 21, 2000

Hi!
How one can find out the character set/code page set during SQLServer installation?
Thanks,
Fabio

View 1 Replies View Related

HEEEEELP....How Can I Change The Page Code?

Apr 8, 1999

I migrate from sql server 6.5 to sql server 7.0, and i'm having problems
with the information that returns me, when i was using 6.5 version
everythings was fine, but now that i'm using 7.0 version sql returns me
unknow characters instead of latin characters, somebody tells me that
i've installed different character set and code page in sql server 7
than Sql Server 6.5 , if this is right what can i do to repair this
mistake that i've made, ther is a way to change the code page and
character set in sql 7.0. Or maybe i have to look an sql driver
compatible, or this is a crazy idea?.

View 1 Replies View Related

Code Page Conversion Error

Feb 15, 2002

Hi
We have the problem with Text data type. We can insert into Text column from few work stations but not from few. This is the following error we are getting
COde page translations are not supported for the text data type. From:1252 To: 850.

If anybody has solutions advance thanks to them.

Thanks,
Rau

View 1 Replies View Related

Code Page Errors In SSIS

Nov 21, 2007



Hi All,
we have a set of packages which has to to be implemented across differnet environments.
the packages invariable uses OLEDB Source/Destination Components.
In these two components the Code Page Property is not Configurable.
so if the package has to be Deployed in a different environment than,where it is Developed it gives a Validation Error.
Is there a Workaround for this problem.
if anybody have faced the problem earlier,please post it.
thanks in advance.
cheers
srikanth

View 1 Replies View Related

Cannot Retrieve Code Page Info...

Nov 20, 2006

Hello again!

I got a problem using an OLE-DB Source in my data flow task. It is an Informix-Server using the newest OLE DB-Driver provided by IBM. However, when I set up the OLE DB-Source with connection manager and SQl-Query, I get the following warning message:

Warning at {2B334CA3-A792-4BC2-93AA-12FADCF1E696} [OLE DB Source [45]]: Cannot retrieve the column code page info from the OLE DB provider.  If the component supports the "DefaultCodePage" property, the code page from that property will be used.  Change the value of the property if the current string code page values are incorrect.  If the component does not support the property, the code page from the component's locale ID will be used.


Later when I try to execute the package, the destination adapter gets errors like

Error 3 Validation error. Data Flow Task: OLE DB Destination [2985]: Columns "antrag" and "Antrag" cannot convert between unicode and non-unicode string data types. Informix_OLEDB.dtsx 0 0 
 

I guess that SQL Server cannot get the data types from the Source.

Has anyone an idea? Thanks in advance!

View 11 Replies View Related

Setting Default Code Page

Nov 28, 2007

I've been reading some forums and I'm not able to get this to work. Basically I'm using an Oracle DB source and trying to import data into SQL server 2005. I guess the best connections to use are OLE DB.

Here are my current connections:
Source: Native OLE DBOracle Provide for OLE DB
Destination: Native OLE DBSQL Native Client

I'm running SP2 of SQL 2005.

Now, the issue is I'm not getting the code page stuff correct. In the data flow I'm just doing a OLE DB Source to SQl Server Destination. I'm not doing any transformations (I'm hoping to avoid doing that).

I'm getting an error:


[OLE DB Source [1]] Warning: Cannot retrieve the column code page info from the OLE DB provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used.


I'm looking at how to set the DefaultCodePage property in various forums, but nowhere does it say exactly how to do this. I've tried changing the "Extended Properties" and added AlwaysUseDefaultCodePage=TRUE in there, but that doesn't work. I've tried changing the Locale Identifier to 1252 that doesn't work. I've tried a combination of the two, doesn't work. Can somebody tell me two things:

1. what's the best/fastest/industry used method to get data from Oracle into SQL server via SSIS (please include the type of connections).
2. How the hell do you set the DefaultCodePage property. I would love a screenshot on this one as well.


Thanks,
Phil

View 3 Replies View Related

Code Page Conversion Shortcut?

Dec 16, 2005

Is there a simple way to avoid having to use a data conversion task to convert Unicode data (from DB2) to ANSI format (for insert to Oracle)?

I'm hoping that there is a way to set the code page property on the OLEDB driver so that it implicitly converts to the format I want instead of having to explicitly force the conversion in the package.

Thoughts? suggestions?

-Clayton

View 3 Replies View Related

Code Page Issues With Connecting To DB2

May 1, 2008

I'm using the IBM DB2 UDB for iSeries IBMDA400 OLE DB Provider to connect to an AS/400 db2 database

I'm trying to do a simple pull through of table data.

My connection string is :




Code Snippet
Provider=IBMDA400.DataSource.1;Data Source=WAS400;Persist Security Info=True;Password=**********;User ID=svcorbit;Initial Catalog=S652F01E;Force Translate=0;Catalog Library List=OSLD1F3, PAOS21, OSLPLF3





I'm getting a code page conflict when I try to import the data into SQL Server. This happens when I edit the OLE DB Source component:




Code Snippet
The component reported the following warnings:
Warning at {47FF55CB-AA24-45A4-B0DC-2807EC6D3EC1} [OLE DB Source [3570]]: Cannot retrieve the column code page info from the OLE DB provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used.




and at package validation level when trying to run:




Code SnippetError at Data Flow Task [OLE DB Destination [970]]: Column "ACRC10" cannot convert between unicode and non-unicode string data types.



I've tried using the default code page on the component, that doesn't work. I've tried changing the code page to 285 (which is what it is on the AS/400), that doesn't work.

I'm running out of ideas... help!

View 4 Replies View Related

How Do I Pass A Parameter To A Sqldatasource In A Code Behind Page

Feb 1, 2007

i have a sqldatasource on my asp.net page -- select * from table where id = @id
i want to set the @id in the backend and set the result to textbox1.text
how do i do this?

View 1 Replies View Related

How To Code ASP.NET Page With Return Value Store Procedure?

Apr 12, 2005

Does anyone know how to call a SQL store procedure that return a value to the page?
I've a simple data entry aspx page with several textboxes and a save button. When user fill out the form and click save/submit, it calls a store procedure to insert a row into a SQL table and automatically generate an ID that need to return the the page to display for the user.
Are there a similar article somewhere?
 
Thank you all!

View 6 Replies View Related

Changing Sort / Code Page When Upgrading

Jul 26, 2000

Any experience with upgrading from 6.5 to 7.0 and changing sort order / code page in the process? Does this cause problems or matter? We're trying to go with a standard and the servers I need to upgrade aren't at that code page standard.

Thanks..

View 2 Replies View Related

6.5 To 2000 Upgrade Code Page Issue

Jul 4, 2002

Hi

I am upgrading a SQL 6.5 database with code page 850 to SQL 2000 with code page 1252.

The problem we have is any german "u" ( with the umlatt - two dots ) above it wont transfer.

I am using the SQL upgrade tool that comes with sql 2000 and have tried many different code pages in 2000 but no joy.

Can anyone help?

Thanks

J.

View 3 Replies View Related

Host Variables And Code Page Conversion

Jul 20, 2005

Hello,Does anybody know what is the documented and known behavior ofinserting/updating binary columns using host variables from a client to aserver which have different code pages? Will any code page / character setconversion take place? I am particulary interested in insert/update fromsubqueries.eg:insert into t1(binarycol) select :HV1 from t2versusinsert into t1(binarycol) select :HV1||charcol from t2update t1 set bytecol=:HV1versusupdate t1 set bytecol=:HV1||'abc'insert into t1 (bytecol) values(:HV1)versusinsert into t1 (bytecol) values(:HV1||'abc')Is the conversion dependent on the context?ThanksAakash

View 1 Replies View Related

Source Code Required

Feb 18, 2004

A Source code required for create SQL Server Database,Tables,Procedures programatically

View 1 Replies View Related

Read SP Source Code From VB

Jul 20, 2005

Hi,I'm developing an application to crypt SQL databases and i need toread SP and Views source code from VB6, if you know how to do thisplease answer me.Greetings.

View 1 Replies View Related

How To Get Source Code Of A View ?

Apr 11, 2008



Hi,

I am trying to get source code of a view (SELECT part) into an TSQL variable, but I have no idea, where to find this source code and how to proceede the assignment ? Any idea ? thanks

View 8 Replies View Related

Choose Paper Source By PDF Page Size

Jul 31, 2007

Does anyone know how to get SQL Reporting Services, when it runs a report, to tell Adobe Acrobat to "Choose Paper Source by PDF page size", which is an option in the print dialog box?

When I, or a user, runs a report in Visual Studio or live:


The report is set to render on 8.5" x 14" paper (legal)

The report is exported to a PDF

The report opens in Adobe Acrobat

The report is formatted on the screen to fit 8.5" x 14" paper (legal)

When "Print" is selected, the Preview has it on 8.5" x 11" paper (letter)

If I select "Choose Paper Source by PDF page size", then it fits it to the 8.5" x 14" paper (legal)
How do I tell it to "Choose Paper Source by PDF page size"?

View 1 Replies View Related

It Gives Code Page Error On Creating Stored Procedure !!!!!

Jun 28, 2006

Hi
I was transferring objects of my existing database from remote to local and I recieved this error during the DTS process. It was on the transfer of the following stored procedure. I tried to create this SP manually but its giving me the same error and doesn't create it. I don't know how to fix it.
I wonder if somebody can help me! Thanks in Advance
[450] Code page translations are not supported for the text data type. From: 1252 To: 1256.
CREATE  PROCEDURE dbo.Novasoft_DL_UpdateDownloadsRating @RatingID int,  @DownloadID int,  @UserID int,  @Rating int, @Comment text, @ReviewDate datetime, @CommentName nvarchar(50) ASUPDATE dbo.Novasoft_DL_DownloadsRating SET [DownloadID] = @DownloadID, [UserID] = @UserID, [Rating] = @Rating, [Comment] = @Comment, [ReviewDate] = @ReviewDate, [CommentName] = @CommentNameWHERE [RatingID] = @RatingID
GO

View 1 Replies View Related

Capture Return Value From Stored Procedure, Use Same In Code Behind Page

Apr 18, 2007

My stored procedure works and codes is working except I need to capture the return value from the stored procedure and use that value in my code behind page to indicate that a duplicate record entry was attempted.  In my code behind file (VB) how would I capture the value "@myERROR" then display in the label I have that a duplicate entry was attempted.
Stored ProcedureCREATE PROCEDURE dbo.usp_InsertNew @IDNumber         nvarchar(25), @ID  nvarchar(50), @LName  varchar(50), @FName  varchar(50)
AS
 DECLARE @myERROR int    -- local @@ERROR      , @myRowCount int  --local @@rowcountBEGIN  -- See if a contact with the same name and zip code exists IF EXISTS (Select * FROM Info   WHERE ID = @ID)   BEGIN    RETURN 1END ELSEBEGIN TRAN    INSERT INTO Info(IDNumber, ID, LName,             FName) VALUES (@IDNumber, @ID, @LName,             @FName)             SELECT @myERROR = @@ERROR, @myRowCount = @@ROWCOUNT If @myERROR !=0 GOTO HANDLE_ERROR
                               COMMIT TRAN RETURN 0 HANDLE_ERROR:  ROLLBACK TRAN  RETURN @myERROR      ENDGO
asp.net page<asp:SqlDataSource ID="ContactDetailDS" runat="server" ConnectionString="<%$ ConnectionStrings:EssPerLisCS %>"            SelectCommand="SELECT * FROM TABLE_One"                        UpdateCommand="UPDATE TABLE_One WHERE ID = @ID"                         InsertCommand="usp_InsertNew" InsertCommandType="StoredProcedure">                        <SelectParameters>                <asp:ControlParameter ControlID="GridView1" Name="ID" PropertyName="SelectedValue" />            </SelectParameters>             </asp:SqlDataSource>
 

View 2 Replies View Related

How To Code An Aspx Page To Run A Stored Procedure With A Parameter

Sep 19, 2007

 My stored proceddure "My Programs" includes a parameter @meid.How do I code an aspx file to run the procedure with a user ID, e.g. EmpID?I tried the following codes, but the error message indicated it can not findthe Stored Procedure.  How do I pass the EmpID as a Stored Procedure parameter?
 <%meid = EmpIdcmd.CommandText = "MyPrograms meid"cmd.CommandType = CommandType.StoredProcedurecmd.Connection = sqlConnection2sqlConnection2.Open()reader3 = cmd.ExecuteReader(meid)While reader3.Read()sb.Append(reader3(i).ToString() + "......<BR> <BR /> ")End While%> 
TIA,Jeffrey

View 3 Replies View Related

How Do I Return The Identity From Stored Procedure To Asp.net Code Behind Page?

Jun 2, 2006

how do i return the identity from stored procedure to asp.net code behind page?
CREATE PROCEDURE [dbo].[myInsert] ( @Name varchar(35),   @LastIdentityNumber int output)AS insert into table1 (name) values (@name)
DECLARE @IdentityNumber intSET @IdentityNumber = SCOPE_IDENTITY()SELECT @IdentityNumber as LastIdentityNumber
code behind:
public void _Insert(
string _Name,
{
DbCommand dbCommand = db.GetStoredProcCommand("name_Insert");db.AddInParameter(dbCommand, "name", DbType.String, _userId);
db.AddParameter(dbCommand, "@IdentityNumber", DbType.Int32, ParameterDirection.Output, "", DataRowVersion.Current, null);
db.ExecuteNonQuery(dbCommand);
int a = (int)db.GetParameterValue(dbCommand,"@IdentityNumber");
whats wrong with to the above code?
 

View 2 Replies View Related

Data Conversion Components &&amp; Code Page Issue

Feb 17, 2006

I am using the SSIS wizard to pull data from DB2 z/os to sql server.  The data flow task that is created converts the data to DT_STR Ansi 1252 before storing to sql server database.  The package is blowing up on in the data conversion component...no match in found in target code page...for my city name field.

My old dts wizard didn't have this problem.  The forums seem to indicate that SSIS is no longer doing some of the implicit conversions that DTS did and I may have to do more than one conversion.

What format type/code page do I use for the other conversion?  The code page for my DB2 data source is 37.

I've tried several scenarios and none of them have worked.  Any hints?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved