Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Wednesday, March 21, 2012

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

|||Hello

Does anyone have the solution to this issue?
Everytime I open a new SSIS package, i get the error
"Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type
'Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSContainer90'. This operation failed because the QueryInterface call on the COM component for the interface...failed due to the following error: Interface not registered."

Which interface do I need to register?

Doesnt happen for other packages, only SSIS.

Thanks!

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

sql

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

Open SSIS project error: Unable to cast COM object of type

When I open up my existing SSIS project, I always get this error. Does anyone know what was wrong ?

TITLE: Microsoft Visual Studio

Unable to cast COM object of type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass' to interface type 'Microsoft.SqlServer.Dts.Runtime.IObjectWithSite'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FC4801A3-2BA9-11CF-A229-00AA003D7352}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

Did you get a solution to this problem? If so could you please post it? I'm having the exact same problem on my development server.

Sincerely

Svein Terje Gaup

|||

I have the same problem as well, anyone know how to solve it?

Many Thanks.

Warren

|||

i got it fixed without knowing how to fix it. it is kind of rediculous.

Can anyone from SSIS team or any SSIS guru answer this ?

Steve

|||

I've no idea but it seems some realated with the apartment for a COM object, maybe STA which is being used

in another thread.

My wonder is why BIDS needs to make a RCW between managed code and unmanaged code when you're going to open it.

|||

Have seen this error several times opening BIDS.

Just close BIDS and open it up again, error gone. Don't know why. I think it happens when I'm a little bit impatient and try to open a recent project while BIDS is not fully up and running yet.

It's a bit annoying, but I don't think it's a serious problem.

Pipo1

|||Have this problem too - any fixes?|||

It seems SQL 2005 does not do a good job to tell us what the error is...

Not sure if you guys did the same task I did, I got the same error when I tried to add a Maintenance Plan. I tried to find the reason/solution but no luck.. and I fixed it not because I found the answer and it is all about security...

My story is...

I set up two clustered SQL 2005 servers and tried to add a maintanience plan by using sa account authentication. However, sa account is not a network account but a SQL account. So I kept getting the error no matter I close/open how many times. And unfortunately SQL 2005 does not report this error "precisely" to me to identify where the problem is... So instead of using my local Management Tools and sa accoutn authentication, I logged in to another server on the same network domain as those two clustered servers. Then I used Management Tool installed on it and Window Authentication account which is the admin account of two clustered servers, and hahaha, it just works like I want it to.

Hope this helps,
Jet

Tuesday, March 20, 2012

open recordset error

I get a 'data type mismatch in criteria expression' when trying to open a recordset from a query that uses a variable in the match. It works fine if I use the query without the varible. The error occurs at the rs1.open line, not the sqlstmt line.

ticket=1002
db_file = App.Path & "\goldpos.mdb"

Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & db_file & ";" & _
"Persist Security Info=False"
cn.Open

'sqlstmt = "SELECT * FROM orders where [invoice] = 1002" THIS WORKS
sqlstmt = "SELECT * FROM orders where [invoice] = '" & ticket & "'" 'THIS DOESN'T WORK

Set rs1 = New ADODB.Recordset

rs1.Open sqlstmt, cn, adOpenStatic, adLockOptimistic, adCmdText

Set DataGrid1.DataSource = rs1Originally posted by JerryB
'sqlstmt = "SELECT * FROM orders where [invoice] = 1002" THIS WORKS
sqlstmt = "SELECT * FROM orders where [invoice] = '" & ticket & "'" 'THIS DOESN'T WORK

Why are you adding single quotes around ticket if it just wants a number? Why not:

sqlstmt = "SELECT * FROM orders where [invoice] = " & ticket

Open query error: Invalid data for type "numeric".

Hi guys....

I am upgrading from SQL Server 2000 to 2005 x64.

I have made a connection to an oracle database. In one of the Oracle tables, there is a field named "numID", which is Number(8).

So, when I run this query:

select numID
from Openquery(myConnection, 'select numID from OracleTable where numID > 100 and numID < 1000');

I get this message:

Msg 9803, Level 16, State 1, Line 1
Invalid data for type "numeric".

(I do see some rows returned before the error.)

However, this query works:
select numID
from Openquery(myConnection, 'select numID from OracleTable where numID = 6991');

This query also works:
select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

Does anyone know how to get this to work without doing multiple conversions?

Thanks,

Forch

not familiar with oracle syntax. . .Is there an IsNumeric function and if so, what happens if you execute something along the lines of

select numID
from Openquery(myConnection, 'select numID from OracleTable where not IsNumeric(numID) = 1');

