What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » DATABASE?

Pages: (3): « First « 1 [ 2 ] 3 » Last »
DATABASE?
Author: Message:
John Anderton
Elite Member
*****

Avatar

Posts: 3908
Reputation: 80
37 / Male / Flag
Joined: Nov 2004
Status: Away
RE: DATABASE?
quote:
Originally posted by RaceProUK
quote:
Originally posted by -dt-
so why not use COM to open it in jscript
The other possibility is ADO, which can be used directly in JScript, and is compatible with more database types than just Access.
I think it was a rhetorical question 8-)
[

KarunAB.com
]

[img]http://gamercards.exophase.com/459422.png[
/img]
07-17-2006 12:24 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: DATABASE?
quote:
Originally posted by -dt-
i used ADO
quote:
Originally posted by -dt-
ADODB.Connection'
Hmm... so you did...
* RaceProUK is blind
[Image: spartaafk.png]
07-17-2006 12:33 PM
Profile PM Web Find Quote Report
Griffo
Junior Member
**


Posts: 27
Joined: Apr 2006
RE: DATABASE?
Thanks guys!

Any ideas why the Debug line gives me Type Mismatch?

code:
function OnEvent_Initialize(MessengerStart)
{
var db = new ActiveXObject('ADODB.Connection');
var dbPath = "C:\\DB\\DB.mdb";
db.Open("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" + dbPath +";DefaultDir=;UID=;PWD=;");

var results = db.Execute("SELECT * FROM OnAir ORDER BY FullName");
Debug.Trace(results);
}
07-17-2006 08:32 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: DATABASE?
'results' is a Recordset, which isn't easily convertable to a string.
code:
while (!results.EOF) {
    Debug.Trace(results.GetString());
    results.MoveNext();
}
should print off all records.
[Image: spartaafk.png]
07-17-2006 08:49 PM
Profile PM Web Find Quote Report
Griffo
Junior Member
**


Posts: 27
Joined: Apr 2006
RE: DATABASE?
Thanks, works great! :D
07-17-2006 09:08 PM
Profile E-Mail PM Web Find Quote Report
Griffo
Junior Member
**


Posts: 27
Joined: Apr 2006
RE: DATABASE?
Hey guys,

DB stuff workign great now. However, I notice on one of the strings I am pulling, it sticks like a small square at the end of it which then appears on my MSN PSM. Any idea what the little square represents and how I can remove or trim it?

Thanks :)
07-19-2006 03:22 PM
Profile E-Mail PM Web Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
37 / – / –
Joined: Dec 2005
RE: DATABASE?
Perhaps the small square could be a line break? Or an "end of field"? To find out what the little square is, output it to the debug console using debug.trace. Then you can use regexp to strip it out.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6913 days, 17 hours, 53 minutes, 35 seconds ago
07-19-2006 03:34 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: DATABASE?
Can you print out the small square as an integer? Then it can be cross-referenced with an ASCII or Unicode chart to see what it's meant to be.

This post was edited on 07-19-2006 at 03:37 PM by RaceProUK.
[Image: spartaafk.png]
07-19-2006 03:37 PM
Profile PM Web Find Quote Report
Griffo
Junior Member
**


Posts: 27
Joined: Apr 2006
RE: RE: DATABASE?
quote:
Originally posted by cloudhunter
Perhaps the small square could be a line break? Or an "end of field"? To find out what the little square is, output it to the debug console using debug.trace. Then you can use regexp to strip it out.

Cloudy


Yea I think you are right there, here is the debug below. How would I remove the break?

Thanks :)

CODE:
code:
Debug.Trace(Artist + "-" + Title);

DEBUG::
code:
Function called: OnEvent_Timer
BBE -
-Flash

07-19-2006 09:44 PM
Profile E-Mail PM Web Find Quote Report
Richy
Junior Member
**

Avatar

Posts: 16
36 / Male / Flag
Joined: Feb 2008
RE: DATABASE?
Is there a solution to connect to a MySQL server through Jscript? Thank you...

This post was edited on 02-24-2008 at 05:31 PM by Richy.
02-24-2008 05:30 PM
Profile E-Mail PM Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On