Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple Words Replace (Hit highlighting)

0 views
Skip to first unread message

Jason Davis

unread,
Sep 6, 2003, 3:46:24 AM9/6/03
to
Hi there,

Does anyone know of a user function in mssql2k that will allow me to pass a
delimted string of keywords, and have a column returned with those keywords
highlighted.

for example:

replaceit('word1,word2,word3',column_name)
gives ===>
foo <b>word1</b> fooit foobla <b>word2</b>

the number of "keywords" is not always 3, obviouslly, so I need some kind of
loop here, no?

Thanks!

==
Jas.


Hilary Cotter

unread,
Sep 6, 2003, 11:34:01 AM9/6/03
to
are you looking for something like what you see in Google, or in the total
row/column?

In Google, they go through the entire doc looking for hits and then return
the preceding 5 words then the highlighted match, and then the next 5 words.

Or are you interested in tagging the entire text column for your row?

Hilary

"Jason Davis" <jasond...@hotmail.com> wrote in message
news:O3ELosEd...@tk2msftngp13.phx.gbl...

Jason Davis

unread,
Sep 6, 2003, 11:52:22 AM9/6/03
to
Hilary hi,

> Or are you interested in tagging the entire text column for your row?

This is just fine. I need the entire text to be returned, highlighted.

Although "Google-like" may work well for other tasks I have.

Thanks!

=-
Jas.

John Kane

unread,
Sep 6, 2003, 12:03:12 PM9/6/03
to
Jason,
To the best of my knowledge, there is no user-defined function (UDF) for
this functionality and I'm very sure that a UDF for this functionality would
be very much welcomed!

This could be done much like a standard "search & replace" UDF. Yes, you
would have to add an additional WHILE loop for each keyword (or phrase?)
until you hit a max number of allowed keywords or phrases (within double
quotes?).

If you develop one, let us know!
Regards,
John

"Jason Davis" <jasond...@hotmail.com> wrote in message
news:O3ELosEd...@tk2msftngp13.phx.gbl...

Hilary Cotter

unread,
Sep 6, 2003, 1:01:12 PM9/6/03
to
are you interested in having this performed on the data in your text column
permanently, or do you require it to be displayed on your web page?

And, is this going to be in your search results page? or a returned page?


"Jason Davis" <jasond...@hotmail.com> wrote in message

news:OxR5O8Id...@tk2msftngp13.phx.gbl...

Jason Davis

unread,
Sep 6, 2003, 2:44:31 PM9/6/03
to
Not permanently, just on-time, new query/keywords/highlighting on each hit.
On my results page.

Thanks a-lot!


"Hilary Cotter" <hil...@att.net> wrote in message
news:uwzv7hJd...@TK2MSFTNGP10.phx.gbl...

Jason Davis

unread,
Sep 6, 2003, 2:45:26 PM9/6/03
to
John,

> This could be done much like a standard "search & replace" UDF. Yes, you
> would have to add an additional WHILE loop for each keyword (or phrase?)
> until you hit a max number of allowed keywords or phrases (within double
> quotes?).

This is exactly what I need. I'm actually very surprised no one has done
this yet. I'm not qualified, however.


Hilary Cotter

unread,
Sep 7, 2003, 5:20:12 PM9/7/03
to
I tried to post everything zipped but it won't go through. I'll post the
contents of each file separately and you'll have to figure our your own
gif's.

Here's the message.

"Jason Davis" <jasond...@hotmail.com> wrote in message

news:OP4MbcK...@TK2MSFTNGP09.phx.gbl...

Hilary Cotter

unread,
Sep 7, 2003, 5:24:13 PM9/7/03
to
dumpvar.htm - place in c:\inetpub\wwwroot

<HTML>
<BODY>
Enter your search phrase here.<BR>
<form action=/dumpvar/dumpvars.dll?" method=get name=test>
<input type=text name="search_phrase">
<input type=hidden name="PageNumber" value=5>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>
</BODY>
</HTML>

dumpvars.h