do you get any hits?

how about with

select numID
from Openquery(myConnection, 'select numID from OracleTable where IsNumeric(numID) = 1 and numID between 100 and 1000');

|||

I have the very same issue on my x64.

My server is a Windows 2003 Advanced Server with SQL 2005 SP1 x64. The ODBC driver is ORACLIENT10g version 10.02.00.01. The statement is something like. The source Oracle database is version 9i (9.20.50)

select TERM_CD,TERM_DAYS,TERM_UNIT_CD,TERM_UNITS,BEGIN_DT,END_DT,NO_OF_ISSUES,DESCRIPTION,DMSI_FLG,CS_FLG,FULFILLMENT_FLG,PAID_TERM_FLG,UPGRADE_FLG,UPGRADED_TERM_CD,CREATED_DT,UPDATED_DT,PRODUCT_CD,PRODUCT_STATUS_CD,SUB_CATEGORY_CD,SUB_CATEGORY_DESC,PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY_DESC,PRODUCT_BRAND_CD,PRODUCT_BRAND_DESC,PRINT_COPY_FLG,ELECTRONIC_COPY_FLG,BUNDLED_COPY_FLG,DMSI_ADMIN_FLG,FREQ_OF_DELIVERY,SMARTLINK_FLG,SL_ISSUES

from openquery (pibd,'select * from term_ref where term_cd = ''AE''')

The query runs fine with out the TERM_DAYS field. This is a numeric field.

One of the fields in the query (TERM_DAYS) is a numeric field. I checked the data on Oracle table and the data is good. When I eliminate this specific field from my query string, I get results. There are several other numeric fields in the query, but the error only occurs when I include this field

I suspect that the issue might be the ODBC driver I have installed. However, the version above was at the time the only version that worked with SQL2005.

I like to know if anyone out there has encountered a similar issue and what was they did to resolve the problem.

Thanks

|||

From this Oracle forum post, it looks like MS have stated that it is a provider problem with Oracle 10.x drivers. Not sure if it's specifically 64-bit drivers, though the post refers specifically to these, and I have experienced the same issue on an x64 platform.

One suggestion in the forum is to create a view to round the numerics.

http://forums.oracle.com/forums/thread.jspa?threadID=337842&tstart=0

|||

Above suggestion is not working..

|||

I too came across this error with SQL Server 2005 x64 & 64bit Oracle client... To overcome it I did the following:

I looked at my data in Oracle using SQLPlus (& SQL Developer). I verified that the precision of the values for this column didn't exceed 6 decimal places. Then in my Oracle database I created a view and I rounded this number to a precision of 6-- round(columnname,6). Now when I do a select * from openquery(datasource, 'select * from viewname') it is returning my full data set...

Hope this helps someone, and saves someone some time...

Rob

|||

I agree with Llewellin (Rob), the root cause for this issue is numeric precision or conflicitng numeric definition..

as Forch said the best solution for this to use the following query and control your numeric data precision & definition on SQL Server..

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

|||

It's amazing to me that this continues to be an ongoing problem, but I am also having problems with numeric data types when using Windows 2003 x64 with x64 Oracle ODBC driver (using DataReader through Visual Studio 2005 Integration services). They get translated in as 0's when I begin processing the data in the VS 2005/SQL Server 2005 environment. The solution I have come up -- though I still find it very inconvenient -- is to put to_number around each numeric column....e.g.

Select my_num_field1,

my_char_field2,

my_num_field3

from my_table;

Where my_num_field1 is NUMBER(8,0) and my_num_field3 is NUMBER(11,4).

Change it to:

Select to_number(my_num_field1) my_num_field1,

my_char_field2,

to_number(my_num_field3) my_num_field3

from my_table;

Or run the job using 32 bit integration services and 32 bit Oracle ODBC driver.

I'm using x64 bit Oracle InstantClient version 10.2.0.3.

Are there other's seeing this same problem? Any other suggestions or workarounds?

|||

I too have the error. i have only just started to investigate.

I had a select working fine on 32bit which seems to have broken without any change

|||

I just ran into this problem using the 64bit client also. I solved in in a similar fashion by doing the following:

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select CAST(numID AS NUMBER) as numID from OracleTable');

To shed a little more light on the subject, the problem appears to be isolated to only INTEGER or NUMBER(n) values that end with a 0.

I found that I get this error whenever I select rows where the column contains a number like 10 or 1090. But if no rows contain a value that ends with a 0, the query succeeds.

Open query error: Invalid data for type "numeric".

Hi guys....

I am upgrading from SQL Server 2000 to 2005 x64.

