|
-
Apr 8th, 2002, 07:29 AM
#1
Thread Starter
Frenzied Member
Calling a database using JS
I wish to make a database call with a JS-function. I have tried to use the code coming from SCOUT, but I had no succes, what am I doing wrong?
Code:
function LngText(TextID,Language) {
Language = 1;
TextID = 1;
'if you have language columns
objRS= "SELECT "& Language &" FROM Generelt WHERE ID="&TextID&";",dpd_sprog.mdb
'if you have langauge tables
objRS= "SELECT text FROM "&Language&" WHERE ID="&TextID&";",dpd_sprog.mdb
LngText=objRS
document.navform.text21.value = LngText
end function
-
Apr 8th, 2002, 04:18 PM
#2
huh I don't even know JS let alone ASP. didn't get it from me...
-
Apr 9th, 2002, 12:18 AM
#3
Thread Starter
Frenzied Member
-
Apr 9th, 2002, 12:21 AM
#4
Thread Starter
Frenzied Member
But I must ask you, if you are familiar using ASP, can I solve my problem using a function in ASP? I have only used functions written in JS
-
Apr 9th, 2002, 01:35 AM
#5
I don't think you can use JS to access a database. You'll have to use a language ASP, or CGI or PHP.... to answer your question, yes, asp would help you.
-
Apr 9th, 2002, 01:43 AM
#6
Thread Starter
Frenzied Member
OK, thanks! Can I use the function above as a JS function? I think about the onClick-events and so on. The next question is, will the function above work in ASP?
-
Apr 9th, 2002, 03:15 AM
#7
Fanatic Member
You can access a database with server-side JScript, but again thats related to ASP so you might as well us that
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
|