Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Monday, March 19, 2012

An incorrect or unsupported HTTP function call was made error

Hi All,

I've got this error "An incorrect or unsupported HTTP function call was made"

I can't browse SQL CE Agent using IE also.

How to solve this error? TQ

You need to give more information for other people to help, for example, what device, OS, what IDE, what kind of program you are writing, where do you get the error, and how?


Lao K
Visit my Blog for Windows Mobile Pocket PC Smartphone Programming Hints and Tips

|||

OIC.. SORRY!!!

I'm developing Pocket PC Application. Then doing merge replication. When I want to run my app from PC through my PDA, I've got An incorrect or unsupported HTTP function call was made error. All I know this is IIS problem because I can't browse SQL Server CE Agent from PC/Pocket PC internet explorer.

I'm using :-

- VSNet 2003

- SQL Server CE

- SQL Server 2000

- HP iPAQ

- Windows Mobile 2003 Version 4.21.1088

- .Net Compact Framework 1.0

- ActiveSync 3.8

Thank you..

|||

When such error is thrown to app, the exception would contain the following:

Major Error number, Minor error number, HRESULT ... etc..

Can you please let us know the exception contents.

Sometimes you get error collection, check if you have got an error or a collection.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

Sorry 4 the late respond..

I can't remember what the exception contain.. :D because now I'm using another computer..

My replication was successfully..

But when I want to change table design I've to delete the Publications, change table design then doing the new Publication again..

N then I've got this error :-

"Initializing SQL Server Reconciler has failed [,,,,,]"

"The Subscription to Publication 'PDA' is invalid"

What's wrong with my replication?

|||

1) Make sure that http://IISBoxName/VirtualDirName/sqlcesa30.dll?diag show GREEN SUCCESS for SQL Server Reconciler either 9.0 or 8.0 depending on your environment and SQL Server version.

2) Check whether replrec.dll, msgprox.dll, replerrx.dll are registered in %ProgramFiles%\Microsoft SQL Server\90\COM

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

thanks Laxmi..

but I didn't understand the 1st step that u mention..

Can u tell me more bout that.. TQ

|||

if you made a change to the schema of the publication (published articles), you need to re-generate your snapshot. From within SQL Server 2005 Management Studio, right click on the publication itself and choose View Snapshot Agent Status. Then click the Start button in the resulting dialog.

Once the snapshot succeeds, re-try your replication.

Darren

|||thanks Darren.. but i'm using SQL Server 2000|||

regardless, you should generate a new snapshot of your publication.

Darren

|||

thankss Darren,

I tried so many time to generate new snapshot but I still got that 2 error. Finally, I've re-install my SQL Server 2000, SQL Server SP3a and SQL Server CE Tools.. n my replication success..

:D

Sunday, February 19, 2012

AMO - Memory Error !!! PLEASE HELP

based on the Adventure Works example i decide to create the DSV, when i call the method ' AddTable ' as follows:

-

private void AddTable(Microsoft.AnalysisServices.DataSourceView dsv, OleDbConnection connection, String tableName)
{
OleDbDataAdapter adapter = new OleDbDataAdapter(
"SELECT * FROM [dbo].[" + tableName + "] WHERE 1=0",
connection);
DataTable[] dataTables = adapter.FillSchema(dataSet, SchemaType.Mapped, tableName);
DataTable dataTable = dataTables[0];

dataTable.ExtendedProperties.Add("TableType", "Table");
dataTable.ExtendedProperties.Add("DbSchemaName", "dbo");
dataTable.ExtendedProperties.Add("DbTableName", tableName);
}

-

when i try to create the Dim product calling this function i got this error:

Memory error: While attempting to store a string, a string

was found that was larger than the page size selected. The operation

cannot be completed.
Errors in the OLAP storage engine: An error

occurred while the 'LargePhoto' attribute of the 'DimProduct' dimension

from the 'teste2005' database was being processed.
Errors in the

OLAP storage engine: The process operation ended because the number of

errors encountered during processing reached the defined limit of

allowable errors for the operation.

-

And i know that this functions works well because if i comment the creation of DimProduct, everything works fine, so the problem is with some atributes, like ' LargePhoto' for example,

How can i fix this memory error ?, i read some posts in the forum, but i didn't get a concrete answer,

PLEASE HELP !!!!!This may help:

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

C

Thursday, February 16, 2012

Amazon Web Service Call with Web Service Task

With the new improvments to the web service task, we can now use variables as arguments in web service calls. I am trying to setup a call to the amazon web service ECS. I am trying to do a simple sellerlookup. I have played with the settings and gotten nowhere. I get one of two error when I try to execute. I can always use a scripting task or write my own task, but I would like to use the built in task if it is possible. Has anyone used AWS with SSIS?