I have made a connection to an oracle database. In one of the Oracle tables, there is a field named "numID", which is Number(8).

So, when I run this query:

select numID
from Openquery(myConnection, 'select numID from OracleTable where numID > 100 and numID < 1000');

I get this message:

Msg 9803, Level 16, State 1, Line 1
Invalid data for type "numeric".

(I do see some rows returned before the error.)

However, this query works:
select numID
from Openquery(myConnection, 'select numID from OracleTable where numID = 6991');

This query also works:
select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

Does anyone know how to get this to work without doing multiple conversions?

Thanks,

Forch

not familiar with oracle syntax. . .Is there an IsNumeric function and if so, what happens if you execute something along the lines of

select numID
from Openquery(myConnection, 'select numID from OracleTable where not IsNumeric(numID) = 1');

do you get any hits?

how about with

select numID
from Openquery(myConnection, 'select numID from OracleTable where IsNumeric(numID) = 1 and numID between 100 and 1000');

|||

I have the very same issue on my x64.

My server is a Windows 2003 Advanced Server with SQL 2005 SP1 x64. The ODBC driver is ORACLIENT10g version 10.02.00.01. The statement is something like. The source Oracle database is version 9i (9.20.50)

select TERM_CD,TERM_DAYS,TERM_UNIT_CD,TERM_UNITS,BEGIN_DT,END_DT,NO_OF_ISSUES,DESCRIPTION,DMSI_FLG,CS_FLG,FULFILLMENT_FLG,PAID_TERM_FLG,UPGRADE_FLG,UPGRADED_TERM_CD,CREATED_DT,UPDATED_DT,PRODUCT_CD,PRODUCT_STATUS_CD,SUB_CATEGORY_CD,SUB_CATEGORY_DESC,PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY_DESC,PRODUCT_BRAND_CD,PRODUCT_BRAND_DESC,PRINT_COPY_FLG,ELECTRONIC_COPY_FLG,BUNDLED_COPY_FLG,DMSI_ADMIN_FLG,FREQ_OF_DELIVERY,SMARTLINK_FLG,SL_ISSUES

from openquery (pibd,'select * from term_ref where term_cd = ''AE''')

The query runs fine with out the TERM_DAYS field. This is a numeric field.

One of the fields in the query (TERM_DAYS) is a numeric field. I checked the data on Oracle table and the data is good. When I eliminate this specific field from my query string, I get results. There are several other numeric fields in the query, but the error only occurs when I include this field

I suspect that the issue might be the ODBC driver I have installed. However, the version above was at the time the only version that worked with SQL2005.

I like to know if anyone out there has encountered a similar issue and what was they did to resolve the problem.

Thanks

|||

From this Oracle forum post, it looks like MS have stated that it is a provider problem with Oracle 10.x drivers. Not sure if it's specifically 64-bit drivers, though the post refers specifically to these, and I have experienced the same issue on an x64 platform.

One suggestion in the forum is to create a view to round the numerics.

http://forums.oracle.com/forums/thread.jspa?threadID=337842&tstart=0

|||

Above suggestion is not working..

|||

I too came across this error with SQL Server 2005 x64 & 64bit Oracle client... To overcome it I did the following:

I looked at my data in Oracle using SQLPlus (& SQL Developer). I verified that the precision of the values for this column didn't exceed 6 decimal places. Then in my Oracle database I created a view and I rounded this number to a precision of 6-- round(columnname,6). Now when I do a select * from openquery(datasource, 'select * from viewname') it is returning my full data set...

Hope this helps someone, and saves someone some time...

Rob

|||

I agree with Llewellin (Rob), the root cause for this issue is numeric precision or conflicitng numeric definition..

as Forch said the best solution for this to use the following query and control your numeric data precision & definition on SQL Server..

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

|||

It's amazing to me that this continues to be an ongoing problem, but I am also having problems with numeric data types when using Windows 2003 x64 with x64 Oracle ODBC driver (using DataReader through Visual Studio 2005 Integration services). They get translated in as 0's when I begin processing the data in the VS 2005/SQL Server 2005 environment. The solution I have come up -- though I still find it very inconvenient -- is to put to_number around each numeric column....e.g.

Select my_num_field1,

my_char_field2,

my_num_field3

from my_table;

Where my_num_field1 is NUMBER(8,0) and my_num_field3 is NUMBER(11,4).

Change it to:

Select to_number(my_num_field1) my_num_field1,

my_char_field2,

to_number(my_num_field3) my_num_field3

from my_table;

Or run the job using 32 bit integration services and 32 bit Oracle ODBC driver.

