|
-
Jun 17th, 2004, 04:19 AM
#1
Thread Starter
Addicted Member
JavaScript Theory
Hi,
i know this is the vb forum but dont know of any good javascript forum so thought i would rack the brains of the good javascripters.
I am trying to create database access to a MSDatabase the problem is that, it needs to be NON server side, you see it needs to look at the MSdatabase that is on a local server, and write to it
i am thinkin that perhaps using vbscript and javascript
in A EXTERNAL Javascript file
so in a sense,
1) ill open the database connection
2) get the javascript to create a variable for each item i.e text box on a html page or picklist, it will create a variable for each one until there is no more,
i.e
var TB(1) --> (Name) 'first text box in the html page
var TB(2) --> (Surename) ' second
var PL(1) --> (Q1) 'first pick list in the html page
until there is no more left, coz the amount of text box or picklist on a page will change
3) then in the html page, put in something at the (Name) text box that tells what field in the MSDatabase the string has to go into.
i.e Var TB(1) --> (Name,Field1)
4) then gather up the contents of all the variables, i.e whats in the picklist, or text box
ie VarTB(1) --> (Name,Field1,Adam)
5) then send it to the database using a vbscript, or javascript if possible.
Is this theory possible, i know to connect to a MSDatabase using ododb, but not sure on the other stuff, but intend to hit the books and the forum :d
-
Jun 17th, 2004, 04:50 AM
#2
1. http://www.vbforums.com/forumdisplay.php?s=&forumid=11
That's the javascript forum.
2. Not possible. Has to be server-side, not client-side.
-
Jun 17th, 2004, 05:18 AM
#3
Thread Starter
Addicted Member
Thanks,
I have posted it in there, but doesn't look that busy
do you think it is possible. I mean in theory it could work
I have connected to a Database b4 in Js the code is
Code:
function Query(){
var Database = new ActiveXObject("ADODB.Connection");
Database.Provider = "Microsoft.Jet.OLEDB.4.0";
Database.ConnectionString = "Data Source=data.mdb";
Database.Open;
RS = new ActiveXObject("ADODB.Recordset");
RS.ActiveConnection = dbc;
RS.CursorLocation = 3;
RS.LockType = 3;
RS.Open ("Select * FROM TBLSTUFF");
window.alert(RS.fieldname);
RS.close
Database.close
}
with this in mind, im sure that is must be possible, and second of all i have seen it done but that had vbscript files linked to it. but there was Deffo client-side
tnx Adz
-
Jun 17th, 2004, 06:08 AM
#4
Frenzied Member
-
Jun 17th, 2004, 06:34 AM
#5
Thread Starter
Addicted Member
Thanks i am posting on them now.
if any1 has any idea's then please do help
tnx all
adz
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|