Pages by tag

16 pages are tagged with Coding Database

To check more tags, click here  click to open

ASP.Net Membership mdf setup without ASPNETDB.mdf


Microsoft's ASP.Net Membership system isn't world-class bulletproof and has quite a few limitations so you'd not want to use it as-is for projects where money is involved, but for a lot of projects it fits the bill fine.

The only problem is that most of us get it into a project by banging on it and swearing a lot... then we forget about the pain till the next time.

This last time when my brain started saying 'next time I won't have to use this thing'... I figured I'd be smarter and write it down.  Also, because I am getting sick and tired of simple yes/no questions being answered by showing a YouTube video, I decided that I won't even show a single darned image in these steps.


Persisted Coalescence


I knew PERSISTED.  I knew COALESCE.  Dang though, I hadn't thought to put them together!

ALTER TABLE myPersonTable
    ADD FullName AS  (
REPLACE(RTrim(Coalesce(Title + ' ','') 
+ Coalesce(FirstName + ' ','') 
+ Coalesce(MiddleName + ' ', '')
+ Coalesce(LastName + ' ', '')
+ Coalesce(Suffix, '')
+ Coalesce(NULL, '')), '  ', ' ') ) PERSISTED

WROX Professional ASP.Net MVC3 review


Wow.  If this is what a "Professional" is now expected to know, I'm sad for .Net.


The magic datepart technique


"Hi Smith! Remember the project that needed to allow entry of date values but the users couldn't be forced to any specific precision?  I have the same requirement and can't remember how you did the precision metadata, we're on SQL Server, not Oracle, was it a PLSQL ability?"

:)  Uh... you're thinkin' too hard, budd.  All I did was add a sibling column to the DATE field and packed it with the id/enumval of the desired datepart precision.  

I gotta laugh about my saying that you're thinking too hard, it's ironic...


Country Code Table


"Hey Smith!  Got that country code table SQL?"

Yeah, right here.


featured in Mike Gunderloy's Sybex Press book ADO AND ADO.NET Programming"

If you're a big iron RDBMS coder, consider that dynamically created Jet files as middleware have come in very handy for lots of folks using Oracle and SQLServer in the enterprise, so this is not just a power for those using Jet as a core source.

Years ago we noticed that we were spending more time writing DAO object code than working with data. So we took an afternoon and wrote the first DBCodeCreator. It saved us lot of time and other devs seemed to like it so we started giving it away on the sitelett.

Oracle to Excel? No sweat


One of our most popular topics is the Export To Anything technique which allows you to convert and export any ISAM without automation or even having the source or destination native programs on the user's machines.  Need to turn Jet data into Lotus 123?  It is a simple issue of using an undocumented JetSQL query syntax and running the SQL off of the Execute method of a DAO database or ADO connection object.

But Oracle, Sybase, DB2 and SQLServer developers had thought themselves out in the cold on this .. figuring that they have to bite the bullet and pay the silly prices for 3rd party data pumps or (egad!) add full blown MS-Access installation to their systems and use it's not-so-fast ODBC linking in order to use this powerful technique.

DataLink tips


I find it interesting how many folks have never heard of Datalink files or only know of them as part of the VisualStudio wizards.

A data link is nothing more than a file-based connection like a file-based DSN; what's more making a data link is as easy as right-clicking on your desktop, choosing to create a new text file then changing the file's extension from .txt to .udl. Voila, power!

I was not at first a fan of using UDLs. But...

Flatfile fixer and dumper


Some things in development are not sexy, in fact they are downright boring, but you have to just pound out the code and get the job done before you can move on to the real cool, shiny and new stuff.

Consider the lowly mainframe text file dump. A big old block of characters that one corporation sticks on an FTP site and another one has to pickup and deal with.

It is true that one beautiful day in the future such files will be all XML and BIZTALK will have put that robber baron EDI out of business but till then, and unfortunately it *is* a ways off, corporate developers still have do deal with those cobol-born chunks of ASCII.

The first time you figured out a badly documented file format and finished the hard-coded parsing routine you have to admit that you felt darned proud of yourself. But the day that the format changed the thrill waned, and a few new files later the whole process was nothing but a boring chore.

Treat Flatfiles like Relationals


Text as Relational Database? You Bet!

Download the fully commented example VB5 project to see how to get around the restrictions of using these ISAM formats as relational multi-table datasources with DAO. 

The demo shows how to import multiple text files into a JET file using SQL via advanced (but easy) DAO techniques and the "Export To Anything" code.;

Using these techniques you'll ...

<< 1 2 >> 
who is smith     contact smith     rss feed
Since 1997 a place for my stuff, and it if helps you too then all the better