char Header[]="<HTML>"
"<HEAD>"
"<META http-equiv=""Content-Type"" content=""text/html;
charset=windows-1252"">"
"<LINK href=""/IS/style.css"" type=""text/css"" rel=""stylesheet"">"
"</HEAD>"
"<BODY vLink=""#000000"" link=""#000000"" bgColor=""#ffffff""
leftMargin=""0"" topMargin=""0"" marginheight=""0"" marginwidth=""0"">"
"<form id=""form1"" method=""get"" action=""/dumpvar/dumpvars.dll"">"
"<table borderColor=""#a7bb86"" height=""100%"" cellSpacing=""0""
cellPadding=""5"" width=""100%"" bgColor=""#f9feed"" border=""0"">"
"<tr>"
"<td width=""100"" bgColor=""#cbe5a6"" height=""70"">&nbsp;"
"</td><td class=""new-td-vertical"" width=""5"" bgColor=""#a7bb86""
height=""70"">"
"<IMG height=""1"" src=""IS/shim.gif"" width=""1"">"
"</td>"
"<td width=""20"" height=""70"">&nbsp;"
"</td>"
"<td vAlign=""top"" width=""500"" height = ""80"">"
"<IMG height=""60"" hspace=""20"" src=""IS/isf_logo.gif"" width=""152"">"
"</td>"
"<td class=""new-td-vertical"" bgColor=""#cbe5a6"" height=""70"">&nbsp;"
"</td>"
"</tr>"
"<tr>"
"<td class=""new-td"" width=""100"" bgColor=""#5b93ae"" height=""10"">"
"<IMG height=""1"" src=""IS/shim.gif"" width=""1"">&nbsp;&nbsp;"
"</td>"
"<td class=""new-td"" width=""5"" bgColor=""#3e7691"" height=""10"">"
"<IMG height=""1"" src=""IS/shim.gif"" width=""1"">"
"</td>"
"<td class=""new-td"" width=""20"" bgColor=""#78b0cb"" height=""10"">"
"<IMG height=""1"" src=""IS/shim.gif"" width=""1"">"
"</td>"
"<td class=""new-td"" vAlign=""center"" width=""500"" bgColor=""#78b0cb""
height=""1"">"
"<strong class=""text"" style=""MARGIN-LEFT: 20px"">Search:<IMG height=""1""
src=""IS/shim.gif"" width=""10"">"
"<INPUT id=""search_phrase"" type=""text"" size=""30""
name=""search_phrase"" style=""MARGIN-TOP: -4px; MARGIN-BOTTOM: -3px""
value="""">"
"<INPUT type=""hidden"" name=""PageNumber"" value=""1"">"
"<a id=""bthGo"" class=""go"" href=""javascript:form1.submit();"">Go!</a>"
"<IMG height=""1"" src=""IS/shim.gif"" width=""5"">"
"</strong></td>"
"<td class=""new-td""vAlign=""top"" bgColor=""#5b93ae"" height=""10"">"
"<IMG height=""1"" src=""IS/shim.gif"" width=""1""></td></tr><tr>"
"<td width=""100"" bgColor=""#cbe5a6"" height=""100"">&nbsp;"
"</td><td class=""new-td-vertical"" width=""5"" bgColor=""#a7bb86""
height=""100"">"
"<IMG height=""1"" src=""IS/shim.gif"" width=""1""></td><td vAlign=""top""
width=""20"" bgColor=""#f9feed"">&nbsp;"
"</td><td vAlign=""top"" width=""500"" height = ""100%"">";


char Footer[]="</td>"
"<td class=""new-td-vertical"" bgColor=""#cbe5a6""
height=""100"">&nbsp;</td>"
"</tr>"
"<tr>"
"<td class=""new-td"" width=""100"" bgColor=""#a7bb86"" height=""10""><IMG
height=""1"" src=""IS/shim.gif"" width=""1""></td>"
"<td class=""new-td"" bgColor=""#3e7691"" height=""10""><IMG height=""1""
src=""images/shim.gif"" width=""1""></td>"
"<td class=""new-td"" width=""20"" bgColor=""#78b0cb"" height=""10""><IMG
height=""1"" src=""IS/shim.gif"" width=""1""></td>"
"<td class=""new-td"" vAlign=""top"" width=""500"" bgColor=""#78b0cb""
height=""10"">"
"<p class=""p-light"">(c) copyright<a
href=""http://www.smilla.ru"">&nbsp;http://www.smilla.ru</a></p>"
"</td>"
"<td class=""new-td""vAlign=""top"" bgColor=""#5b93ae"" height=""10""><IMG
height=""1"" src=""IS/shim.gif"" width=""1""></td>"
"</tr>"
"<tr>"
"<td width=""100"" bgColor=""#cbe5a6"" height=""2""><IMG height=""1""
src=""IS/shim.gif"" width=""1""></td>"
"<td class=""new-td-vertical"" bgColor=""#a7bb86"" height=""2""><IMG
height=""1"" src=""IS/shim.gif"" width=""1""></td>"
"<td width=""20"" height=""2""><IMG height=""1"" src=""ISshim.gif""
width=""1""></td>"
"<td vAlign=""top"" width=""500"" height=""2""><IMG height=""1""
src=""IS/shim.gif"" width=""1""></td>"
"<td class=""new-td-vertical"" vAlign=""top"" bgColor=""#cbe5a6""
height=""2""><IMG height=""1"" src=""IS/shim.gif"" width=""1""></td>"
"</tr>"
"</table>"
"</form>"
"</BODY>"
"</HTML>";

dumpvar.cpp

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <httpext.h>
#include <string.h>
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace
rename("EOF", "EndOfFile")
#include <stdio.h>
#include <comutil.h>
#include "dumpvars.h"

const PCSTR g_pszConnection = "Provider=SQLOLEDB;Persist Security
Info=True;User ID=sa;password=se1cure#;Data Source=hilary2kp;Initial
Catalog=Northwind";
VOID PatchQuery(char *szQuery, char **ppszPatchedQuery);
VOID OutputErrors(EXTENSION_CONTROL_BLOCK *pECB, HRESULT hrError);
VOID OutputString(EXTENSION_CONTROL_BLOCK *pECB, LPCSTR szBuffer);
VOID URLDecode(char *pEncoded);
VOID QuoteFix(char *pEncoded);
VOID replace (char *str, char *substr1, char *substr2);


DWORD WINAPI HttpExtensionProc(IN EXTENSION_CONTROL_BLOCK * pECB)
{
char szOutput[2048], szValue[1024];
char *dest=NULL;
char *PageNumber=NULL;
char Query[100];
char *holder=NULL;
char *origdest=NULL;
int count=0;
int i=0;
int a=0;
bool fComInitialized = false;
long lNumFields, lFld;

FILE *fp;
HRESULT hr = NOERROR;
_RecordsetPtr pRs = NULL;
_ConnectionPtr pConn=NULL;
_variant_t vValue;
FieldPtr *rgflds = NULL;
DWORD dwBuffSize, dwError;
HSE_SEND_HEADER_EX_INFO HeaderExInfo;


struct data
{
char in[100];
char out[100];
} my_data[1000]; //assuming there are only 1000 entries in the redirect
text file

//
// Get the server variables and send them
//

dwBuffSize = 1024;
szValue[0] = '\0';

if ( !pECB->GetServerVariable(pECB->ConnID,"QUERY_STRING",szValue,
&dwBuffSize) )
{

//
// Analyze the problem and report result to user
//

switch (dwError = GetLastError( )) {
case ERROR_INVALID_PARAMETER:
strcpy( szValue, "ERROR_INVALID_PARAMETER" );
break;

case ERROR_INVALID_INDEX:
strcpy( szValue, "ERROR_INVALID_INDEX" );
break;

case ERROR_INSUFFICIENT_BUFFER:
wsprintf(szValue,"ERROR_INSUFFICIENT_BUFFER - %d bytes
required.",dwBuffSize);
break;

case ERROR_MORE_DATA:
strcpy( szValue, "ERROR_MORE_DATA" );
break;

case ERROR_NO_DATA:
strcpy( szValue, "ERROR_NO_DATA" );
break;

default:
wsprintf(szValue,"*** Error %d occured retrieving server variable
***",dwError);
}

wsprintf( szOutput, "%s: %s<br>\r\n","String\0", szValue );
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

}

//trim the query string
//we want what is to the right of the first 14 characters
// - this is the search_phrase thing

dest=strtok(szValue,"=,&");
//let's throw this value away as its the search_phrase stuff
dest=strtok(NULL,"=,&");
// this is our page number
PageNumber=strtok(NULL,"=,&");

//let's double all single quotes and double quotes

//lets decode the URL string
URLDecode(dest);

//ok now we have our clean string - lets see if we should redirect

fp=fopen("c:\\inetpub\\wwwroot\\redirect.txt","r");
if(!fp)
{
wsprintf( szOutput, "<BR>Can't open redirect.txt.<BR>Ensure this file is
in c:\\inetpub\\wwwroot<BR>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
}
//getting the first part of the redirect file, reads everything up to the
comma
while((fscanf(fp,"%[a-z .]",&my_data[i].in))!=EOF)
{
fgetc(fp);
fscanf(fp,"%s",&my_data[i].out);
fgetc(fp);
if(stricmp(my_data[i].in,dest)==0)
{
//redirecting
fclose(fp);
HeaderExInfo.pszStatus = "200 OK";
HeaderExInfo.pszHeader = "Content-type: text/html\r\n\r\n";
HeaderExInfo.cchStatus = strlen( HeaderExInfo.pszStatus );
HeaderExInfo.cchHeader = strlen( HeaderExInfo.pszHeader );
HeaderExInfo.fKeepConn = FALSE;

pECB->ServerSupportFunction(pECB->ConnID,HSE_REQ_SEND_URL_REDIRECT_RESP
,my_data[i].out,&dwBuffSize,NULL );
return HSE_STATUS_SUCCESS;
}

}
fclose(fp);

pECB->ServerSupportFunction(pECB->ConnID,HSE_REQ_SEND_RESPONSE_HEADER_EX,&He
aderExInfo,NULL,NULL);

//
// Begin sending back HTML to the client
//
HeaderExInfo.pszStatus = "200 OK";
HeaderExInfo.pszHeader = "Content-type: text/html\r\n\r\n";
HeaderExInfo.cchStatus = strlen( HeaderExInfo.pszStatus );
HeaderExInfo.cchHeader = strlen( HeaderExInfo.pszHeader );
HeaderExInfo.fKeepConn = FALSE;


strcpy(szOutput,Header);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

try
{
if (FAILED(hr = ::CoInitialize(NULL)))
_com_issue_error(hr);

fComInitialized = true;

//Open the recordset
pRs.CreateInstance("adodb.RecordSet");
pConn.CreateInstance("adodb.Connection");

_bstr_t strConn("Provider=SQLOLEDB;Persist Security Info=True;User
ID=sa;password=se1cure#;Data Source=hilary2kp;Initial Catalog=pubs;");
pConn->ConnectionString=strConn;
pConn->Open(strConn,"","",NULL);

pRs->MaxRecords=25l;

//trim search phrase for single and doubel quotes
strcpy(origdest,dest);
replace (dest, "\'", "\'\'");
replace (dest, "\"", "\"\"");

strcpy(Query,"select * from authors where contains(*,'\"");
strcat(Query,dest);
strcat(Query,"\"')");

wsprintf( szOutput, "<p>this is our patched query phrase %s<p>",dest);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );


wsprintf( szOutput, Query);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );


pRs->Open(Query, pConn.GetInterfacePtr(), adOpenStatic, adLockReadOnly,
adCmdUnknown);

lNumFields = pRs->Fields->Count;

rgflds = new FieldPtr[lNumFields];
if (!rgflds)
_com_issue_error(E_OUTOFMEMORY);
memset(rgflds, 0, lNumFields * sizeof(FieldPtr));

for (lFld = 0; lFld < lNumFields; lFld++)
rgflds[lFld] = pRs->Fields->GetItem(lFld);

wsprintf( szOutput, "<Table borderColor=""#a7bb86"" height=""5%""
cellSpacing=""0"" cellPadding=""5"" width=""100%"" bgColor=""#f9feed""
border=""1"">");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

wsprintf( szOutput, "<TR>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );


for (lFld = 0; lFld < lNumFields; lFld++)
{
wsprintf( szOutput, "<TH>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

wsprintf( szOutput, (PCSTR)(_bstr_t)rgflds[lFld]->Name);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

wsprintf( szOutput, "</TH>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
}
wsprintf( szOutput, "</TR>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

//here we are formatting dest with Emphasis

strcpy(Query,"<EM>");
strcat(Query,dest);
strcat(Query,"</EM>");


//
// print data
//
while (VARIANT_FALSE == pRs->EndOfFile)
{
count++;

wsprintf( szOutput, "<TR>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

for (lFld = 0; lFld < lNumFields; lFld++)
{
wsprintf( szOutput, "<TH>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

vValue = rgflds[lFld]->Value;

if (VT_NULL == vValue.vt)
{
wsprintf( szOutput, "(Null)");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
}
else
{
wsprintf( szOutput,(PCSTR)(_bstr_t) vValue);
replace(szOutput,origdest,Query);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
}

wsprintf( szOutput, "</TH>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );


}

wsprintf( szOutput,"</TR>" );
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

pRs->MoveNext();
}

wsprintf( szOutput,"</TABLE>");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
if(count==0)
{
wsprintf( szOutput,"No Records Found");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
}

strcpy( szOutput, Footer );
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );
}
catch (_com_error &e)
{
strcpy( szOutput, "<p>Error:\n");
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

sprintf( szOutput, "<p>Code = %08lx", e.Error());
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

sprintf( szOutput, "<p>Code meaning = %s", e.ErrorMessage());
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

_bstr_t bstrSource(e.Source());
sprintf( szOutput, "<p>Source = %s", (LPCSTR) bstrSource);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

_bstr_t bstrDescription(e.Description());
sprintf( szOutput, "<p>Description = %s", (LPCSTR) bstrDescription);
dwBuffSize = strlen( szOutput );
pECB->WriteClient( pECB->ConnID, szOutput, &dwBuffSize, 0 );

hr = e.Error();
}

if (rgflds)
delete[] rgflds;

pRs->Close();
pRs = NULL;
pConn->Close();
pConn = NULL;

if (fComInitialized)
::CoUninitialize();


pECB=NULL;
return hr;
}


BOOL WINAPI
GetExtensionVersion(
OUT HSE_VERSION_INFO * pVer
)
/*++

Purpose:

This is required ISAPI Extension DLL entry point.

Arguments:

pVer - poins to extension version info structure

Returns:

always returns TRUE

--*/
{
pVer->dwExtensionVersion =
MAKELONG( HSE_VERSION_MINOR, HSE_VERSION_MAJOR );

lstrcpyn(
pVer->lpszExtensionDesc,
"DumpVars ISAPI Sample",
HSE_MAX_EXT_DLL_NAME_LEN );

return TRUE;
}


BOOL WINAPI
TerminateExtension(
IN DWORD dwFlags
)
/*++

Routine Description:

This function is called when the WWW service is shutdown

Arguments:

dwFlags - HSE_TERM_ADVISORY_UNLOAD or HSE_TERM_MUST_UNLOAD

Return Value:

TRUE if extension is ready to be unloaded,
FALSE otherwise

--*/
{
return TRUE;
}

VOID OutputErrors(EXTENSION_CONTROL_BLOCK *pECB, _com_error &e)
{
char szBuffer[512];

// output hresult
OutputString(pECB, "<P><H1>Error Fetching Data</H1>");

sprintf(szBuffer, "<p>Code = %08lx", e.Error());
OutputString(pECB, szBuffer);

sprintf(szBuffer, "<p>Code meaning = %s", e.ErrorMessage());
OutputString(pECB, szBuffer);

_bstr_t bstrSource(e.Source());
sprintf(szBuffer, "<p>Source = %s", (LPCSTR) bstrSource);
OutputString(pECB, szBuffer);

_bstr_t bstrDescription(e.Description());
sprintf(szBuffer, "<p>Description = %s", (LPCSTR) bstrDescription);
OutputString(pECB, szBuffer);

return;
}

VOID OutputString(EXTENSION_CONTROL_BLOCK *pECB, LPCSTR szBuffer)
{
DWORD dwBuffer = strlen(szBuffer);
pECB->WriteClient(pECB->ConnID, (PVOID) szBuffer, &dwBuffer, 0);
}

VOID SwapChar(char * pOriginal, char cBad, char cGood)
{
int i;
i=0;
while(pOriginal[i])
{
if(pOriginal[i]==cBad)
pOriginal[i]=cGood;
i++;
}
}

static int IntFromHex(char *pChars)
{
int Hi;
int Lo;
int Result;

Hi=pChars[0];
if('0' <=Hi && Hi<='9')
{
Hi-='0';
}
else
if('a' <=Hi && Hi<='f')
{
Hi-=('a'-10);
}
else
if('A'<= Hi && Hi<='F')
{
Hi-=('A'-10);
}

Lo=pChars[1];
if('0' <=Lo && Lo<='9')
{
Lo-='0';
}
else
if('a'<=Lo && Lo <='f')
{
Lo-=('a'-10);
}
if('A'<=Lo && Lo <='F')
{
Lo-=('A'-10);
}
Result=Lo+(16*Hi);
return(Result);
}

VOID URLDecode(char *pEncoded)
{
char *pDecoded;

SwapChar(pEncoded, '+',' ');

pDecoded=pEncoded;
while(*pEncoded)
{
if(*pEncoded=='%')
{
pEncoded++;
if(isxdigit(pEncoded[0]) && isxdigit(pEncoded[1]))
{
*pDecoded++=(char) IntFromHex(pEncoded);
pEncoded+=2;
}
}
else
{
*pDecoded++=*pEncoded++;
}


}
*pDecoded='\0';
}

VOID replace (char *str, char *substr1, char *substr2)
{
int count=0;
int len, len2;
int i, shift;

len2=strlen(substr2);
shift=len2-strlen(substr1);

while((str=strstr(str,substr1))!=NULL)
{
count++;
len=strlen(str);

if(shift<0)
{
for(i=abs(shift);i<len+1;i++)
str[i+shift]=str[i];
}
else if (shift>0)
{
for(i=len;i;i--)
str[i+shift]=str[i];
}
strncpy(str,substr2,len2);
str+=len2;
}
return;
}

redirect.txt

sql server,/sql_server.htm
sql tools,/sql_tools.htm


"Jason Davis" <jasond...@hotmail.com> wrote in message

news:OP4MbcK...@TK2MSFTNGP09.phx.gbl...

Hilary Cotter

unread,
Sep 7, 2003, 5:25:04 PM9/7/03
to
style.css

BODY {
FONT-SIZE: 80%; FONT-FAMILY: arial,sans-serif,helvetica; TEXT-DECORATION:
none
}
H1 {
MARGIN-TOP: 20px; FONT-SIZE: medium; MARGIN-BOTTOM: 10px; MARGIN-LEFT:
20px; COLOR: #3e7691; FONT-FAMILY: Tahoma, Verdana, Arial, Helvetica,
sans-serif; TEXT-DECORATION: none
}
H2 {
MARGIN-TOP: 15px; FONT-SIZE: x-small; MARGIN-BOTTOM: 5px; MARGIN-LEFT:
20px; COLOR: #3e7691; FONT-FAMILY: Tahoma, Verdana, Arial, Helvetica,
sans-serif; TEXT-DECORATION: none
}
A:visited {
COLOR: #677b46; TEXT-DECORATION: none
}
B {
FONT-SIZE: 80%; COLOR: black; FONT-FAMILY: arial,sans-serif,helvetica;
TEXT-DECORATION: none
}
.menu2 {
COLOR: #575326; FONT-FAMILY: Tahoma, Verdana, Arial, Helvetica, sans-serif
}
.menu3 {
MARGIN: 10px 0px 0px; COLOR: #effdd3; FONT-FAMILY: Tahoma, Verdana, Arial,
Helvetica, sans-serif
}
.menu1 {
FONT-WEIGHT: normal; FONT-SIZE: 70%; COLOR: #043c57; FONT-FAMILY: Tahoma,
Verdana, Arial, Helvetica, sans-serif
}
A:link {
COLOR: #043c57; TEXT-DECORATION: none
}
P {
FONT-SIZE: 70%; MARGIN: 8px 15px 3px 20px; COLOR: #575326; FONT-FAMILY:
Tahoma, Verdana, Arial, Helvetica, sans-serif
}
.table-new {
BORDER-RIGHT: #215974 1px solid; BORDER-TOP: #215974 1px solid;
BORDER-LEFT: #215974 1px solid; BORDER-BOTTOM: #215974 1px solid
}
TD {

}
.new-td {
BORDER-RIGHT: #3e7691 thin; BORDER-TOP: #3e7691 1px solid; BORDER-LEFT:
#3e7691 1px; BORDER-BOTTOM: #3e7691 1px solid
}
.new-td-vertical {
BORDER-RIGHT: #3e7691 1px solid; BORDER-TOP: #3e7691 1px; BORDER-LEFT:
#3e7691 1px solid; BORDER-BOTTOM: #3e7691 1px
}
.p-light {
FONT-SIZE: xx-small; MARGIN: 0px 0px 0px 20px; COLOR: #f9feed; FONT-FAMILY:
Tahoma, Verdana, Arial, Helvetica, sans-serif
}
H3 {
MARGIN-TOP: 15px; PADDING-LEFT: 20px; FONT-WEIGHT: bold; FONT-SIZE: 70%;
MARGIN-BOTTOM: 5px; COLOR: #575326; FONT-FAMILY: Tahoma, Verdana, Arial,
Helvetica, sans-serif
}

"Jason Davis" <jasond...@hotmail.com> wrote in message

news:OP4MbcK...@TK2MSFTNGP09.phx.gbl...

Jason Davis

unread,
Sep 7, 2003, 6:33:29 PM9/7/03
to
What the... :)
I was thinking this would sum up with a simple SELECT statment or a udp
function..

I'm overwhelmed abit. I'll take a closer look.

Thanks hilary.

"Hilary Cotter" <hil...@att.net> wrote in message

news:eXGrNZYd...@TK2MSFTNGP09.phx.gbl...

0 new messages