DATABASE? |
Author: |
Message: |
John Anderton
Elite Member
Posts: 3908 Reputation: 80
37 / /
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
[
KarunAB.com]
[img]http://gamercards.exophase.com/459422.png[
/img]
|
|
07-17-2006 12:24 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
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
|
|
07-17-2006 12:33 PM |
|
|
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 |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
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.
|
|
07-17-2006 08:49 PM |
|
|
Griffo
Junior Member
Posts: 27
Joined: Apr 2006
|
RE: DATABASE?
Thanks, works great!
|
|
07-17-2006 09:08 PM |
|
|
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 |
|
|
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
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
6909 days, 23 hours, 10 minutes, 21 seconds ago
|
|
07-19-2006 03:34 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
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.
|
|
07-19-2006 03:37 PM |
|
|
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 |
|
|
Richy
Junior Member
Posts: 16
36 / /
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 |
|
|
Pages: (3):
« First
«
1
[ 2 ]
3
»
Last »
|
|