I'm using x64 bit Oracle InstantClient version 10.2.0.3.

Are there other's seeing this same problem? Any other suggestions or workarounds?

|||

I too have the error. i have only just started to investigate.

I had a select working fine on 32bit which seems to have broken without any change

Open query error: Invalid data for type "numeric".

Hi guys....

I am upgrading from SQL Server 2000 to 2005 x64.

I have made a connection to an oracle database. In one of the Oracle tables, there is a field named "numID", which is Number(8).

So, when I run this query:

select numID
from Openquery(myConnection, 'select numID from OracleTable where numID > 100 and numID < 1000');

I get this message:

Msg 9803, Level 16, State 1, Line 1
Invalid data for type "numeric".

(I do see some rows returned before the error.)

However, this query works:
select numID
from Openquery(myConnection, 'select numID from OracleTable where numID = 6991');

This query also works:
select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

Does anyone know how to get this to work without doing multiple conversions?

Thanks,

Forch

not familiar with oracle syntax. . .Is there an IsNumeric function and if so, what happens if you execute something along the lines of

select numID
from Openquery(myConnection, 'select numID from OracleTable where not IsNumeric(numID) = 1');

do you get any hits?

how about with

select numID
from Openquery(myConnection, 'select numID from OracleTable where IsNumeric(numID) = 1 and numID between 100 and 1000');

|||

I have the very same issue on my x64.

My server is a Windows 2003 Advanced Server with SQL 2005 SP1 x64. The ODBC driver is ORACLIENT10g version 10.02.00.01. The statement is something like. The source Oracle database is version 9i (9.20.50)

select TERM_CD,TERM_DAYS,TERM_UNIT_CD,TERM_UNITS,BEGIN_DT,END_DT,NO_OF_ISSUES,DESCRIPTION,DMSI_FLG,CS_FLG,FULFILLMENT_FLG,PAID_TERM_FLG,UPGRADE_FLG,UPGRADED_TERM_CD,CREATED_DT,UPDATED_DT,PRODUCT_CD,PRODUCT_STATUS_CD,SUB_CATEGORY_CD,SUB_CATEGORY_DESC,PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY_DESC,PRODUCT_BRAND_CD,PRODUCT_BRAND_DESC,PRINT_COPY_FLG,ELECTRONIC_COPY_FLG,BUNDLED_COPY_FLG,DMSI_ADMIN_FLG,FREQ_OF_DELIVERY,SMARTLINK_FLG,SL_ISSUES

from openquery (pibd,'select * from term_ref where term_cd = ''AE''')

The query runs fine with out the TERM_DAYS field. This is a numeric field.

One of the fields in the query (TERM_DAYS) is a numeric field. I checked the data on Oracle table and the data is good. When I eliminate this specific field from my query string, I get results. There are several other numeric fields in the query, but the error only occurs when I include this field

I suspect that the issue might be the ODBC driver I have installed. However, the version above was at the time the only version that worked with SQL2005.

I like to know if anyone out there has encountered a similar issue and what was they did to resolve the problem.

Thanks

|||

From this Oracle forum post, it looks like MS have stated that it is a provider problem with Oracle 10.x drivers. Not sure if it's specifically 64-bit drivers, though the post refers specifically to these, and I have experienced the same issue on an x64 platform.

One suggestion in the forum is to create a view to round the numerics.

http://forums.oracle.com/forums/thread.jspa?threadID=337842&tstart=0

|||

Above suggestion is not working..

|||

I too came across this error with SQL Server 2005 x64 & 64bit Oracle client... To overcome it I did the following:

I looked at my data in Oracle using SQLPlus (& SQL Developer). I verified that the precision of the values for this column didn't exceed 6 decimal places. Then in my Oracle database I created a view and I rounded this number to a precision of 6-- round(columnname,6). Now when I do a select * from openquery(datasource, 'select * from viewname') it is returning my full data set...

Hope this helps someone, and saves someone some time...

Rob

|||

I agree with Llewellin (Rob), the root cause for this issue is numeric precision or conflicitng numeric definition..

as Forch said the best solution for this to use the following query and control your numeric data precision & definition on SQL Server..

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

|||

It's amazing to me that this continues to be an ongoing problem, but I am also having problems with numeric data types when using Windows 2003 x64 with x64 Oracle ODBC driver (using DataReader through Visual Studio 2005 Integration services). They get translated in as 0's when I begin processing the data in the VS 2005/SQL Server 2005 environment. The solution I have come up -- though I still find it very inconvenient -- is to put to_number around each numeric column....e.g.

Select my_num_field1,

my_char_field2,

my_num_field3

