This is a mirror of official site: http://jasper-net.blogspot.com/

Prius gets optional underhood, zombie-deterring noisemaker, sounds appropriately futuristic (video)

| Thursday, August 26, 2010
Prius gets optional underhood, zombie-deterring noisemaker, sounds appropriately futuristic (video)
Electric vehicles and hybrids are here to save the environment (or at least kill your fuel bill), but if you listen to some people they're also here to mow down our pedestrians thanks to their ninja-like ways. Nissan's Leaf has already gone the way of sci-fi by offering a Blade Runner-inspired exterior soundtrackto make sidewalk replicants take notice, and now the Prius is joining in on the fun with its own under-hood speaker system. Curiously, this one will be optional, Toyota apparently expecting that purchasers are so philanthropically minded that they'll pay an extra 12,600 yen (about $150) to protect poor pedestrians. You can see how it's supposed to work in the image above, in which a Prius is shown emitting sound waves to deter a toupee-wearing zombie. But, if you'd rather watch a flashy presentation and hear it for yourself, check out the thrilling video after the break. It'll make you wish your auto sounded like a hovercar. 

Posted via email from .NET Info

VistaSwitcher is a beautiful Alt-Tab replacement

|
vistaswitcher-4705.jpg

VistaSwitcher is a beautiful Alt-Tab replacement. It's aimed mainly at Windows Vista and 7, but it also works under Windows XP.

