Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Wednesday, March 21, 2012

Errors when attempting to use DataReader destination

Hi,
We have an ASP.Net app that consumes data from a SSIS package. I have proved that this works by building a noddy ASP.Net app against it on my local machine.

Unfortunately the same isn't true of our project-wide solution where we get error "Package failed to execute." In our package log I can see that the things that were failing were various property expressions that are in my package. The expressions are all on the SQLStatementSource property of various Exec SQL tasks in my package.

Here's an example of just such an error:
OnError,FR23011958,CT\aeqz,SQL UPDATE StreamHistory,{30BD52FA-8077-4D40-BFA7-248173C34000},{C84EF8C0-4B15-41FC-B205-9FB6B72884AC},26/10/2005 13:46:31,26/10/2005 13:46:31,-1073647612,0x,The result of the expression ""UPDATE dbo.StreamHistory
SET StreamEndDateID = (Year(GETDATE()) * 10000) + (Month(GETDATE()) * 100) + Day(GETDATE())
, StreamEndTimeID = (datepart(hh, GETDATE()) * 100) + datepart(mi, GETDATE())
, StreamEndTMS = GETDATE()
, StatusDetailID = 1
, Duration = DATEDIFF(ss, StreamStartTMS, GETDATE())
WHERE StreamHistoryID = " + TRIM((DT_STR, 4, 1252) @.[Metadata::StreamHistoryID])

" on property "SqlStatementSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Hopefully you can see that (in theory) this expression should get evaluated regardless of where the package is executed from. Remember, it is not the SQL query that fails to execute - it is the construction of the SQL statement inside an expression that fails.

So simply, has anyone experienced something similar? i.e. Expressions fail to get evaluated when a package is executed from an ASP.Net app (or elsewhere).

I'm wondering if this is a permissions thing...its damned annoying anyway.

ANY experiences at all of doing something similar would be useful.

Thanks
-Jamie

Jamie,

Would you like to share with me your package and ASP app?

BTW - I don't see how this relates to Data Reader destination. Do you mean to put another subject line instead?|||

Runying Mao wrote:

Jamie,

Would you like to share with me your package and ASP app?

BTW - I don't see how this relates to Data Reader destination. Do you mean to put another subject line instead?

Hi Runying,
Well it consumes data via a datareader. I actually wrote that initial post over the space of about an hour. At the beginning of that hour we figured the problem was in the datareader cos of the problems we've had with it lately (which you know all about Smile), by the end of the hour we'd learnt more about what it was - i.e. problems with expressions. I just forgot to change the thread title that's all.

We've found out more since. We've built a new windows forms app and copied the code from "Running an Existing Package using Visual Basic" in BOL into the app and used it to run our package. It worked fine.

We then copied and pasted that code line for line into a new project in our solution and it didn't work. Same code, same machine, same user credentials...different result. very very strange. So now we're pursuing the assumption that some sort of solution-wide configuration is causing a problem. Hopefully we'll find out more tomorrow but if not....I'l be on here pleading for help!! Smile

-Jamie|||Hi, I'm working with Jamie on this problem and have found a little more about the problem, but am still no nearer a solution!

If I add a new Web site to our solution and copy in the code to call the SSIS package, everything runs correctly.

However, if I then reference one of the other assemblies in our solution the package fails to execute, even though we're not actually calling anything in the referenced assembly.|||Here's what Tim and I eventually found out.

http://blogs.conchango.com/jamiethomson/archive/2005/10/27/2315.aspx

Weird!!

-Jamie

Wednesday, March 7, 2012

error-Line 1: Incorrect syntax near =

hi,

i got this error when i run app.

-----
Line 1: Incorrect syntax near '='.

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.SqlClient.SqlException: Line 1: Incorrect syntax near '='.

Source Error:

Line 40: Dim adpt As New SqlDataAdapter("SELECT * FROM SMS_student_class_master WHERE" & _
Line 41: "stud_id=" & sid, con)
Line 42: adpt.Fill(ds, "SMS_student_class_master")
Line 43: txt.Text = ds.Tables.Item("roll_no").ToString
Line 44: con.Close()

Source File: c:\inetpub\wwwroot\aspnet\sms\assignment_d.aspx.vb Line: 42
---

what should i do?
anyone have any idea?
plz give solution.
it's urgent.

thanks in advanceThis error indicates that there is an error in your sql statement. It looks like you do not have a space after your WHERE keyword.

hope this does the trick,
sivilian|||I think you have forgotten to put a space after WHERE and before stud_id

According to your string that you have formatted in Line 40 and 41, the sql string that will comes up will be like so

SELECT * FROM SMS_student_class_master WHEREstud_id=123

You should have put the string like below:

Dim adpt As New SqlDataAdapter("SELECT * FROM SMS_student_class_master WHERE " & _
"stud_id=" & sid, con)

Sunday, February 26, 2012

Error:sql mobile encountered problems when opening the database

I am trying to deploy my mobile app to treo 700wx, but when i test the app, the application gives me an error message:

sql mobile encountered problems when opening the database

It happens when I sync data.

However, when I sync data users and customer info, it doesn't give this message, But when I sync (third time) order info, this message comes out.

--when i run on my PPC (HP ra1950), there is no this error message.

I think it is a bug?

BTW, which cabs file should I install on the Treo phone? (.Net ce, sql ce mobile30 ?)

Please help me out. Thanks

James

This problem may be caused by not disposing the replication object. Make sure you always dispose all the data related objects.