from my_table;

Where my_num_field1 is NUMBER(8,0) and my_num_field3 is NUMBER(11,4).

Change it to:

Select to_number(my_num_field1) my_num_field1,

my_char_field2,

to_number(my_num_field3) my_num_field3

from my_table;

Or run the job using 32 bit integration services and 32 bit Oracle ODBC driver.

I'm using x64 bit Oracle InstantClient version 10.2.0.3.

Are there other's seeing this same problem? Any other suggestions or workarounds?

|||

I too have the error. i have only just started to investigate.

I had a select working fine on 32bit which seems to have broken without any change

Open query error: Invalid data for type "numeric".

Hi guys....

I am upgrading from SQL Server 2000 to 2005 x64.

I have made a connection to an oracle database. In one of the Oracle tables, there is a field named "numID", which is Number(8).

So, when I run this query:

select numID
from Openquery(myConnection, 'select numID from OracleTable where numID > 100 and numID < 1000');

I get this message:

Msg 9803, Level 16, State 1, Line 1
Invalid data for type "numeric".

(I do see some rows returned before the error.)

However, this query works:
select numID
from Openquery(myConnection, 'select numID from OracleTable where numID = 6991');

This query also works:
select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

Does anyone know how to get this to work without doing multiple conversions?

Thanks,

Forch

not familiar with oracle syntax. . .Is there an IsNumeric function and if so, what happens if you execute something along the lines of

select numID
from Openquery(myConnection, 'select numID from OracleTable where not IsNumeric(numID) = 1');

do you get any hits?

how about with

select numID
from Openquery(myConnection, 'select numID from OracleTable where IsNumeric(numID) = 1 and numID between 100 and 1000');

|||

I have the very same issue on my x64.

My server is a Windows 2003 Advanced Server with SQL 2005 SP1 x64. The ODBC driver is ORACLIENT10g version 10.02.00.01. The statement is something like. The source Oracle database is version 9i (9.20.50)

select TERM_CD,TERM_DAYS,TERM_UNIT_CD,TERM_UNITS,BEGIN_DT,END_DT,NO_OF_ISSUES,DESCRIPTION,DMSI_FLG,CS_FLG,FULFILLMENT_FLG,PAID_TERM_FLG,UPGRADE_FLG,UPGRADED_TERM_CD,CREATED_DT,UPDATED_DT,PRODUCT_CD,PRODUCT_STATUS_CD,SUB_CATEGORY_CD,SUB_CATEGORY_DESC,PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY_DESC,PRODUCT_BRAND_CD,PRODUCT_BRAND_DESC,PRINT_COPY_FLG,ELECTRONIC_COPY_FLG,BUNDLED_COPY_FLG,DMSI_ADMIN_FLG,FREQ_OF_DELIVERY,SMARTLINK_FLG,SL_ISSUES

from openquery (pibd,'select * from term_ref where term_cd = ''AE''')

The query runs fine with out the TERM_DAYS field. This is a numeric field.

One of the fields in the query (TERM_DAYS) is a numeric field. I checked the data on Oracle table and the data is good. When I eliminate this specific field from my query string, I get results. There are several other numeric fields in the query, but the error only occurs when I include this field

I suspect that the issue might be the ODBC driver I have installed. However, the version above was at the time the only version that worked with SQL2005.

I like to know if anyone out there has encountered a similar issue and what was they did to resolve the problem.

Thanks

|||

From this Oracle forum post, it looks like MS have stated that it is a provider problem with Oracle 10.x drivers. Not sure if it's specifically 64-bit drivers, though the post refers specifically to these, and I have experienced the same issue on an x64 platform.

One suggestion in the forum is to create a view to round the numerics.

http://forums.oracle.com/forums/thread.jspa?threadID=337842&tstart=0

|||

Above suggestion is not working..

|||

I too came across this error with SQL Server 2005 x64 & 64bit Oracle client... To overcome it I did the following:

I looked at my data in Oracle using SQLPlus (& SQL Developer). I verified that the precision of the values for this column didn't exceed 6 decimal places. Then in my Oracle database I created a view and I rounded this number to a precision of 6-- round(columnname,6). Now when I do a select * from openquery(datasource, 'select * from viewname') it is returning my full data set...

Hope this helps someone, and saves someone some time...

Rob

|||

I agree with Llewellin (Rob), the root cause for this issue is numeric precision or conflicitng numeric definition..

as Forch said the best solution for this to use the following query and control your numeric data precision & definition on SQL Server..

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

|||

