.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

VS2010 Unicode closing cursor problem in transaction

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :
 

Hello,

I have problems with making a transaction after opening a cursor. I have an Unicode build, so to make the cursor writable I have to Connect the SQL Server 2008 with dynamic or dynasnap attribute. This I understand makes the cursor dynamic and when I open the cursor and make a transaction it closes the dynamic cursor. If I don't use UNICODE, everything works. How can I go around this problem?




View Complete Post


More Related Resource Links

Problem to use unicode chars in yahoo mail

  
Hi i have a problem to send email via smtpClient class to yahoo mail. if i send a unicode email from non-Yahoo account to yahoo mail, it works correctly (display unicode chars correctly without any making change), but when i send from yahoo account to yahoo mail, it does not display characters correctly and i should change it's encoding to UTF8. can anybody help me to work-around this problem ? Please see my previous thread in this link. thanks in advancehttp://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

SSIS 2005 - Send Mail Task - signature appended to email is garbled - unicode problem?

  
Hi, I'm pretty new to SSIS so go easy on me. I have a Send Mail Task to notify if a file cannot be imported - the mailbody is created on the previous step by a VB.NET script task to include the name of the file and the path it's been archived to. The problem I'm having is that while the body of the email I've created is displaying fine, our company's Exchange server appends a signature to all emails, and this is coming up as undisplayable characters, presumably due to some kind of unicode encoding problem. I've tried casting the email body in an expression to DT_STR (doesn't work as DT_STR "cannot be converted to a supported type" which seems a bit odd but never mind), DT_WSTR (garbled signature), DT_TEXT/DT_NTEXT (strange error on this one - "Attempted to read or write protected memory") none of those ideas worked, and I'm a bit stumped now. Can anyone help? I'm using SSIS 2005 with SP3

Problem with closing window in ie 6 sp 3 after download using Response.BinaryWrite

  
Hi all, I currently having problems in closing a page that launches a download (using Response.BinaryWrite) opened using IE 6 sp 3. All other versions of IE it closes fine. This page was opened using window.open. Below is a sample code of what i am trying to achieve: protected void Page_Load(object sender, EventArgs e) { Response.Clear(); //Specify the document type. Response.ContentType = "application/word"; //Specify how the document is sent to the browser. Response.AddHeader("content-disposition", "attachment; filename=MyDasddsaocument.doc"); //Get data bytes from the file and send it to the response. byte[] bytes = System.IO.File.ReadAllBytes(@"C:\\Temp\\in.doc"); Response.BinaryWrite(bytes); Response.End(); Page.ClientScript.RegisterStartupScript(this.GetType(), "CloseMe", "window.close();", true); } I hope someone can help me with this issue. Thank you in advance.

Help - Serious ReportViewer Problem upon upgrade to VS2010

  
I upgraded from VS2008 to VS2010 and none of my reports work! First, I had to replace all the existing ReportViewer controls with new ones.  Then, when the page finally runs, it is stuck in a loop: I see the "Loading..." word and icon while the ReportViewer is loading, then a quick flash, and the page loads again! What's going on?  What am I missing that should obviously be changed to make these ReportViewers work?  These reports were designed in VS2005/2008, and have been in production for several years. Please help - I have a screaming client... (I know, we all do...)

Cursor problem with Stored Procedure and PHP

  
I'm struggling with accessing the result set of a stored procedure using the SQL Server Driver for PHP 1.1. I've already got a few of them running, but this one is special in that it has an XML input parameter which is parsed into a table variable. This table variable is then used within a select statement. When I execute the SP within Management Studio, it runs fine and returns exactly one result set with multiple rows. But when I execute it from PHP, I get the error message "Executing SQL directly; no cursor. ". I've tried every cursor type out there, the only one that doesn't fail is SQLSRV_CURSOR_FORWARD, but with that I'm not getting any results at all. The original SP is enormous, so I have stripped it down as far as I could so it still throws the error. If I remove the bold part, my PHP code executes fine.   USE [testsite] GO SET  ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[getCrossSellingItems]     @InputIds XML AS     SET NOCOUNT ON ;     DECLARE @tblInputIds TABLE     (         Id INT     );     INSERT INTO @tblInputIds (Id)     (         SELECT         T.Item.value('@Id', 'INT') FROM @InputIds.nodes('/Root/Item') AS T(

Problem with cursor and Rebuild indexes

  
(SQL Server 2008 SP1) Hi I have a stored procedure that runs frequentely (uses a cursor), that SP never have errors on execution, but when runs at the same time with a rebuild index task (Database maintenance task on sundays), the stored procedure show the following error: "Could not complete cursor operation because the table schema changed after the cursor was declared" My question: Is there any way to avoid this problem running the two task at the same time? Is this a bug of the SQL Server 2008?JAC

a problem in work with unicode chars in WHERE clause

  

Hello,

I'm designing a website for Persian language

I create a stored procedure that contain :

SELECT @sqlstring = ' SELECT TOP ' + CONVERT(nvarchar,@RowCountUser) + ' Stars FROM SpecialAds WHERE REPLACE(REPLACE(MainGroup,NCHAR(1610),NCHAR(1740)),NCHAR(1603),NCHAR(1705)) = ''REPLACE(REPLACE(' + @MainGroup + ',NCHAR(1610),NCHAR(1740)),NCHAR(1603),NCHAR(1705))'' AND Status = ''verified'' ORDER BY Stars Desc';

EXEC (@sqlstring)

no record is not returned and printed :

Invalid column name : ...

but when I change code above to :

SELECT TOP 5 Stars FROM SpecialA

Distributed Transaction Manager Problem

  

Hi, I have developed a WCF Web Service in .NET 3.5 and I have published it into an IIS 6 server that runs inside a Windows Server 2003 x64.

This Web Service is supposed to interact with a database (Microsoft Sql Server 2008) that is hosted on another computer with Windows Server 2003 server using Distributed Transactions.

However when I ran my caller program I got the error: Communication with the underlying transaction manager has failed.

I have already search the web for this error, and everyone says that I should configure the security parameters on the Component Services application. I have used this application to allow inbound and outbound connections as well as disregard any authentications, but I am still getting the same error.

Also, I have disabled the Windows Firewall of both machines, but the result is still the same.

Can anyone help me?

Thanks,
Komyg


Session Ending or FormsAuthentication problem after the browser tab closing

  

In my project user logs in the site with login.aspx page. Then user is redirecting to homepage (anasayfa.aspx)

User close the browser tab (not the browser) then user tries to open the site again and the page is default.aspx

Default.aspx is useless in my project. Host area needs a default.aspx, index.html like something and I added this default aspx.

I want:

After user close the browser tab, if he/she wants to open the site again, the first page must be his/her homepage not default.aspx

I didn't use asp.net membership provider or anything like that.

This is my login.aspx page code:

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        SqlConnection con = new SqlConnection();
        con.ConnectionString = cnnstr;
        con.Open();
        SqlCommand cmd = con.CreateCommand();
        cmd.CommandText = "Select Roles,UserId,UserName,Sifre,AccountType From ProfilBilgileri Where UserName = @txtLoginUserName AND Sifre = @txtLoginSifre and Durum=1";
        cmd.Parameters.Add("@txtLoginUserName", SqlDbType.NVarCh

problem migrating from vs2008 to vs2010

  

I am trying to evaluate vs2010 and i loaded my project built fully with vs2010

 

while my application runs properly vs2010 does not show the xaml code  for each singlw class

i get the following erros

 

System.TypeInitializationException

The type initializer for 'MS.Internal.Interaction.DesignerResources' threw an exception.

at MS.Internal.GridControl.GridPanelAdorner..ctor(ModelItem gridItem) at MS.Internal.GridControl.GridDesigner..ctor(ModelItem gridItem) at MS.Internal.GridControl.GridDesigner.GetDesigner(ModelItem gridItem) at MS.Internal.GridControl.AlwaysVisibleGridAdornerProvider.Activate(ModelItem item) at Microsoft.Windows.Design.Interaction.AdornerProvider.InvokeActivate(EditingContext context, ModelItem item) at MS.Internal.Features.AdornerProviderFeatureConnector.FeatureProvidersAdded(ModelItem item, IEnumerable`1 extensions) at Microsoft.Windows.Design.Policies.PolicyDrivenFeatureConnector`1.UpdateFeatureProviders() at MS.Internal.Features.PolicyDrivenToolFeatureConnector`1.UpdateCurrentTool(Tool newTool) at MS.Internal.Features.PolicyDrivenToolFeatureConnector`1.<.ctor>b__0(Tool newTool) at Microsoft.Windows.Design.ContextItemManager.SubscribeProxy`1.SubscribeContext(ContextItem item) at Microsoft.Windo

VS2010 - Problem with WinForms generated code

  

Hi:

I'm having trouble with the code that is generated automatically by the WinForms designer, sometimes it generates code that uses the 'components' (IContainer) in the constructors of disposable components and other times it doesn't.

Here is some code. First the code that is generated in a clean new project with just one component on the form:

  private void InitializeComponent()
  {
   this.components = new System.ComponentModel.Container();
   this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
   ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
   this.SuspendLayout();
   // 
   // errorProvider1
   // 
   this.errorProvider1.ContainerControl = this;
   // 
   // Form1
   // 

problem migrating from vs2008 to vs2010

  

I am trying to evaluate vs2010 and i loaded my project built fully with vs2010

 

while my application runs properly vs2010 does not show the xaml code  for each singlw class

i get the following erros

 

System.TypeInitializationException

The type initializer for 'MS.Internal.Interaction.DesignerResources' threw an exception.

at MS.Internal.GridControl.GridPanelAdorner..ctor(ModelItem gridItem) at MS.Internal.GridControl.GridDesigner..ctor(ModelItem gridItem) at MS.Internal.GridControl.GridDesigner.GetDesigner(ModelItem gridItem) at MS.Internal.GridControl.AlwaysVisibleGridAdornerProvider.Activate(ModelItem item) at Microsoft.Windows.Design.Interaction.AdornerProvider.InvokeActivate(EditingContext context, ModelItem item) at MS.Internal.Features.AdornerProviderFeatureConnector.FeatureProvidersAdded(ModelItem item, IEnumerable`1 extensions) at Microsoft.Windows.Design.Policies.PolicyDrivenFeatureConnector`1.UpdateFeatureProviders() at MS.Internal.Features.PolicyDrivenToolFeatureConnector`1.UpdateCurrentTool(Tool newTool) at MS.Internal.Features.PolicyDrivenToolFeatureConnector`1.<.ctor>b__0(Tool newTool) at Microsoft.Windows.Design.ContextItemManager.SubscribeProxy`1.SubscribeContext(ContextItem item) at Microsoft.Windo

Unicode problem from ashx to SQL Express

  

Hi everyone,

i have an sql express db with a table, containing a nvarchar(max) field.

If i add a text in SQL Management Studio, for example, running the query: UPDATE table SET htmlcontent=N'text with special character: SS' WHERE id = 1

everything is working fine!. The special unicode character S is saved into the field.

In ASP i have a generic handler which handles my data communication to and from the database. No matter what i try there, the S char is not accepted and

changed into a question mark. I have tried several things in SQL:

- stored proc with sp_executesql and parameters

- hardcoded query in the ashx file.. 

            sqlStr = "UPDATE ELEMENTS SET htmlcontent=N'" & myCleanResult & "' WHERE id=" & id

            connStringSQL = New SqlConnection(mySqlConnection)

            Dim myAdapter1 As New SqlCommand(sqlStr, connStringSQL)

            myAdapter1.Connection.Open()

            result = myAdapter1.ExecuteScalar()

            myAdapter1.Connection.Close()

Problem with Exporting RDLC to PDF while Using Unicode(Marathi)

  

I Have An RDLC Report in ASP.net 2.0  Application.and SQl Server2008

I have installed IndicaIME for Marathi for unicode.

When I export It in to PDF that will not display correct (Word In Marathi Format)  I USe Ariel Unicode Font
But it  will show some  extra character display with word

e.g Instead of displaying "Kishor" it will display "kshir" in marathi
What I have do ? For that just give link or code To export RDLC report in PDF ?


Path Too Long Problem. Accessing filenames longer than 260 chars using unicode and kernel32.dll.

  
I found this article a few weeks ago that provided a way to access files and folders past the 260 char length:

http://blogs.msdn.com/bclteam/archive/2007/03/26/long-paths-in-net-part-2-of-3-long-path-workarounds-kim-hamilton.aspx

I put the code from "Finding Files and Folders" in a dll and wrote an app in vb accessing these functions.  However, the code randomly breaks on a specific kernel32 function call. 

I noticed that if the search finds a file (not folder) longer than 12 to 14 characters then it breaks on occasion.  This is strange because I would think it would either never break or always break.

Here's the line where it breaks:

// find next

found = FindNextFile(findHandle, out findData);


Any ideas?


Stuart

problem with sqljdbc2.0 xa transaction with 2 xaresources

  
Hi, I'm having some trouble executing a transaction with 2 XAResources.  My environment:

SERVER
OS: Microsoft Windows NT 6.0 (6001)
Platform: NT INTEL X86
SQL Server Ver: 9.00.3068.00

CLIENT
OS: Linux 2.6.24
JDK: java-6-sun-1.6.0.06
JDBC driver: sqljdbc4.jar from sqljdbc_2.0

I followed the steps outlined at http://msdn.microsoft.com/en-us/library/aa342335(SQL.90).aspx to configure SQL Server and DTC for XA transactions and was able to successfully run the example code for a database owned by the user xauser that was granted permissions on the master table and granted membership to the SqlJDBCXAUser role.

To test writing to 2 databases in an XA transaction, I did the following:

1. created 2 databases, XA1 and XA2, on the server owned by the user xauser
2. created tables test1(name varchar(32)) on XA1 and test2(name varchar(32)) on XA2
3. wrote the following code:

Unicode (Marathi) Font problem in SSRS

  

I Have An RDLC Report in ASP.net 2.0  Application.

When I export It in to PDF that will not display correct (Word In Marathi Format) if I USe Ariel Unicode Font
it will show some  extra character display with word
What I have do ? For that just give link or code To export RDLC report in PDF ?


I also tried iTextsharp (Third party tool to generate PDF) but when it genrate PDF  marathi Characters are not displaying. It shows marathi as  blank space.




Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend