|
Philip Patrick wrote:
But what you mean by format and structure? Of course it is different, but you are not opening Access files in binary more and parse them manually.
Thats what I meant yup...I was just curious if they shared similar file structures. Nothing important, just curious.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Philip seems to have answered your questions quite nicely
Just about the IP address though, that seems to be more insecure. The IP address you get from ASP is only guaranteed to be as unique as the proxy server the person rode in on (so to speak). If its an intranet then you dont have that worry, but there is the issue of anybody being able to use that computer and get access, without logging in.
I'll assume there is more to it than you have written here
As for the database compatibility, as Philip said, internally what they are like is irrelevant. They are compatible enough, such that there will not be huge code changes, and Microsoft provide automatic importing tools in SQL Server to read access databases. Whether or not your ISP allows you access to this (its called DTS, which i thnk is Data Transformation Services) is another issue, but its not hard to import data anyway. You just open two connections, read from one, write to the other.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Hello!
If you are familiar with AOL Instant Messenger (AIM), you are probably aware of www.subprofile.com and www.imchaos.com. Well, about a year ago I created a code that works similar to the way the sites I mentioned above work. On my profile, I have a link. If you want to see message me. The link to look at the profile is:
<A HREF="http://SERVER/q.asp?sn=%n" TARGET="_self">Profile</A>
When a person clicks on a person's info on AIM that has a space in the format of their screen name (ex: "ExAm PLe"), the URL is changed to:
"http://SERVER/q.asp?sn=ExAm PLe"
After clicking on that link, a message appears: "Error Loading Content." And this is a result of the space. If I choose to open it up in separate window it does work with the space. But in AIM it does not work.
After pretty much after a whole year of testing, nothing has worked. I've re-written my code some times now, and still get the same error. After looking at the details, I could think of I still have this problem. I checked the logs of my server to see that after clicking the link if the request is made to my server. There is NO log entry for that attempt. So that concluded me to believe that AIM has a problem with that link. Subprofile.com and Imchaos.com have solved this problem somehow.
Any insight you have or ideas you might have... I would be must greatful. And if you need more information about this just message me or respond to my post.
Thanks Again,
Sean
|
|
|
|
|
I dunno about you, but I'm seeing a lot of potential here... hehehe... like, say, using subprofile.com to create a page that contains an onLoad event, or simply having the user click on a link, which brings up a page, which gets their IP, and runs a server-sided program to hack their computer, and install a trojan, which sends you their password by e-mail, which gives you COMPLETE CONTROL OF THEIR AIM SN! And the added benefit of having a trojan installed....
NO! BAD DOMENIC! MUST USE TECHNOLOGY RESPONSIBLY! SLAP! SLAP!
But... the possibilities... SLAP!
Sorry about that.
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
No No! I'm not a hacker!! I'm trying to produce code that works nothing bad at all, seriously. I've been stuck on this problem for awhile.
-Sean
|
|
|
|
|
Ya, I know, I was just off in my own little universe there for a while
Anyway, don't know if this could help, but whenever I see a space in a URL it is encoded as %20 (20 = hex for 32 = space's ASCII code). Perhaps that's what's making the page choke, it wants it encoded? I couldn't think how you could do that without using JScript, tho, and that's prolly not allowed in profiles... Hmm...
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
my code does take into account the spaces...either %20 or + which both stand for a space...
I input the screen name using ASP... and getting that data using QueryString....
-Sean
|
|
|
|
|
instead of passing the username as the identifier to retrieve the profile info why don't you try passing a unique numerical value which also identifies the profile. This way there are never going to be any spaces to be worried with and your URL should always work.
Using the integer identifier assumes all of the profiles are held in a database and using integer type identifiers.
nick
|
|
|
|
|
I wonder how does the script in CP forums know when to append the "new!" icon at the subject line of the message. It can not be just because of the date of posting. I've tried hitting every message that I saw with that icon and went to attend some of my work for a while, went back to the forum and found that the messages that I have visited a while ago don't have the icon anymore!
Any hint? Do I smell cookies here? Maybe it's a simple one that I am missing ... Tnx!
(just like after I submit this, I am expecting to see the "new" icon in yellow!)
|
|
|
|
|
From what I can tell it takes the date/time of sign in, then marks any post that occured after that date/time as new.
You need to remember that your sign in date/time isn't neccesarily the last time you put your username/password in. When the session object times out on the server you will be 'logged out' of the system, but when you hit the page again it will automatically log you in assuming you have it set to do so.
James
Simplicity Rules!
|
|
|
|
|
I see. So the script simply displays the icon if the message posting date is greater than the "last visit". Tnx!
|
|
|
|
|
So, here's my technical question for the day. I have a really cool idea for my new web site's architechture. Problem is, I don't know if IIS is capable of it, or exactly how it would do so. Here goes:
I want all my data to be a combination of my own proprietary XML format and XHTML. Something like:
<small>
<?xml version="1.0"?>
<Page xmlns:XHTML="http://www.w3.org/1999/xhtml">
<Head>
<Title>Site Map</Title>
<Image Width="200">Images/SiteMap.gif</Image>
</Head>
<Body>
<XHTML:p>
The site map is designed to help you find exactly what you're looking
for on the MadHamster Creations website. It allows quick and easy
lookup of and access to every file and page on the site, giving you the
ability to get to exactly what you need as fast as possible.
</XHTML:p>
<XHTML:center>
<XHTML:div>Choose the organizational structure you prefer:</XHTML:div>
<XHTML:table>
<XHTML:tr>
<XHTML:td><Link Href="javascript:OpenFileSiteMap()" Status="..." Comment="...">By Files</Link></XHTML:td>
<XHTML:td><Link Href="javascript:OpenPageSiteMap()" Status="..." Comment="...">By Pages</Link></XHTML:td>
</XHTML:tr>
</XHTML:table>
</XHTML:center>
</Body>
</Page>
</small>
Pretty cool, huh? Pure data, no layout. Anyway, because I can't rely on the client having IE6 (for XSL stuff), of course all my XML transformation will be done on the server side. This is where things get fuzzy...
My plan is to have on ASP.NET (.aspx) page, which takes as an argument (PageWriter.aspx?doc=ThatDoc.xml ) the XML document to translate. However, I was wondering if there was anyway NOT to have that ugly URL show up in the browser. You see my drift? A simple ThatDoc.xml would be best, although perhaps a ThatDoc.aspx , ThatDoc or Content/ThatDoc.xml would work as well if it would be easier.
I've heard something about this before, somewhere, in some MSDN magazine article perhaps? Anyway, my computer with IIS is still dead ( ), but just give me an idea which of the above, if any, is good, because I'm writing my XML on this Win98 machine ( ), and would like to know which I can use before I start plugging URLs into my link tags.
Thanks in advance, and I'm sorry I couldn't find the write forum, but this doesn't seem to fit anywhere, and everybody ignores anything not in the lounge NEway...
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
I think HttpHandlers will do the trick.
cheers,
Chris Maunder
|
|
|
|
|
So in regards to filling in my link tags, does that mean I can map it onto ThatPage.xml?
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
You can only map it to types that ASP.NET is in charge of handling. I just took a quick look on this box and I don't see it in the IIS MMC snapin.
If you look in the machine.config file (located in the %WINDIR%\Microsoft.NET\Framework\%DOTNETVERSION%\Config directory) you will see a section called httpHandlers , it looks like this is where it tells IIS what types ASP.NET will be handling.
You can add a new handler in this list to specify what should be done when that file is requested, if the HttpHandler documentation isn't good you can check the source to the provided handlers with ILDASM or Anakrino to see how they work.
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
it looks like this is where it tells IIS what types ASP.NET will be handling.
So would I be better coming up with my own file type, e.g. .mhc (the page is for my "company", MadHamster Creations)? That way I could have any files of that type be handled as I wanted? Keep in mind, at this point I just want a vague idea of what's possible and what's not, and most importantly, what exactly I should put in my <Link> tages in the meantime!
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
Domenic [CPUA 0x1337] wrote:
So would I be better coming up with my own file type, e.g. .mhc
Yes, I would; otherwise your handler is going to be called whenever an xml file is requested; which isn't a good thing, especially if you plan on sharing the server with others (outside of your company or other developers who don't know about your handler).
I know I've seen an example somewhere of creating an HttpHandler, but I can't find a reference to it now
James
Simplicity Rules!
|
|
|
|
|
The last msdn mag came with a excellent article about httphandlers
Reality.sys is corrupted!
Reboot the universe Y/N?
|
|
|
|
|
Ah, I C. Sorry about the wrong forum thing Chris
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
Custom HttpHandlers should work (Chris already mentioned this.)
Another way you could do this would be to create a Custom 404 handler. Let people type in ThatDoc.asp (or ThatDoc.whatever), see if it is actually your XML file and if so render it, otherwise do standard 404 stuff.
|
|
|
|
|
I need to have my SQL perform a search on the following table:
Table: News
==================================================
PKID Source newsText newsURL|
==================================================
00001 Microsoft Something www.ms.com
00002 Sun Something www.sun.com
00003 Apple Something www.apple.com
...And so on
SELECT * FROM News
Would fill my recordset with all the fields from the News table. However in my site I have an options feature where users can select News by Source
Microsoft
Apple
Sun
Intel
Etc...
These options are stored in cookies and are later used in displaying the news. Depending on the news source options selceted only certain feilds should be displayed.
What would be the best way of doing this...?
Should I use seperate Select statements for each option checked...?
Like this?
If microsoftNews.checked = true Then
SELECT * From News WHERE Source = 'Microsoft'
'Iterate the recordset and display news items
Else If sunNews.checked = true Then
SELECT * FROM News WHERE Source = 'Sun'
'Iterate the recordset and display news items
Else If appleNews.checked = true Then
SELECT * FROM News WHERE Source = 'Apple'
'Iterate the recordset and display news items
End if 'Etc...
Or should I generate the entire SQL statement depending on options checked...?
I tried this earlier but it turned out to be harder than I desired.
I hope I explained myself clearly...
Any suggestions...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I am not sure if I've understood your question correctly... Is this what you are looking for?
Dim SQL, Keyword
Select Case True
Case microsoftNews.checked
Keyword = "Microsoft"
Case sunNews.checked
Keyword = "Sun"
Case appleNews.checked
Keyword = "Apple"
Case Else
Keyword = ""
End Select
SQL = "SELECT * From News WHERE Source = '" & Keyword & "'"
'Iterate the recordset and display news items
|
|
|
|
|
Nope, sorry!
The news feed should only display news by topic of interest (selected by user and stored in cookies).
So if Microsoft and Sun and Apple and Intel are checked AND AMD and Adobe and Claris are NOT checked, then I must construct some SQL statement on the fly according to the options set.
Select case True
Case microsfotNews.checked
Keyword = Keyword + "Microsoft"
...And so on...
I'm wondering if it would be easier to just use seperate SQL statments for each checkbox fill a recordset write it to screen and move onto the next...?
Sorry if i'm unclear, but it's super early in the morning and i'm just ready to goto sleep.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
You can try this
Select * from News Where Source In ('pref1', 'pref2', 'pref3', 'pref4', ...)
It may or may not be case sensitive, I think that depends on the database settings.
James
Simplicity Rules!
|
|
|
|
|
Well, then James is right and your code should look like this:
Dim SQL, Keywords
<br> <br>
Keywords = ""
<br> <br>
If microsoftNews.checked Then
Keywords = Keywords & "'Microsoft',"
End If
If sunNews.checked Then
Keywords = Keywords & "'Sun',"
End If
If appleNews.checked Then
Keywords = Keywords & "'Apple',"
End If
<br> <br>
If Len(Keywords) > 0 Then
' Remove last comma
Keywords = Left(Keywords, Len(Keywords) - 1)
End If
<br> <br>
SQL = "SELECT * From News WHERE Source IN (" & Keywords & ")"
'Iterate the recordset and display news items
|
|
|
|