You get a huge thumbnail of the destination window; it's far larger than the one that comes with the "stock" Alt-Tab. Another neat feature lets you Alt-Tab between the windows of just one application. It's kind of like pressing Win+[number] in Windows 7, but you don't have to look at the taskbar and count the icons in order to see what the number is for the application that you want to switch to. That's done using Alt+` (backtick) by default, but it's configurable.

Read more: DownloadSquad
Read more: VistaSwitcher

Posted via email from .NET Info

Facebook Says It Owns "Book"

|
The Chicago Tribune is reporting that Facebook has sued a tiny start-up called Teachbook.com over the use of 'book' in its name. The start-up, which has two employees, aims to provide tools for teachers to manage their classrooms and share lesson plans and other resources. 'Effectively they're bombing a mosquito here, and we're not sure why they want to do that,' Teachbook.com co-director Greg Shrader told the Tribune. Facebook said its use of 'book' in its name is 'highly distinctive in the context of online communities and networking websites.' Facebook apparently is alleging that no other online 'network of people' can use the word 'book' in its name without violating its trademark

Read more: Slashdot

Posted via email from .NET Info

Download 53 languages for Windows XP

|
Previously we have had a great page for downloading the latest language Interface packs for Windows 7 and Windows Vista, well we now have one for 53 available languages for Windows XP as well for all those users still running it.

“You can download and install additional languages to view Windows XP menus, dialog boxes, and other user interface items in your preferred language. Additional languages will work only with a genuine copy of Windows.

Language Interface Packs (LIPs), which provide a translated version of the most widely used dialog boxes, menu items, and help content, can be installed over any edition of Windows XP. You can download Language Interface Packs from the Microsoft Download Center by using the links below. To install one, you will need to have the required parent language installed on your PC. “

Read more: I'm PC
Read more: Download 53 languages for Windows XP

Posted via email from .NET Info

Help! !clrstack is not showing any method names

|
From time to time I get questions about missing method names in the sos !clrstack output, like this:

0:019> !clrstack

OS Thread Id: 0x5d0 (19)

ESP      EIP
0f31f340 7c80bef7 [HelperMethodFrame_1OBJ: 0f31f340]
0f31f398 1449167a
0f31f3c4 144915e6
0f31f3f4 10d81b48
0f31f4b4 793e25cf
0f31f4bc 79366b3d
0f31f4d4 793e2734
0f31f4e8 793e26ac
0f31f678 79e7c0e3 [GCFrame: 0f31f678]

Read more: If broken it is, fix it you should

Posted via email from .NET Info

Boyer–Moore string search algorithm

|
The Boyer–Moore string search algorithm is a particularly efficient string searching algorithm, and it has been the standard benchmark for the practical string search literature.[1] It was developed by Bob Boyer and J Strother Moore in 1977. The algorithm preprocesses the target string (key) that is being searched for, but not the string being searched in (unlike some algorithms that preprocess the string to be searched and can then amortize the expense of the preprocessing by searching repeatedly). The execution time of the Boyer-Moore algorithm, while still linear in the size of the string being searched, can have a significantly lower constant factor than many other search algorithms: it doesn't need to check every character of the string to be searched, but rather skips over some of them. Generally the algorithm gets faster as the key being searched for becomes longer. Its efficiency derives from the fact that with each unsuccessful attempt to find a match between the search string and the text it's searching, it uses the information gained from that attempt to rule out as many positions of the text as possible where the string cannot match.

Read more: Wikipedia

Posted via email from .NET Info

35 Best Free Chrome Extensions for Web Developers

|
It will take an awful lot of effort on Google’s part to tear most web developers away from their beloved Firefox, but with the number of web-developer-friendly extensions for Chrome on the rise, developers in increasing numbers are giving Chrome a try and some of them are not looking back.
Chrome’s faster than Firefox, uses less CPU and comes with built-in Developer Tools (accessible by pressing Ctrl+Shift+I). Even if you’re not ready to abandon Firefox yet, make sure you give Chrome a chance with the outstanding extensions below. Chrome’s improving rapidly and early adopters will benefit most.

1. MeasureIt!
2. Pendule
3. BuiltWith Technology Profiler
4. Flashblock
5. Lorem Ipsum Generator
6. iMacros for Chrome
7. Xmarks Bookmarks and Password Sync

Read more: WebAppers

Posted via email from .NET Info

Inspecting Local Root Lifetime

|
The .NET GC determines which objects are reachable by constructing a graph of references, starting from a set of roots. One type of roots is local references that are stored on thread stacks. The GC relies on the JIT to supply it with information about the local variables in each active method, and uses that information to determine whether a root should be traversed.

When all optimizations are enabled, the JIT and GC cooperate so that local roots are relevant only as long as the local variable is still going to be used. This is a source of strange bugs—two of them are the Timer bug and the finalization race condition.

Why am I telling you all this? Well, it turns out there’s a cool SOS command called !GCInfo that can give you information on local root relevance within a method. In other words, it can tell you when (in terms of instructions) a local variable ceases to be an active local root.

For the sake of simplicity, let’s consider Debug builds only and the following method:

static void Main(string[] args)
{
   string s = "Hello World";
   Console.ReadLine();
}
Because of the Debug build, the local variable s is not going to be optimized away. Furthermore, its lifetime should extend until the end of the method, and not just the first line. Let’s verify this:

0:000> !CLRStack
OS Thread Id: 0x1f04 (0)
ESP       EIP    
[…edited for brevity…]
003ced00 704c9fbb System.IO.StreamReader.ReadBuffer()
003ced14 704c9e0c System.IO.StreamReader.ReadLine()
003ced34 70a5dd3d System.IO.TextReader+SyncTextReader.ReadLine()
003ced40 709a31c7 System.Console.ReadLine()
003ced48 005c009b FreakishTimerBug.Program.Main()

Read more: All Your Base Are Belong To Us

Posted via email from .NET Info

Awesomeness reminders

|
How great would you feel if a real person called you every day to tell you, "You're Awesome!"?

With AwesomenessReminders, a real person will call you every day to tell you how much you rock. If you're not around, we will leave you a voicemail.

  • Makes for a great gift - Give AwesomenessReminders to yourself, a friend, or your child
  • Super Fun - Our calls will leave you beaming and ready to take on your day.
  • Only $10/month - Cheaper than the cost of a movie ticket and way cheaper than the cost of a life coach. (Calls to countries other than USA and Canada cost $20/month)

Read more: Awesomeness reminders

Posted via email from .NET Info

MVC Sample Project Demonstrating multiple techniques

|
Project Description
This project represents my 4th ASP.NET/MVC project on which I was working. Clients requirements were two forms with a lot of business rules/calculations which would be available to the public; a secure logon and input table and backing database to put data which would be used for certain calculations; the user form needed to provide feedback on calculations as they typed (ajax/Json). I built this project out in approximately 70 hours all in (including data entry, meetings and other non-coding tasks)

Why I put this project out here was to demonstrate various tools, patterns and techniques that might help you get your arms around MVC.

Some of those things include:

  • Passing complex object graphs and having the default ModelBinder properly map them
  • Using nested UI hints to promote uniformity and code re-use
  • Using Automapper to wire up dependancies on the ViewModel pattern
  • Using StructureMap to enforce classes are only accessed via interfaces
  • Writing small, terse functions in such a way that a subject matter expert could perform a code review
  • Unit tests on all calculations
  • Using Ajax/JSon
  • JQuery & CSS manipulation
  • ASP.NET Membership Provider
  • Telerik Grid control
  • Caching 

Read more: Codeplex

Posted via email from .NET Info

SQL Replication Agent will RETRY for 4085 Years

|
Have you noticed the SQL Server Agent Job RETRY  is set to 2147?  Well it is not, the dialog window just cuts off the rest of the digits.

1817.image_5F00_thumb_5F00_7BA1AE8A.png

Actually the Replication Agent are set by default to retry 2147483647 times, once every minute.  That is over 4000 years!

2147483647 = 35791394 Hours = 1491308 Days = 4085 Years.

How does this impact Replication?

Should a Replication Agent fail and the agent be configured for “continuous”, then agent will not report back to SQL Agent Service, but will wait 1 minute, then try again for 4000 years.  Any ALTERTS placed with SQL Agent for “job failure” will not get called.

Read more: REPLTalk covers Using and Tuning SQL Replication

Posted via email from .NET Info

Microsoft Dynamic IP Restrictions for IIS 7.0

|
The Dynamic IP Restrictions Extension for IIS provides IT Professionals and Hosters a configurable module that helps mitigate or block Denial of Service Attacks or cracking of passwords through brute-force by temporarily blocking Internet Protocol (IP) addresses of HTTP clients who follow a pattern that could be conducive to one of such attacks. This module can be configured such that the analysis and blocking could be done at the Web Server or the Web Site level. The module includes the following features:

  • Seamless integration into IIS 7.0 Manager.
  • Dynamically blocking of requests from IP address based on either of the following criteria:
  • The number of concurrent requests.
  • The number of requests over a period of time.
  • Blocking of requests can be configured at either site or server level.
  • Configurable deny actions allows IT Administrators to specify what response would be returned to the client. The module support return status codes 403, 404 or blocking the requests entirely.
  • Support for IPv6 addresses.
  • Support for web servers behind a proxy or firewall.

  • Read more: MS Download x86, x64

    Posted via email from .NET Info

    New Themes !

    |
    Our friends over on the Microsoft Office 2010 Engineering blog recently announced some great new features in the Excel, Word, and PowerPoint Web Apps. Among the new goodies are some brand new themes that you’ll find in the Select Theme dialog when you create a new presentation on SkyDrive. We’ve also re-organized the gallery in a way that we believe will better suit your needs:

    4212.clip_5F00_image001_5F00_thumb_5F00_2A7E52AA.png

    Read more: The PowerPoint Team Blog

    Posted via email from .NET Info

    Five Best Music Discovery Services

    | Wednesday, August 25, 2010
    Streaming your existing music collection is a neat trick, but music discovery, by comparison, is a much more impressive feat. Never before has it been easier for the average person to find and listen to such a diverse and wide-reaching body of music. This week we're taking a look at the top five music discovery services used by Lifehacker readers to find new artists, albums, and genres to keep their playlists fresh. Check out the Hive Five Call for Contenders to see the original comments that make up the raw list of nominations below.

    Pandora (Web-based; Basic: Free/Premium: $36 per year)
    The Hype Machine (Web-based, Free)
    Grooveshark (Web-based, Free)
    (more..)


    Read more: Lifehacker

    Posted via email from .NET Info

    Nature Sounds is an awesome ambient noise generator

    |
    naturesounds-2642.jpg

       Usually, when I need to focus in a distracting environment I just put on my earbuds and head over to SimplyNoise. But SimplyNoise is a bit too simple at times; it just generates a "wall" of white, brown, or pink noise. It can oscillate the volume a little bit, but that's just about it. That's not a flaw – it's how SimplyNoise was designed.

    But what if I want some atmosphere to go with my custom noise? What if I want it to have a certain "vibe," or I want it to inspire me? Plus, some people simply dislike the monotony of a noise generator.

    Introducing Nature Sounds. This beautifully simple Flash tool provides you with four audio channels. You populate each channel with a looping sample that you can choose from a vast palette. You've got sounds of whales, the beach, fire crackling, crickets, a heartbeat, drums thumping in the distance, etc. The palette is extensive.

    Read more: DownloadSquad

    Posted via email from .NET Info

    Rustock Botnet Responsible For 40% of Spam

    |
    More than 40 percent of the world's spam is coming from a single network of computers that computer security experts continue to battle, according to new statistics from Symantec's MessageLabs' division. The Rustock botnet has shrunk since April, when about 2.5 million computers were infected with its malicious software that sent about 43 billion spam e-mails per day. Much of it is pharmaceutical spam

    Read more: Slashdot

    Posted via email from .NET Info

    SQL Server - Understanding the behavior of @@TRANCOUNT when querying from a client application

    |
    As you know, @@TRANCOUNT is used to inform you about the number of live transactions active at point. If you want to retrieve it's value using an application, you should be careful about the behaviour of the returned value.

    Let us consider the procedure

    create procedure get_count
    as
    select @@TRANCOUNT as trancount

    Consider the VB code that calls the procedure

    Private Sub Form_Load()
    Dim con As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    con.Open "connection string"
    con.BeginTrans
    Set rs = con.Execute("exec get_count")
    MsgBox rs("trancount")
    con.CommitTrans
    End Sub

    Read more: Beyond Relational

    Posted via email from .NET Info

    How you make a dll file which contains the icon set like "SHELL32.dll"

    |
    Icon16.gif

    1. Open New project as Class Library
    2. After Opening the file will show like:
    3. Now open a file
    4. Native ResourceTemplete File
    5. Then Add resource
    6. Import Icon
    7. Now again add resource for set version Information

    Read more: C# Corner

    Posted via email from .NET Info

    Disable a submit button during Post Back

    |
    Most of the programmers facing the issue of, how to handle multiple button submits by user at the same time. This article will help you with a small sample. You can restrict multiple button submission by using method ClientScript.GetPostBackEventReference (for more information, please Bing/Google).

    #source

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <ContentTemplate>
        <asp:Button ID="Button1" Text="Submit" runat="server" onclick="Button1_Click" />
     </ContentTemplate>
    </asp:UpdatePanel><br />
    <asp:Button ID="Button2" Text="Save (without UpdatePanel)" runat="server" onclick="Button1_Click" />
    <br /><br />
    <asp:Button ID="Button3" Text="Save (with showing alert)" runat="server" onclick="Button1_Click" />

    #code behind

    protected void Page_Load(object sender, EventArgs e)
    {
      String sString = "this.style.backgroundColor='skyblue'; this.style.color='Red'; this.value='Saving Records... Please Wait...'; this.disabled = true; {0};";
      String sHandler = String.Format(sString, this.ClientScript.GetPostBackEventReference(Button1,  String.Empty));
      Button1.Attributes.Add("onclick", sHandler);
      sHandler = "";
      sHandler = String.Format(sString, this.ClientScript.GetPostBackEventReference(Button2,  String.Empty));
      Button2.Attributes.Add("onclick", sHandler);
      sHandler = "";
      sHandler = String.Format(sString, this.ClientScript.GetPostBackEventReference(Button3, String.Empty));
      Button3.Attributes.Add("onclick", "javascript:alert('hello');" + sHandler);
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
      System.Threading.Thread.Sleep(5000);
    }

    Note:

    Second button will do a full post back. Third button, we can even attach JavaScript validation check before sHandler.

    Read more: C# Corner

    Posted via email from .NET Info

    Synchronizing group row headers with column headers in Silverlight DataGrid

    |
    Grouping in the DataGrid in Silverlight is quite easy. What is not so obvious is how to change the caption of the column name on the group row. It turns out that you could use the LoadingRowGroup of the DataGrid:

    theGrid.LoadingRowGroup += (s, e) =>
    {
       e.RowGroupHeader.PropertyName = "A custom caption";
    }

    The original value of the e.RowGroupHeader.PropertyName is the PropertyName of the PropertyGroupDescription. Using this value the column header can be determined:

    private string GetColumnCaption(DataGrid grid, string columnName)
    {
       if (grid == null || String.IsNullOrEmpty(columnName))
       {
           return null;
       }

       foreach (DataGridBoundColumn column in grid.Columns)
       {
           if (column == null)
           {
               continue;
           }
           Binding binding = column.Binding;
           if (binding == null)
           {
               continue;
           }
           if (binding.Path.Path == columnName)
           {
               return Convert.ToString(column.Header);
           }
       }

       return null;
    }

    Read more: On developing Pochet.NET

    Posted via email from .NET Info

    Database assisted denormalization

    |
    Let us say that I have the homepage of the application, where we display Blogs with their Post count, using the following query:

    select
       dbo.Blogs.Id,
       dbo.Blogs.Title,
       dbo.Blogs.Subtitle,
       (select COUNT(*) from Posts where Posts.BlogId = Blogs.Id) as PostCount
    from dbo.Blogs

    Given what I think thoughts of denormalization, and read vs. write costs, it seems a little wasteful to run the aggregate all the time.

    I can always add a PostCount property to the Blogs table, but that would require me to manage that myself, and I thought that I might see whatever the database can do it for me.

    This isn’t a conclusive post, it details what I tried, and what I think is happening, but it isn’t the end all be all. Moreover, I run my tests on SQL Server 2008 R2 only, not on anything else. I would like to hear what you think of this.

    My first thought was to create this as a persisted computed column:

    ALTER TABLE Blogs
    ADD PostCount AS (select COUNT(*) from Posts where Posts.BlogId = Blogs.Id) PERSISTED

    But you can’t create computed columns that uses subqueries. I would understand easier why not if it was only for persisted computed columns, because that would give the database a hell of time figuring out when that computed column needs to be updated, but I am actually surprised that normal computed columns aren’t supporting subqueries.

    Given that my first attempt failed, I decided to try to create a materialized view for the data that I needed. Materialized views in SQL Server are called indexed views, There are several things to note here. You can’t use subqueries here either (likely because the DB couldn’t figure which row in the index to update if you were using subqueries), but have to use joins.

    Read more: Ayende @ Rahien

    Posted via email from .NET Info

    Developing A ‘touchy’ Twitter browser – Using Visual Studio 2010 + Surface Toolkit for Windows Touch devices beta

    |
    image_thumb%5B3%5D.png?imgmax=800

      Microsoft recently released Microsoft Surface Toolkit for Windows Touch Beta. It seems that the next version of Microsoft Surface will provide a development model that is consistent along the lines of WPF and Silverlight – Promising infact..
      The Microsoft Surface Toolkit for Windows Touch Beta is a set of controls, APIs, templates, sample applications and documentation currently available for Surface developers. With the .NET Framework 4.0, Windows Presentation Framework 4.0 (WPF), and this toolkit, Windows Touch developers can quickly and consistently create advanced multitouch applications for Windows Touch PCs. This toolkit also provides a jump-start for Surface application developers to prepare for the next version of Microsoft Surface. Use it to take advantage of the innovative Surface technology and user interface to develop your own rich and intuitive multitouch experiences for a variety of Windows Touch devices.

      In this post, I’ll explore how to install the toolkit and develop a simple Twitter browser application using the toolkit.

    Read more: amazedsaint's .net journal

    Posted via email from .NET Info

    REBOL: Obscure Programming Language of the Month

    |
    REBOL (Relative Expression Based Object Language) is a cross-platform data exchange language and dynamic programming language originally designed for network communications and distributed computing.  More recently, REBOL has been used to program client and server-side Internet applications, database applications, and multimedia applications.

    REBOL Design
    REBOL introduces the concept of dialecting, which uses small, optimized, domain-specific languages to solve specific code and data problems.  According to Sassenrath, “Although [REBOL] can be used for programming, writing functions, and performing processes, its greatest strength is the ability to easily create domain-specific languages or dialects.”

    Dialects can define business rules and graphical presentation.  Programmers can define their own dialects, reusing any existing REBOL word and giving it a specific meaning in that dialect.

    Wikipedia provides an example of REBOL dialects:  “In the data exchange dialect, return is just a word not having any specific meaning.  In the do dialect, return is a global variable referring to a native function passing back a function result value.  In the visual interface dialect, return is a keyword causing the layout engine to simulate a carriage return.”

    REBOL syntax is free-form and does not require specific positioning.  However, indentation is recommended to help convey the program structure to humans.  Note that different dialects may have different syntax.

    “Hello World” in REBOL

    view/title layout [h1 250x120 center middle "Hello world !"] "Hello world !"

    Read more: DevTopics

    Read more: Rebol

    Posted via email from .NET Info

    Do NOT remove the reference to System.Core from your VS2010 Project

    |
    One of the things I routinely do when adding a new class library project, is remove all references and just add them back in as I need them. That is NOT a good idea for Visual Studio 2010. When I DID need System.Core, and went to add it back, this is what I got:

    "A reference to 'System.Core' could not be added. This component is automatically referenced..."

    After some Googling I found this article:

    http://connect.microsoft.com/VisualStudio/feedback/details/525663/cannot-remove-system-core-dll-reference-from-a-vs2010-project

    It tells you to add it back manually. Here is the part that needs back in the project file. After the last PropertyGroup node, add this node:

     <ItemGroup>
       <Reference Include="System.Core" />
     </ItemGroup>

    You should be good to go again.

    Read more: Lee Brandt's Blog

    Posted via email from .NET Info

    Welcome to WinAppDbg !

    |
    The WinAppDbg python module allows developers to quickly code instrumentation scripts in Python under a Windows environment.

    It uses ctypes to wrap many Win32 API calls related to debugging, and provides a powerful abstraction layer to manipulate threads, libraries and processes, attach your script as a debugger, trace execution, hook API calls, handle events in your debugee and set breakpoints of different kinds (code, hardware and memory). Additionally it has no native code at all, making it easier to maintain or modify than other debuggers on Windows.

    The intended audience are QA engineers and software security auditors wishing to test or fuzz Windows applications with quickly coded Python scripts. Several ready to use utilities are shipped and can be used for this purposes.

    Current features also include disassembling x86 native code (using the diStorm disassembler), debugging multiple processes simultaneously and produce a detailed log of application crashes, useful for fuzzing and automated testing.

    Read more: WinAppDbg

    Posted via email from .NET Info

    Introduction to Java programming

    | Tuesday, August 24, 2010
       This two-part tutorial introduces the structure, syntax, and programming paradigm of the Java™ language and platform. You'll learn the Java syntax you are most likely to encounter professionally and Java programming idioms you can use to build robust, maintainable Java applications. In Part 1, J. Steven Perry guides you through the essentials of object-oriented programming on the Java platform, including fundamental Java syntax and its use. You'll get started with creating Java objects and adding behavior to them, and conclude with an introduction to the Java Collections Framework, with considerable ground covered in between.

    Read more: IBM Part 1

    Posted via email from .NET Info

    Google Translate Kit

    |
    It is a sub-project divided from Citiport project. Google Translation Kit is an implementation for Google Translation in C#, also supporting cache and data writing to any media, log file, database or...

    compatible with Mono 2.6

    Very basic sample:

  • Translator gt = new Translator();  
  • /*using cache*/  
  • DemoWriter dw = new DemoWriter();  
  • gt.KeyGen = new SimpleKeyGen();  
  • gt.CacheManager = new SimleCacheManager();  
  • gt.Writer = dw;  
  • Translator.TranslatedPost post = gt.GetTranslatedPost("Hello world", LanguageConst.ENGLISH, LanguageConst.CHINESE);  
  • Translator.TranslatedPost post2 = gt.GetTranslatedPost("I'm Jeff", LanguageConst.ENGLISH, LanguageConst.CHINESE);  
  • this.result.InnerHtml = "<p>" + post.text +post2.text+ "</p>";  
  • dw.WriteToFile();  
  • Read more: Codeplex

    Posted via email from .NET Info

    T-SQL Israeli CardID Checker / ת.ז. ישראלית

    |
    Once in a while I come across code that I didn’t fins in the internet … mainly because it’s for local use ;)
    This is one of these times :)

    This code is the T-SQL version of the algorithm  that checks the given Israeli CardID , and adds a leading Zero , if need one ( like in my personal case ) , and calculates the “Check Number” ( SIFRAT BIKORET ) , if it’s missing.

    I needed this for an SSIS Package that loaded monthly information needed for my SharePoint Content ;)

    BTW , there might be a better way to code this , but i’m no T-SQL expert :)

  • ALTER FUNCTION [dbo].[fn_FixUpCardID]   
  •     (   
  •     @CardID VARCHAR(50)   
  •     )   
  • RETURNS VARCHAR(50)   
  • AS   
  •     BEGIN   
  •     DECLARE @CardID_1 INT   
  •     DECLARE @CardID_2 INT      
  •     DECLARE @CardID_3 INT   
  •     DECLARE @CardID_4 INT   
  •     DECLARE @CardID_5 INT   
  •     DECLARE @CardID_6 INT   
  •     DECLARE @CardID_7 INT   
  •     DECLARE @CardID_8 INT   
  •     DECLARE @CardID_9 INT   
  •     DECLARE @CardID_1_CalcVal INT   
  •     DECLARE @CardID_2_CalcVal INT      
  •     DECLARE @CardID_3_CalcVal INT   
  •     DECLARE @CardID_4_CalcVal INT   
  • Posted via email from .NET Info