It's amazing to me that this continues to be an ongoing problem, but I am also having problems with numeric data types when using Windows 2003 x64 with x64 Oracle ODBC driver (using DataReader through Visual Studio 2005 Integration services). They get translated in as 0's when I begin processing the data in the VS 2005/SQL Server 2005 environment. The solution I have come up -- though I still find it very inconvenient -- is to put to_number around each numeric column....e.g.

Select my_num_field1,

my_char_field2,

my_num_field3

from my_table;

Where my_num_field1 is NUMBER(8,0) and my_num_field3 is NUMBER(11,4).

Change it to:

Select to_number(my_num_field1) my_num_field1,

my_char_field2,

to_number(my_num_field3) my_num_field3

from my_table;

Or run the job using 32 bit integration services and 32 bit Oracle ODBC driver.

I'm using x64 bit Oracle InstantClient version 10.2.0.3.

Are there other's seeing this same problem? Any other suggestions or workarounds?

|||

I too have the error. i have only just started to investigate.

I had a select working fine on 32bit which seems to have broken without any change

|||

I just ran into this problem using the 64bit client also. I solved in in a similar fashion by doing the following:

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select CAST(numID AS NUMBER) as numID from OracleTable');

To shed a little more light on the subject, the problem appears to be isolated to only INTEGER or NUMBER(n) values that end with a 0.

I found that I get this error whenever I select rows where the column contains a number like 10 or 1090. But if no rows contain a value that ends with a 0, the query succeeds.

Open query error: Invalid data for type "numeric".

Hi guys....

I am upgrading from SQL Server 2000 to 2005 x64.

I have made a connection to an oracle database. In one of the Oracle tables, there is a field named "numID", which is Number(8).

So, when I run this query:

select numID
from Openquery(myConnection, 'select numID from OracleTable where numID > 100 and numID < 1000');

I get this message:

Msg 9803, Level 16, State 1, Line 1
Invalid data for type "numeric".

(I do see some rows returned before the error.)

However, this query works:
select numID
from Openquery(myConnection, 'select numID from OracleTable where numID = 6991');

This query also works:
select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

Does anyone know how to get this to work without doing multiple conversions?

Thanks,

Forch

not familiar with oracle syntax. . .Is there an IsNumeric function and if so, what happens if you execute something along the lines of

select numID
from Openquery(myConnection, 'select numID from OracleTable where not IsNumeric(numID) = 1');

do you get any hits?

how about with

select numID
from Openquery(myConnection, 'select numID from OracleTable where IsNumeric(numID) = 1 and numID between 100 and 1000');

|||

I have the very same issue on my x64.

My server is a Windows 2003 Advanced Server with SQL 2005 SP1 x64. The ODBC driver is ORACLIENT10g version 10.02.00.01. The statement is something like. The source Oracle database is version 9i (9.20.50)

select TERM_CD,TERM_DAYS,TERM_UNIT_CD,TERM_UNITS,BEGIN_DT,END_DT,NO_OF_ISSUES,DESCRIPTION,DMSI_FLG,CS_FLG,FULFILLMENT_FLG,PAID_TERM_FLG,UPGRADE_FLG,UPGRADED_TERM_CD,CREATED_DT,UPDATED_DT,PRODUCT_CD,PRODUCT_STATUS_CD,SUB_CATEGORY_CD,SUB_CATEGORY_DESC,PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY_DESC,PRODUCT_BRAND_CD,PRODUCT_BRAND_DESC,PRINT_COPY_FLG,ELECTRONIC_COPY_FLG,BUNDLED_COPY_FLG,DMSI_ADMIN_FLG,FREQ_OF_DELIVERY,SMARTLINK_FLG,SL_ISSUES

from openquery (pibd,'select * from term_ref where term_cd = ''AE''')

The query runs fine with out the TERM_DAYS field. This is a numeric field.

One of the fields in the query (TERM_DAYS) is a numeric field. I checked the data on Oracle table and the data is good. When I eliminate this specific field from my query string, I get results. There are several other numeric fields in the query, but the error only occurs when I include this field

I suspect that the issue might be the ODBC driver I have installed. However, the version above was at the time the only version that worked with SQL2005.

I like to know if anyone out there has encountered a similar issue and what was they did to resolve the problem.

Thanks

|||

From this Oracle forum post, it looks like MS have stated that it is a provider problem with Oracle 10.x drivers. Not sure if it's specifically 64-bit drivers, though the post refers specifically to these, and I have experienced the same issue on an x64 platform.

One suggestion in the forum is to create a view to round the numerics.

http://forums.oracle.com/forums/thread.jspa?threadID=337842&tstart=0

|||

Above suggestion is not working..

|||

