Showing posts with label converting. Show all posts
Showing posts with label converting. Show all posts

Tuesday, March 20, 2012

data provider or other service returned an E_Fail status in sql server 2005

after converting database from sql server 2000 to sql server 2005. my program on vb6 is facing runtime error. i.e.data provider or other service returned an E_Fail status .

how can i get rid this problem

Could you please post your connection string and the exact error message that you are getting.

Jag

|||

Main_Module.STRCNNN1 = "driver={SQL Server};server=" & Main_Module.Server_Name & ";" & _
"uid=SA;pwd=;database=" & Main_Module.Common_Database
error msg is

runtime error

data provider or other service returned an E_Fail status in sql server 2005

when i am fetching record from view using order by clause in select statement then error is coming

as

select * from vew_emp where grade='C' order empno

at the first time it fetching record with order by

but when i am using recordset.Requiry

it cud not fetch the record

i think when the recordset is open with the record of view

i am deleting ,inserting record in the view base table then the main recordset is not working

without using order by it is running and working well
plz reply me quickly

Saturday, February 25, 2012

Data lost during converting int to smallint

I am trying to keep it consistent with data from the source, I change
datatype for a field from int to smallint and it has a value between 200 and
1000.
When I do it in Enterprise Manager, I give me this warning:
- Warning: Data might be lost converting column 'auto_pre_appr' from 'int'.
Is this just a general warning?
CulamYes, it is warning and you may or may not lose some data, if you know what
the actual data values in the column and what value scope of smallint type
is (-32768 to 32767). Obviously, if the column of int contains data with
value smaller that -32768 or greater than 32767, the warning would become
reality.
"culam" <culam@.discussions.microsoft.com> wrote in message
news:2DB9A059-2D1A-44C9-8D44-32F8F7D7848C@.microsoft.com...
>I am trying to keep it consistent with data from the source, I change
> datatype for a field from int to smallint and it has a value between 200
> and
> 1000.
> When I do it in Enterprise Manager, I give me this warning:
> - Warning: Data might be lost converting column 'auto_pre_appr' from
> 'int'.
> Is this just a general warning?
> Culam

Tuesday, February 14, 2012

Data Flow: Converting data in multiple columns

Hi,

I'm just wondering what's the best approach in Data Flow to convert the following input file format:

Date, Code1, Value1, Code2, Value2

1-Jan-2006, abc1, 20.00, xyz3, 35.00

2-Jan-2006, abc1, 30.00, xyz5, 6.30

into the following output format (to be loaded into a SQL DB):

Date, Code, Value

1-Jan-2006, abc1, 20.00

1-Jan-2006, xyz3, 35.00

2-Jan-2006, abc1, 30.00

2-Jan-2006, xyz5, 6.30

I'm quite new to SSIS, so, I would appreciate detailed steps if possible. Thanks.

Ok, I have found a method to get what I wanted, but I'm not sure if it's the best approach. Any comments appreciated.

I first used a Multicast and feed the input data into 2 Script Components. The first Script Component has input columns of Date, Code1 & Value1, while 2nd Script Component has input columns of Date, Code2 & Value2. In both Script Components, the output columns are Date, Code & Value.

The output of each Script Component are then connected to a Sort and both Sort goes to a Merge. The output from the Merge will then go to a OLE DB Destination to be loaded into a SQL DB (not 2005 version).

Hope it makes sense.

|||

I think Unpivot tranformation cam deliver the same funcionality you put in your script components; but the multicast; the sort and merge join would be required anyway.

Rafael Salas

|||

Hi,

Why dont you have a union step feeded twice by the multicast

then

Delete and add lines so that you would have the following

Date date date

Field 2 cod1 cod2

Field 3 value1 value2

At the end you should have what you want,

Regards,