SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software Kodyaz Development Resources
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Vista, etc.

Tuba



  • Alter tables with constraints

    In order to alter your tables that already have primary or  foreign key constraints, you can simplye prepare the drop and add constraint scripts with the help of SQL Enterprise Manager.

    Simply select the tables you want to alter and by right clicking, choose "All Tasks" and "Generate SQL Scripts".

    From the "Options" tab and "Table Scripting Options" section, select "Script PRIMARY Keys, FOREIGN Keys... "

    The add and drop scripts will be prepared for you so that you can place your "ALTER table X ALTER column Y" script within the DROP and ADD script blocks.

  • Character problem in Excel Export

    When you prepare your data to export to Excel and use the following line in your code

    Response.ContentType = "application/vnd.ms-excel"

    You might need to add the following line as well

    Response.ContentEncoding = System.Text.Encoding.UTF7

    so that you can prevent having character related problems

  • Error when you update a web service reference

    While working on the same web project that contains web services with your team, there will exist some chek-in check-out matters.

    The error messages like "There was an error downloading URL- The request failed with the error message ..." are the ones you can get when you try to update a web service reference used by a project whode project file is checked-out by another user.

    In order to update a web service reference in your web project, you need to have the project file and the web service reference checked-in.

  • The project you are trying to open is a Web project. You need to open it by specifying its URL path.

    I happened to get this error because the file "ProjectName.vbproj.webinfo" file was missing in my project folder.

    I have my project under source control . The source control does not have the webinfo file for you to get into your project. This is because this file keeps track of a project's virtual root location and it can be different for different people working on the same project.  So when you have this file in your project folder you don't need to add the project to your solution by using “Add Existing Project From Web”, you can use “Add Existing Project” with Visual Studio.

    Here is the content of the file:

    <VisualStudioUNCWeb>

    <Web URLPath = "http://localhost/TubaWebServices/TubaWebServices.vbproj" />

    </VisualStudioUNCWeb>

     

  • JIT Debugging failed with the following error: Access is denied

    When you get an error, it is easier to blame the operating system, the IIS or your development group. But wait and take a look inside. Did this error occur after you changed some coding and just on the particular page you have made the change on?

    This error usually happens when there is a loop in you code that the debugger gets messed up.

    There can be some permission settings to check but first check your code.

     

  • BULK INSERT Unicode Problem Fades Away

    Using "Bulk Insert" in SQL 2000 with files containing data with Unicode characters often cause problems.

    I tried to import data from a Unicode file to a nvarchar field using a format file with SQLNCHAR type. It ended up with no data transfer.

    Here are the lines from my tries:

    From .fmt file : 4  SQLNCHAR  0  255 "\r\n" 4  Text LATIN1_General_CI_AS

    From Create table script: [Text] nvarchar (255)

    TransactSQL: BULK INSERT    Tuba TEMP   FROM
       '\\1994\IRIS\Queue\file10_10.txt'   WITH    (FORMATFILE = '\\1994\IRIS\Format\bcp.fmt' ,  FIRSTROW = 1 ,  ROWTERMINATOR = '' )

    Simply changing the column type to ntext and using SQLCHAR in the format file, the data was finally transfered happily to my SQL Table.

More Posts « Previous page




This Blog



Add to Google

Syndication
Copyright © 2004 - 2014 Eralper Yilmaz. All rights reserved.
Community Server by Telligent Systems