I too came across this error with SQL Server 2005 x64 & 64bit Oracle client... To overcome it I did the following:

I looked at my data in Oracle using SQLPlus (& SQL Developer). I verified that the precision of the values for this column didn't exceed 6 decimal places. Then in my Oracle database I created a view and I rounded this number to a precision of 6-- round(columnname,6). Now when I do a select * from openquery(datasource, 'select * from viewname') it is returning my full data set...

Hope this helps someone, and saves someone some time...

Rob

|||

I agree with Llewellin (Rob), the root cause for this issue is numeric precision or conflicitng numeric definition..

as Forch said the best solution for this to use the following query and control your numeric data precision & definition on SQL Server..

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

|||

It's amazing to me that this continues to be an ongoing problem, but I am also having problems with numeric data types when using Windows 2003 x64 with x64 Oracle ODBC driver (using DataReader through Visual Studio 2005 Integration services). They get translated in as 0's when I begin processing the data in the VS 2005/SQL Server 2005 environment. The solution I have come up -- though I still find it very inconvenient -- is to put to_number around each numeric column....e.g.

Select my_num_field1,

my_char_field2,

my_num_field3

from my_table;

Where my_num_field1 is NUMBER(8,0) and my_num_field3 is NUMBER(11,4).

Change it to:

Select to_number(my_num_field1) my_num_field1,

my_char_field2,

to_number(my_num_field3) my_num_field3

from my_table;

Or run the job using 32 bit integration services and 32 bit Oracle ODBC driver.

I'm using x64 bit Oracle InstantClient version 10.2.0.3.

Are there other's seeing this same problem? Any other suggestions or workarounds?

|||

I too have the error. i have only just started to investigate.

I had a select working fine on 32bit which seems to have broken without any change

Open query error: Invalid data for type "numeric".

Hi guys....

I am upgrading from SQL Server 2000 to 2005 x64.

I have made a connection to an oracle database. In one of the Oracle tables, there is a field named "numID", which is Number(8).

So, when I run this query:

select numID
from Openquery(myConnection, 'select numID from OracleTable where numID > 100 and numID < 1000');

I get this message:

Msg 9803, Level 16, State 1, Line 1
Invalid data for type "numeric".

(I do see some rows returned before the error.)

However, this query works:
select numID
from Openquery(myConnection, 'select numID from OracleTable where numID = 6991');

This query also works:
select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

Does anyone know how to get this to work without doing multiple conversions?

Thanks,

Forch

not familiar with oracle syntax. . .Is there an IsNumeric function and if so, what happens if you execute something along the lines of

select numID
from Openquery(myConnection, 'select numID from OracleTable where not IsNumeric(numID) = 1');

do you get any hits?

how about with

select numID
from Openquery(myConnection, 'select numID from OracleTable where IsNumeric(numID) = 1 and numID between 100 and 1000');

|||

I have the very same issue on my x64.

My server is a Windows 2003 Advanced Server with SQL 2005 SP1 x64. The ODBC driver is ORACLIENT10g version 10.02.00.01. The statement is something like. The source Oracle database is version 9i (9.20.50)

select TERM_CD,TERM_DAYS,TERM_UNIT_CD,TERM_UNITS,BEGIN_DT,END_DT,NO_OF_ISSUES,DESCRIPTION,DMSI_FLG,CS_FLG,FULFILLMENT_FLG,PAID_TERM_FLG,UPGRADE_FLG,UPGRADED_TERM_CD,CREATED_DT,UPDATED_DT,PRODUCT_CD,PRODUCT_STATUS_CD,SUB_CATEGORY_CD,SUB_CATEGORY_DESC,PRODUCT_CATEGORY_CD,PRODUCT_CATEGORY_DESC,PRODUCT_BRAND_CD,PRODUCT_BRAND_DESC,PRINT_COPY_FLG,ELECTRONIC_COPY_FLG,BUNDLED_COPY_FLG,DMSI_ADMIN_FLG,FREQ_OF_DELIVERY,SMARTLINK_FLG,SL_ISSUES

from openquery (pibd,'select * from term_ref where term_cd = ''AE''')

The query runs fine with out the TERM_DAYS field. This is a numeric field.

One of the fields in the query (TERM_DAYS) is a numeric field. I checked the data on Oracle table and the data is good. When I eliminate this specific field from my query string, I get results. There are several other numeric fields in the query, but the error only occurs when I include this field

I suspect that the issue might be the ODBC driver I have installed. However, the version above was at the time the only version that worked with SQL2005.

I like to know if anyone out there has encountered a similar issue and what was they did to resolve the problem.

