AMX I!-DATABASEPLUS AND DBWIZARD Instruction Manual page 16

Integration!solutions
Table of Contents

Advertisement

Programming i!-Database Plus
',$27,strLabel,$27,', ',
',ITOA(slTitleID),')'"
(* SEND THE QUERY *)
DB_ADD_TO_QUE(sDB_QUE,'TITLES',strSQL,sTempListBox)
}
(*********************************************)
(* NAME: DB_UPDATE_TITLES
(***************************************************************************)
(* Format query to update an entry to TITLES data
(***************************************************************************)
DEFINE_FUNCTION DB_UPDATE_TITLES(CHAR
STACK_VAR
CHAR strSQL[1000]
_sDB_LISTBOX sTempListBox
{
(* ESCAPE ANY SINGLE QUOTES *)
strArtist = DB_STRING_REPLACE(strArtist,"39","39,39") (* ' FOR '' *)
strCopyright = DB_STRING_REPLACE(strCopyright,"39","39,39") (* ' FOR '' *)
strLabel = DB_STRING_REPLACE(strLabel,"39","39,39") (* ' FOR '' *)
strReleaseDate = DB_STRING_REPLACE(strReleaseDate,"39","39,39") (* ' FOR ''
*)
strTitle = DB_STRING_REPLACE(strTitle,"39","39,39") (* ' FOR '' *)
(* BUILD A QUERY STRING *)
strSQL = "'UPDATE Titles SET Artist = ',$27,strArtist,$27,', Copyright = ',
',
(* SEND THE QUERY *)
DB_ADD_TO_QUE(sDB_QUE,'TITLES',strSQL,sTempListBox)
}
(*********************************************)
(* NAME: DB_READ_TITLES
(***************************************************************************)
(* Format query to read a page of TITLES data
(***************************************************************************)
DEFINE_FUNCTION DB_READ_TITLES(_sDB_LISTBOX sTempListBox,CHAR strSEARCH[])
STACK_VAR
CHAR
{
(* BUILD A QUERY STRING *)
strSQL = "'SELECT * FROM Titles'"
IF (LENGTH_STRING(strSEARCH))
strSQL = "strSQL,' ORDER BY Artist'"
(* SEND THE QUERY *)
DB_ADD_TO_QUE(sDB_QUE,'TITLES',strSQL,sTempListBox)
}
The next section initializes the connection to the database script and creates a buffer to hold the
results. The call to
section. The parameters are the: IP address of the web server, IP port of the web server (usually 80)
and path to the database script. This path is the directory and file name of the ASP file. You will
12
' VALUES (',$27,strArtist,$27,', ',$27,strCopyright,$27,',
$27,strReleaseDate,$27,', ',$27,strTitle,$27,',
$27,strCopyright,$27,', Label = ',$27,strLabel,$27,', ReleaseDate =
$27,strReleaseDate,$27,', Title = ',$27,strTitle,$27,', TitleID = ',
ITOA(slTitleID),' WHERE TitleID = ',ITOA(slTitleID)"
strSQL[1000]
strSQL = "strSQL,' WHERE ',strSEARCH"
DB_INIT_CLIENT
*)
strArtist[128],
CHAR
strCopyright[128],
CHAR
strLabel[128],
CHAR
strReleaseDate[128],
CHAR
strTitle[128],
SLONG
slTitleID)
*)
initializes the
sDB_CLIENT
structure created in the variable
i!-Database Plus and DBWizard
*)
*)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the I!-DATABASEPLUS AND DBWIZARD and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

I!-databaseplusDbwizard

Table of Contents