[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Object reference not set to an instance of an object.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

or


[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Method 'ProxyNamespace.AWSECommerceService.SellerLookup' not found.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

Hi,

I'm having the same problem with a web service, did you can an answer to this?

Thanks, Paul.

|||

Did anyone ever resolved this?

Thanks Henry

|||I resolved mine it was actually an issue with data type assignment in the variable passed. This error reporting for this task is terrible.|||

Thanks Hnery have not solved it

Paul.

|||

Thanks Henry have now solved it

Paul.

Amazon Web Service Call with Web Service Task

With the new improvments to the web service task, we can now use variables as arguments in web service calls. I am trying to setup a call to the amazon web service ECS. I am trying to do a simple sellerlookup. I have played with the settings and gotten nowhere. I get one of two error when I try to execute. I can always use a scripting task or write my own task, but I would like to use the built in task if it is possible. Has anyone used AWS with SSIS?

[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Object reference not set to an instance of an object.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

or


[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Method 'ProxyNamespace.AWSECommerceService.SellerLookup' not found.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

Hi,

I'm having the same problem with a web service, did you can an answer to this?

Thanks, Paul.

|||

Did anyone ever resolved this?

Thanks Henry

|||I resolved mine it was actually an issue with data type assignment in the variable passed. This error reporting for this task is terrible.|||

Thanks Hnery have not solved it

Paul.

|||

Thanks Henry have now solved it

Paul.

Amateur SQL formation error

Hi I have the error:

Only assignment, call, increment, decrement, and new object expressions can be used as a statement

Line 29: command.CommandText = "UPDATE Items SET Quantityavailable = '+TextBox1.Text+' + Quantityavailable.ToString()"; "INS...
 
Refering to my poor coding:
 
private bool ExecuteUpdate(int quantity)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "CustomString";

con.Open();

SqlCommand command = new SqlCommand();
command.Connection = con;
command.CommandText = "UPDATE Items SET Quantityavailable = '+TextBox1.Text+' + Quantityavailable.ToString()"; "INSERT Transactions SET Usersname = '<%# System.Web.HttpContext.Current.User.Identity.Name %>'"; "INSERT Transactions SET Itemid = '@.ProID'"; "INSERT Transactions SET itemname = '@.ItemName'"; "INSERT Transactions SET Date = '<%# DateTime.Now %>'";
command.ExecuteNonQuery();

con.Close();
}

protected void Button2_Click(object sender, EventArgs e)
{
TextBox tb = FormView.FindControl("TextBox1") as TextBox;
ExecuteUpdate( Int32.Parse(tb.Text) );
}

 
Can someone tell me what I've done wrong?
Thanks,
Jon 

What is Quantityavailable.ToString? I don't see that in the code.

Should iot just be

UPDATE Items SET Quantityavailable = '+TextBox1.Text;

|||

Your update statement doesn't specify which item in the items table you want to update.

You have multiple inserts into the transactions table, and you are using the UPDATE syntax for each.

You have quotation problems.

You can't use the databinding syntax in code <% ... %>.

You have parameters defined (@.ProID, @.ItemName) in the SQL, but never declared or set a value for them (And you have them inside quotes).

Try something like (Sorry, not all that good at C#, but it would look something like this):

command.CommandText = "UPDATE Items SET QuantityAvailable = @.qty WHERE ItemID=@.ItemID; INSERT INTO Transactions(Usersname,ItemID,ItemName,[Date]) VALUES (@.User,@.ItemID,@.ItemName,getdate())";

command.Parameters.Add("@.qty",sqldbtypes.Integer).Value = quantity;

command.Parameters.Add("@.User",sqldbtypes.Nvarchar).Value = System.Web.HttpContext.Current.User.Identity.Name;

command.Parameters.Add("@.ItemID",sqldbtypes.Integer).Value = ?;

command.Parameters.Add("@.ItemName",sqldbtypes.NVarchar).Value= ?;

|||

Hi thanks for your response..

The thing is, I am trying to make one table update (Items - Quantityavailable) with the value typed into the textbox, at the same time as another has data inserted (Transactions).


The data to be inserted is databound to the formview of the page - thats why I didnt define the parameters (@....@....) I thought they would just get lifted from the formview as they are defined within the formview. Is there a way to do this?

I have modified my code to this:

SqlConnection con = new SqlConnection();
con.ConnectionString = "CustomString";

con.Open();

SqlCommand command = new SqlCommand();
command.Connection = con;
command.CommandText = "UPDATE Items SET Quantityavailable = +TextBox1.Text' ";
"INSERT INTO Transactions(Usersname,ItemID,ItemName,[Date]) VALUES (@.User,@.ItemID,@.ItemName,getdate())";
command.Parameters.Add("@.User",sqldbtypes.Nvarchar).Value = System.Web.HttpContext.Current.User.Identity.Name;
command.Parameters.Add("@.ItemID",sqldbtypes.Integer).Value = ?;
command.Parameters.Add("@.ItemName",sqldbtypes.NVarchar).Value= ?;

command.ExecuteNonQuery();

con.Close();

Thanks,

Jon

|||

Should be

"UPDATE Items SET Quantityavailable = " +TextBox1.Text + ";"

|||

mcp111:

Should be

"UPDATE Items SET Quantityavailable = " +TextBox1.Text + ";"

Rather, I would recommend using parameterized queries to prevent SQL Injection attacks.

"UPDATE Items SET Quantityavailable = @.Qty"