Thanks

|||

From this Oracle forum post, it looks like MS have stated that it is a provider problem with Oracle 10.x drivers. Not sure if it's specifically 64-bit drivers, though the post refers specifically to these, and I have experienced the same issue on an x64 platform.

One suggestion in the forum is to create a view to round the numerics.

http://forums.oracle.com/forums/thread.jspa?threadID=337842&tstart=0

|||

Above suggestion is not working..

|||

I too came across this error with SQL Server 2005 x64 & 64bit Oracle client... To overcome it I did the following:

I looked at my data in Oracle using SQLPlus (& SQL Developer). I verified that the precision of the values for this column didn't exceed 6 decimal places. Then in my Oracle database I created a view and I rounded this number to a precision of 6-- round(columnname,6). Now when I do a select * from openquery(datasource, 'select * from viewname') it is returning my full data set...

Hope this helps someone, and saves someone some time...

Rob

|||

I agree with Llewellin (Rob), the root cause for this issue is numeric precision or conflicitng numeric definition..

as Forch said the best solution for this to use the following query and control your numeric data precision & definition on SQL Server..

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select To_Char(numID) as numID from OracleTable');

|||

It's amazing to me that this continues to be an ongoing problem, but I am also having problems with numeric data types when using Windows 2003 x64 with x64 Oracle ODBC driver (using DataReader through Visual Studio 2005 Integration services). They get translated in as 0's when I begin processing the data in the VS 2005/SQL Server 2005 environment. The solution I have come up -- though I still find it very inconvenient -- is to put to_number around each numeric column....e.g.

Select my_num_field1,

my_char_field2,

my_num_field3

from my_table;

Where my_num_field1 is NUMBER(8,0) and my_num_field3 is NUMBER(11,4).

Change it to:

Select to_number(my_num_field1) my_num_field1,

my_char_field2,

to_number(my_num_field3) my_num_field3

from my_table;

Or run the job using 32 bit integration services and 32 bit Oracle ODBC driver.

I'm using x64 bit Oracle InstantClient version 10.2.0.3.

Are there other's seeing this same problem? Any other suggestions or workarounds?

|||

I too have the error. i have only just started to investigate.

I had a select working fine on 32bit which seems to have broken without any change

|||

I just ran into this problem using the 64bit client also. I solved in in a similar fashion by doing the following:

select Convert(Int, numID) as numID
from Openquery(myConnection, 'select CAST(numID AS NUMBER) as numID from OracleTable');

To shed a little more light on the subject, the problem appears to be isolated to only INTEGER or NUMBER(n) values that end with a 0.

I found that I get this error whenever I select rows where the column contains a number like 10 or 1090. But if no rows contain a value that ends with a 0, the query succeeds.

Wednesday, March 7, 2012

only when i use a grid view!

hi, i have done some testing and its only when i put a grid view or any other type of data viewer on the page, and then connect it to the sql datasource that i get an error

Line 1: Incorrect syntax near ')'.

now i really cant figure out what it is, here is the code i am using

SQL data source code :

asp

:SqlDataSourceID="SQLDS_view_one_wish"runat="server"ConnectionString="<%$ ConnectionStrings:wishbank_DBCS %>"SelectCommand="SELECT [msg], [Date_Time] FROM [tbl_MSG] WHERE (([Activated] = @.Activated) AND ([msgID = @.msgID]) )ORDER BY [Date_Time] DESC"><SelectParameters><asp:ParameterDefaultValue="Y"Name="Activated"Type="String"/><asp:SessionParameterName="msgID"SessionField="sWV"Type="String"/></SelectParameters></asp:SqlDataSource>

session variable code which sends it to this page

protectedvoid GridView1_SelectedIndexChanged(object sender,EventArgs e)

{

GridViewRow row = GridView1.SelectedRow;

Session[

"sWV"] = row.Cells[1].Text;

Response.Redirect(

"www/viewwf.aspx");

}

if you have an idea please let me know as im stuck!

TRY THIS:

<asp:SqlDataSource ID="SQLDS_view_one_wish" runat="server"SelectCommandType="Text" ConnectionString="<%$ ConnectionStrings:wishbank_DBCS%>"SelectCommand="SELECT [msg], [Date_Time] FROM [tbl_MSG] WHERE (([Activated] = @.Activated) AND ([msgID = @.msgID]) )ORDER BY [Date_Time] DESC"><SelectParameters><asp:Parameter DefaultValue="Y" Name="Activated" Type="String" /><asp:SessionParameter Name="msgID" SessionField="sWV" Type="String" /></SelectParameters></asp:SqlDataSource>