|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Accessing access queries
hi evereone
don't know if this is the correct place, I hope so I have to connect an acces db with flash. Now I've read that you have to use asp for this. Olso I read that you can read from an access querie. Someone of my office made the queries (and they're working fine). But what now? I'm pretty new in this. this is the querie in acces: a querie that is called "aVierde". this liks 3 tables a ETBeschrijving, ICPC and an linktable, wich make's the links the asp-file: Code:
<%
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("kopieVoorKaren.mdb")
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set rstContacts = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "aVierde"
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = DataConn
rstContacts.Open cmdTemp, , 1, 4
rstContacts.Move CLng(Request("Record"))
Response.write "ETCode=" & Server.URLEncode(rstContacts("link.ETCode")) & "&"
Response.write "ICD10Titel=" & Server.URLEncode(rstContacts("ICPC.ICD10Titel")) & "&"
Response.write "ETbeschrijving=" & Server.URLEncode(rstContacts("ETBeschrijving.beschrijving")) & "&"
Response.write "extra=" & Server.URLEncode(rstContacts("link.extra")) & "&"
Response.write "TotalRecords=" & rstContacts.RecordCount
rstContacts.Close
DataConn.Close
%>
in flash:
onClipEvent (data) {
strETCode = ETCode;
strICD10Titel = ICD10Titel;
strETbeschrijving = ETbeschrijving;
strExtra = extra;
strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);
}
onClipEvent (load) {
CurrentRecord = 0;
loadVariables("vierdeState.asp?Record=0", this);
}
and than fields that are named afther the str-var's ps: sorry for my englisch Last edited by Shadow Wizard : January 22nd, 2007 at 07:16 AM. Reason: added [Code] and [/Code] tags around code - please do that yourself next. |
|
#2
|
||||
|
||||
|
hello and welcome to aspfree.
![]() the ASP code looks fine. you first have to install IIS on the server. when you got it installed, create the ASP file in the root folder (by default C:\Inetpub\wwwroot) and name it vierdeState.asp put your flash file there as well, and it should work. to test your ASP only, open browser on the server and browse to http://localhost/vierdeState.asp?Record=0 |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Accessing access queries |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|