Click here to Skip to main content
15,916,601 members
Home / Discussions / Web Development
   

Web Development

 
QuestionEnable securiyt setting in IE Pin
lucluv18-Sep-06 2:22
lucluv18-Sep-06 2:22 
AnswerRe: Enable securiyt setting in IE Pin
CWIZO18-Sep-06 3:35
CWIZO18-Sep-06 3:35 
AnswerRe: Enable securiyt setting in IE Pin
Guffa18-Sep-06 6:24
Guffa18-Sep-06 6:24 
QuestionWebservice namespace return object problem Pin
acardeiradias17-Sep-06 23:25
acardeiradias17-Sep-06 23:25 
AnswerRe: Webservice namespace return object problem Pin
minhpc_bk18-Sep-06 19:43
minhpc_bk18-Sep-06 19:43 
GeneralRe: Webservice namespace return object problem Pin
acardeiradias18-Sep-06 23:43
acardeiradias18-Sep-06 23:43 
Questionhow to reach an xml file or a database from a web page? Pin
Joan M17-Sep-06 22:48
professionalJoan M17-Sep-06 22:48 
AnswerRe: how to reach an xml file or a database from a web page? Pin
JUNEYT18-Sep-06 10:50
JUNEYT18-Sep-06 10:50 
Hi Joan!

It is not vey complicated to call / open a database file via asp or php. First you have to have a database file under a specific directory on the server. Make sure it is password protected. Then it is easy follow my steps below.

1. You have to define the path and connection string for the file. Therefore, make sure that you include the likely statements below in your inc. file.

DPath = Server.MapPath( "_database\FILE.MDB" )

ConnStr= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Dpath & ";Jet OLEDB:Database Password=12345;"


2. We have to initiate a connection to database when it becomes essential for you to open the file and perform several tasks

Set ObjectConnection=Server.CreateObject ("ADODB.Connection")
ObjectConnection.Open ConnStr

3. Define a specific SQL string such as
SQLSTR = "SELECT * FROM stocks WHERE GoodsIndex = 10"

4. We have to initiate recordset. Therefore use the following statements

Set ObjectRecord = Server.CreateObject ("ADODB.Recordset")

ObjectRecord.CursorLocation = adUseServer
ObjectRecord.CursorType = adOpenkeyset
ObjectRecord.LockType = adLockOptimistic
ObjectRecord.Open SQLSTR, ObjectConnection,,, adCmdText

notice: adCmdText is used to process a SQL string command if you want to open a table directly you can also use admCmdTable statement.


5. okay lets reach the data with ADO

If ObjectRecord.RecordCount > 0 Then
SelectedGood = ObjectRecord("GoodsName")
End If

6. When you done close the connection
SET ObjectRecord = NOTHING
ObjectConnection.Close

DONE!

I hope it works for you!
Wink | ;)
Questionclosing popup window after refreshin Pin
248912817-Sep-06 20:11
248912817-Sep-06 20:11 
AnswerRe: closing popup window after refreshin Pin
Guffa17-Sep-06 20:48
Guffa17-Sep-06 20:48 
GeneralRe: closing popup window after refreshin Pin
248912817-Sep-06 20:56
248912817-Sep-06 20:56 
GeneralRe: closing popup window after refreshin Pin
M LN Rao18-Sep-06 1:00
M LN Rao18-Sep-06 1:00 
AnswerRe: closing popup window after refreshin Pin
Guffa18-Sep-06 6:27
Guffa18-Sep-06 6:27 
QuestionGmail & AJAX Pin
abalfazl17-Sep-06 9:15
abalfazl17-Sep-06 9:15 
AnswerRe: Gmail & AJAX Pin
CWIZO17-Sep-06 10:35
CWIZO17-Sep-06 10:35 
GeneralRe: Gmail & AJAX [modified] Pin
abalfazl17-Sep-06 18:36
abalfazl17-Sep-06 18:36 
GeneralRe: Gmail & AJAX Pin
CWIZO17-Sep-06 20:06
CWIZO17-Sep-06 20:06 
GeneralRe: Gmail & AJAX Pin
abalfazl17-Sep-06 21:05
abalfazl17-Sep-06 21:05 
GeneralRe: Gmail & AJAX Pin
_AK_17-Sep-06 21:32
_AK_17-Sep-06 21:32 
Questionj/script issues Pin
Christian Graus17-Sep-06 1:47
protectorChristian Graus17-Sep-06 1:47 
AnswerRe: j/script issues Pin
Guffa17-Sep-06 2:04
Guffa17-Sep-06 2:04 
GeneralRe: j/script issues Pin
Christian Graus18-Sep-06 1:32
protectorChristian Graus18-Sep-06 1:32 
AnswerRe: j/script issues Pin
Guffa18-Sep-06 8:59
Guffa18-Sep-06 8:59 
Questionasp help [modified] Pin
harshActsw15-Sep-06 21:28
harshActsw15-Sep-06 21:28 
AnswerRe: asp help Pin
Guffa15-Sep-06 22:30
Guffa15-Sep-06 22:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.