These 2 forum entries refer to this problem:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=334604&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=478902&SiteID=1|||It may be caused by the System.Data.SqlServerCe versioning. if you are doing merge replication in using VS orcas you need to use the compact edition 3.5 instead of 9.0.242.0 Syatem.Data.SqlServerCe assembly. if you insist of using the 9.0242.0 then you need to add those compact 3.5 edition 7's .dlls in to your execution directory. The dlls are sqlceca30.dll, sqlcecompact30.dll, sqlceer30EN.dll, sqlceme30.dll, sqlceoledb30.dll, sqlceqp30.dll, sqlcese30.dll. Try to remove and add the assembly.

Error:sql mobile encountered problems when opening the database

I am trying to deploy my mobile app to treo 700wx, but when i test the app, the application gives me an error message:

sql mobile encountered problems when opening the database

It happens when I sync data.

However, when I sync data users and customer info, it doesn't give this message, But when I sync (third time) order info, this message comes out.

--when i run on my PPC (HP ra1950), there is no this error message.

I think it is a bug?

BTW, which cabs file should I install on the Treo phone? (.Net ce, sql ce mobile30 ?)

Please help me out. Thanks

James

This problem may be caused by not disposing the replication object. Make sure you always dispose all the data related objects.

These 2 forum entries refer to this problem:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=334604&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=478902&SiteID=1
|||It may be caused by the System.Data.SqlServerCe versioning. if you are doing merge replication in using VS orcas you need to use the compact edition 3.5 instead of 9.0.242.0 Syatem.Data.SqlServerCe assembly. if you insist of using the 9.0242.0 then you need to add those compact 3.5 edition 7's .dlls in to your execution directory. The dlls are sqlceca30.dll, sqlcecompact30.dll, sqlceer30EN.dll, sqlceme30.dll, sqlceoledb30.dll, sqlceqp30.dll, sqlcese30.dll. Try to remove and add the assembly.

Friday, February 24, 2012

error:26 Error Locating Server/Instance Specified

I am having trouble connecting to Sql Server 2005 Express from asp.net
2.0 app on Windows Server 2003. I am using Sql Server Authentication,
and I tried the below article's suggestions a number of times. When I
login to to the machine, and login, I am able to get authenticated.
However, when I debug my application, I get the error below. Do I have
to give the sql server authenticaed account I created certain
permissions? Whould I set a port, and use the ipaddress rather than
the server name? Any suggestions would be greatly appreciated.
http://support.microsoft.com/kb/914277
My Error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
My Connection String:
<add key="ConnectionString"
value="server=MyServerName;uid=MyUserName;pwd=MyPasswd;database=MyDB"/>On Feb 1, 5:20=A0pm, carlos <carlosubu...@.gmail.com> wrote:
> I am having trouble connecting to Sql Server 2005 Express from asp.net
> 2.0 app on Windows Server 2003. I am using Sql Server Authentication,
> and I tried the below article's suggestions a number of times. When I
> login to to the machine, and login, I am able to get authenticated.
> However, when I debug my application, I get the error below. Do I have
> to give the sql server authenticaed account I created certain
> permissions? Whould I set a port, and use the ipaddress rather than
> the server name? Any suggestions would be greatly appreciated.
> http://support.microsoft.com/kb/914277
> My Error:
> An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the
> fact that under the default settings SQL Server does not allow remote
> connections. (provider: SQL Network Interfaces, error: 26 - Error
> Locating Server/Instance Specified)
> My Connection String:
> =A0<add key=3D"ConnectionString"
> value=3D"server=3DMyServerName;uid=3DMyUserName;pwd=3DMyPasswd;database=3D=MyDB"/>
Update:
I changed the connection string to use the ipaddress, and a port that
I set in the TCPIP settings, and now i'm getting the below message:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: TCP Provider, error: 0 - No connection could
be made because the target machine actively refused it.)
I'm thinking this may be a permission problem'|||Hi Carlos,
By default, SQL Server 2005 Express, Evaluation, and Developer editions
allow local client connections only. Enterprise, Standard, and Workgroup
editions also listen for remote client connections over TCP/IP.
you ned to enable Remote Connections option using
Surface Area Configuration for Services and Connections (Remote Connections)
- Database Engine
You must restart the Database Engine instance's service to apply changes.
Regards,
Amol R. Lembhe
"carlos" wrote:
> On Feb 1, 5:20 pm, carlos <carlosubu...@.gmail.com> wrote:
> > I am having trouble connecting to Sql Server 2005 Express from asp.net
> > 2.0 app on Windows Server 2003. I am using Sql Server Authentication,
> > and I tried the below article's suggestions a number of times. When I
> > login to to the machine, and login, I am able to get authenticated.
> > However, when I debug my application, I get the error below. Do I have
> > to give the sql server authenticaed account I created certain
> > permissions? Whould I set a port, and use the ipaddress rather than
> > the server name? Any suggestions would be greatly appreciated.
> >
> > http://support.microsoft.com/kb/914277
> >
> > My Error:
> >
> > An error has occurred while establishing a connection to the server.
> > When connecting to SQL Server 2005, this failure may be caused by the
> > fact that under the default settings SQL Server does not allow remote
> > connections. (provider: SQL Network Interfaces, error: 26 - Error
> > Locating Server/Instance Specified)
> >
> > My Connection String:
> > <add key="ConnectionString"
> > value="server=MyServerName;uid=MyUserName;pwd=MyPasswd;database=MyDB"/>
> Update:
> I changed the connection string to use the ipaddress, and a port that
> I set in the TCPIP settings, and now i'm getting the below message:
> An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the
> fact that under the default settings SQL Server does not allow remote
> connections. (provider: TCP Provider, error: 0 - No connection could
> be made because the target machine actively refused it.)
> I'm thinking this may be a permission problem'
>