CS3 ASP/VBSCRIPT Commands
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1298979&highlight_key=y
There is a response in this thread that gives a possible fix.
I tried it and
was unsuccessful, but someone a little more diligent might
get it
working....
anyone know how to fix this issue with dreamweaver?
Similar Messages
-
Update multiple records with Update Command Dreamweaver 8.0.2 - ASP VBScript
Dreamweaver 8.0.2 - Language ASP – VBScript
I’m trying to update more than one record at a time
using checkboxes. I’ve successfully done this numerous times
prior to Dreamweaver 8.0.2.
Before Dreamweaver 8.0.2, I would create a page with a
recordset, form, checkbox and repeat region and pass the ID to
another page containing an ‘Update Command’. The code
on the Update page looked similar to the following:
<%
if(Request.QueryString("MemberID") <> "") then
spMemberApproving__MMColParam = Request.QueryString("MemberID")
%>
<%
set spMemberApproving = Server.CreateObject("ADODB.Command")
spMemberApproving.ActiveConnection =
MM_connIssuesManager_STRING
spMemberApproving.CommandText = "UPDATE tblMembers SET
MemberApproved = 1 WHERE MemberID IN (" +
Replace(spMemberApproving__MMColParam, "'", "''") + ")"
spMemberApproving.CommandType = 1
spMemberApproving.CommandTimeout = 0
spMemberApproving.Prepared = true
spMemberApproving.Execute()
Response.Redirect("default.asp")
%>
However, in Dreamweaver 8.0.2 when you fill out the Update
Command dialog box, Dreamweaver asks you to provide the
‘Type’ and ‘Size’ for the variables (see:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
That being said and done, the code on the Update page looks
like the following:
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
if(Request.QueryString("MemberID") <> "") then
spMemberApproving__MMColParam = Request.QueryString("MemberID")
%>
<%
Set spMemberApproving = Server.CreateObject ("ADODB.Command")
spMemberApproving.ActiveConnection =
MM_connIssuesManager_STRING
spMemberApproving.CommandText = "UPDATE tblMembers SET
MemberApproved = 1 WHERE MemberID IN (?) "
spMemberApproving.Parameters.Append
spMemberApproving.CreateParameter("MMColParam", 202, 1, 10,
MM_IIF(Request.QueryString("MemberID"),
Request.QueryString("MemberID"), spMemberApproving__MMColParam
spMemberApproving.CommandType = 1
spMemberApproving.CommandTimeout = 0
spMemberApproving.Prepared = true
spMemberApproving.Execute()
Response.Redirect("default.asp")
%>
The Update Command works perfectly when only 1 record is
being updated. However, when I try to update more than one record I
get the following error:
Error Type:
ADODB.Command (0x800A0D5D)
Application uses a value of the wrong type for the current
operation.
/issues_manager/admin/members_approving.asp, line 27
Can anyone help me out?Yes, this is a bug in Dreamweaver 8.0.2. The only workaround
is to stay with
8.0.1 or to hand-code the query. Adobe removed most of the
useful ways to
use Commands and Recordsets in 8.0.2 and limited it to basic
queries.
Tom Muck
co-author Dreamweaver MX 2004: The Complete Reference
http://www.tom-muck.com/
Cartweaver Development Team
http://www.cartweaver.com
Extending Knowledge Daily
http://www.communitymx.com/
"Button1" <[email protected]> wrote in message
news:[email protected]...
> Dreamweaver 8.0.2 - Language ASP ? VBScript
>
> I?m trying to update more than one record at a time
using checkboxes.
> I?ve
> successfully done this numerous times prior to
Dreamweaver 8.0.2.
>
> Before Dreamweaver 8.0.2, I would create a page with a
recordset, form,
> checkbox and repeat region and pass the ID to another
page containing an
> ?Update Command?. The code on the Update page looked
similar to the
> following:
>
> <%
> if(Request.QueryString("MemberID") <> "") then
> spMemberApproving__MMColParam =
> Request.QueryString("MemberID")
> %>
>
> <%
>
> set spMemberApproving =
Server.CreateObject("ADODB.Command")
> spMemberApproving.ActiveConnection =
MM_connIssuesManager_STRING
> spMemberApproving.CommandText = "UPDATE tblMembers SET
MemberApproved = 1
> WHERE MemberID IN (" +
Replace(spMemberApproving__MMColParam, "'", "''") +
> ")"
> spMemberApproving.CommandType = 1
> spMemberApproving.CommandTimeout = 0
> spMemberApproving.Prepared = true
> spMemberApproving.Execute()
>
> Response.Redirect("default.asp")
> %>
>
> However, in Dreamweaver 8.0.2 when you fill out the
Update Command dialog
> box,
> Dreamweaver asks you to provide the ?Type? and ?Size?
for the variables
> (see:
>
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
>
>
>
> That being said and done, the code on the Update page
looks like the
> following:
>
> <%
> ' IIf implementation
> Function MM_IIf(condition, ifTrue, ifFalse)
> If condition = "" Then
> MM_IIf = ifFalse
> Else
> MM_IIf = ifTrue
> End If
> End Function
> %>
>
> <%
> if(Request.QueryString("MemberID") <> "") then
> spMemberApproving__MMColParam =
> Request.QueryString("MemberID")
> %>
> <%
>
> Set spMemberApproving = Server.CreateObject
("ADODB.Command")
> spMemberApproving.ActiveConnection =
MM_connIssuesManager_STRING
> spMemberApproving.CommandText = "UPDATE tblMembers SET
MemberApproved = 1
> WHERE MemberID IN (?) "
> spMemberApproving.Parameters.Append
> spMemberApproving.CreateParameter("MMColParam", 202, 1,
10,
> MM_IIF(Request.QueryString("MemberID"),
Request.QueryString("MemberID"),
> spMemberApproving__MMColParam & ""))
> spMemberApproving.CommandType = 1
> spMemberApproving.CommandTimeout = 0
> spMemberApproving.Prepared = true
> spMemberApproving.Execute()
>
> Response.Redirect("default.asp")
> %>
>
>
> The Update Command works perfectly when only 1 record is
being updated.
> However, when I try to update more than one record I get
the following
> error:
>
> Error Type:
> ADODB.Command (0x800A0D5D)
> Application uses a value of the wrong type for the
current operation.
> /issues_manager/admin/members_approving.asp, line 27
>
>
> Can anyone help me out?
>
> -
Errors when trying to INSERT Dreamweaver CS3 ASP scripts into MySql
Greetings everyone,
I am hoping that someone can shed some light on an issue I have not been able to solve in the last few days. I have a website that I had built using Ultradev, then MX then CS3, using the default ASP scripts in dreamweaver and an odbc connection to an Access Database. Everything had been working fine for the last couple of years until recently where more people were visiting my site which resulted in the slowness because i was using access. I decided to move to a MySql database and that is when I ran into issues. I was able to solve most everything accept for one issue I am having. I was hoping it would be an easy transition by changing the ODBC connections but it has not been that easy. Any page I have with an INSERT command using the default Dreamweaver CS3 ASP script results in an error. Now I can query and delete and search with no problem...it is just the INSERT that is giving me issues. Here is just a general insertion script that CS3 does by default....
<%
If (CStr(Request("MM_insert")) = "form1")Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_adsdata_STRING
MM_editCmd.CommandText = "INSERT INTO commenthot (yeshot, userhot) VALUES (?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 2, 3, Request.Form("yeshotf")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 3, 30, Request.Form("useridf")) ' adVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
End If
End If
%>
When I click to submit...the error i run into is...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' mel)' at line 1
/fr/members/sexyoupasvote.asp, line 28
....Line 28 is the MM_editCmd.Execute. I notice if I put a single quotes around the ? next the the VALUE like this ('?', '?')...it does go through and the ? shows up in both fields as the data.
....If i put a single back quote around the column names like this (`yeshot`, `userhot`) VALUES (?, ?) I get this error and nothing gets inserted into the MySql.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' mel)' at line 1
/fr/members/sexyoupasvote.asp, line 28
...by seeing 'mel)' show up, I know it is at least passing the data to that field.
....when I do (`yeshot`, `userhot`) VALUES ('?', '?')...
it goes through and inserts ? ...instead of the real data I want to use...in this case ...the number 1 and Mel.
...if I do (yeshot, userhot) VALUES (?, '?')...
I get this error...
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/fr/members/sexyoupasvote.asp, line 28
....any idea what to modify to make it insert the corect data? Has anyone experienced this? If I can get this fixed with just this page I can probablly fix the other pages that have teh same issue. Is there a special setting on the MySql that I should know about to allow data to be inserted? Any help would GREATLY appreciated!
Thank you!Thanks for your reply!
When it was in Access...the datatype was Text. I used a 3rd party software to convert Assess directly to my hosting MySql server. When I logged in to see the table in MySql, it is set to Varchar(3) for yeshot and Varchar(30) for userhot. There is also an extra field I used for the KEY called commentID which is set to int(11) and it is autonumbered. Under the Collation i have utf8_general_ci set on the yeshot and userhot field. Null is No on both and the Default is set to None and all 3 fields.
I have a form I am collecting that data from which is:
<% If (langname.Fields.Item("langname").Value)="FR" Then
response.write("OUI!")
else
response.write("YES!")
End if %>
<input name="yeshotf" type="radio" id="yeshotf" value="1" checked>
<span class="style10">
<input name="submit" type="submit" id="submit" value="VOTE!">
</span> -
<input name="yeshotf" type="radio" id="yeshotf" value="2">
<% If (langname.Fields.Item("langname").Value)="FR" Then
response.write("NON!")
else
response.write("NO!")
End if %>
<input name="useridf" type="hidden" id="useridf" value="<%=(hotornot.Fields.Item("membername").Value)%>">
<input type="hidden" name="MM_insert" value="form1">
<input type="hidden" name="hdwfail" id="hdwfail" value="sexyoupasvote.asp?langname=<%=(langname.Fields.Item("langname").Value)%>&membernam e=<%=(hotornot.Fields.Item("membername").Value)%>&hdwmsg=invalid">
</form>
....the form has 2 radio button and 1 hidden field where I collect the username. The radio value should either be a 1 or a 2 depending on the selection by the user. I also have a captha on the form but that does not seem the cause any problem since I am not collecting any data from it. Does this help? I left the yeshot field as Text but I can change that to Numeric data... again thanks for your assistance in helping me try to figure this out.
...The message I am getting now is:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt-log]Unknown column 'Babe1' in 'field list'
/fr/members/sexyoupasvote.asp, line 28
....with this setting:
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_adsdata_STRING
MM_editCmd.CommandText = "INSERT INTO dsnrenms.commenthot (yeshot, userhot) VALUES (?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 3, Request.Form("yeshotf")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 30, Request.Form("useridf")) ' adVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
End If
End If
%> -
I created a simple update ASP VBscript form in Dreamweaver 8.
However the connection to my DB no longer works if someone enters
quotation marks. The quotation marks appear in my DB however the
connection is then broken, I think this is because quotation marks
and apostrophes are classed as special characters. Can anyone
advise me how I can modify my code to replace them with double
apostrophes?
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_connDB_STRING
MM_editCmd.CommandText = "UPDATE connDB SET title1 = ?,
body1 = ?, title2 = ?, body2 = ?, title3 = ?, body3 = ? WHERE body1
= ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 202, 1, 50,
Request.Form("textfield"))
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close> Are developers "jumping ship" when it comes to ASP
VBScript development?
I love the VB.
Dan Smith > adobe community expert
http://www.dsmith.tv -
Simple call to stored function from asp (vbscript) adodb
please let me know if this question would be better suited to another forum.
i am simply attempting to call an oracle stored function that returns a varchar2 from an asp vbscript page using adodb. i have calling of stored procedures working fine.
attempting to call the function with the following code:
set sp_aprvd_cr = Server.CreateObject("ADODB.Command")
sp_aprvd_cr.ActiveConnection = MM_MHR_CONN_STR_STRING
sp_aprvd_cr.CommandType = 4
sp_aprvd_cr.CommandTimeout = 0
sp_aprvd_cr.Prepared = true
sp_aprvd_cr.CommandText = "PMS.sp_hpmsq054_aprvd_cr"
sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("IP_PMSPT_ID", 200, 1,10,sp_aprvd_cr__P_PMSPT_ID)
sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("return_param", adVarchar, adParamOutput)
set rst_aprvd_cr = sp_aprvd_cr.Execute
suspect that preparing the return code is where i am having troubles.
any examples or assistance would be greatly appreciated.
thanks in advance.Return value from stored function must be the first parameter in the parameters collection.
So, try this instead,
sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("return_param", adVarchar, adParamOutput)
sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("IP_PMSPT_ID", 200, 1,10,sp_aprvd_cr__P_PMSPT_ID)Cheers,
NH -
Need to update a record on page load. How? (ASP/VBScript)
The standard Update Record behavior requires a form on the page, plus a recordset to identify the value to be updated. In my scenario, the value for the record to be updated is already in the URL as the ID. I just don't know how to write it myself and Dreamweaver won't do this.
The page I want to do this on is a record detail page, so there is already a record ID already present in the querystring. The record is new until a user views it, and what I need is something that just writes a simple value to one field in the table for the record being viewed. This is it in a nutshell:
Using the value from the ID in the URL querystring, update the "viewed" field in a specific table with the value of "y".
This would be the first operation as the page loads and then the page would load and show the data that it already does.
I'd be happy with raw code is someone is generous enough to provide that, or perhaps some instructional help on reverse engineering the standard update record code generated by Dreamweaver. Or, if you know of any extensions designed to do this - I'd be interested in that too!
My app I'm working on is in ASP/vbscript.
Subject line edited by moderator to indicate server modelGood point! I wasn't thinking about how that would make the app vulnerable to sql injection.
The function I want to perform is similar to how an email changes from unread to read when you view it. I simple want the records being viewed to take on the status of being read or "viewed". Perhaps I'm going about this in the wrong way, but I've been planning to use a database field as the indicator of whether a record has a viewed status or not. Null value is new, and a value of "y" (yes) meaning the value is viewed/read.
If you have a better recommendation, I'm all ears. -
Code Coloring, ASP/VBScript, & CS5
My IT area has set up the web server to process all .HTM files as if they were .ASP. Subsequently, I cannot view my HTM files as they would appear if they were "true" ASP files in Dreamweaver CS5. I applied the changes described in TechNote 16410 to MMDocumentTypes.xml (removing the HTM extension from the winfileextension and macfileextension attirbutes of the HTML InternalType and adding the HTM extension to the winfileextension and macfileextension attirbutes of the ASP-VBScript InternalType). I moved HTM in Extensions.txt from the HTML Documents line to the Active Server Pages line and I removed the backup I had made of MMDocumentTypes.xml from the Adobe directory.
Based on another posting in this forum regarding code coloring, I added <%@LANGUAGE="VBSCRIPT"%> to the first line of my HTM (ASP) file.
No matter which file with the HTM extension I open in Dreamweaver, I get this message:
When this happens also I need to terminate Dreamweaver using Windows XP's Task Manager. File > Close, application "close" [X] button, Ctrl+Q and Alt+F4 do not work.As far as I know (could be wrong here), DW does not allow you to alter the behavior of htm(l) files. The technote is aimed at adding new file types that DW doesn't already recognize.
-
Bridge CS3- My find command has quit working, any help?
In my Bridge CS3 the find command cannot find any of the keywords that I spent hours adding. It has been working fine, but one day stopped. I have deleted the plist, the cache, and the recent workspace to no effect. I have not added any new software recently. It doesn't work if I am searching a file that I have open in Bridge so it is not a matter of not waiting long enough for the thumbnails to generate. Those were the only suggestions I found anywhere. Does anyone have any other suggestions? I am running this on a Mac if that makes a difference.
I may have to upgrade as you suggest. I did find one thing that is interesting, though it doesn't explain where the problem comes from. If I open a folder in Bridge that holds files that I have added keyword to, when I close it Bridge can find those files with the find command. I am not sure why opening the folders would make a difference, but it seems to. This only works one when searching one sub-folder deep. If there is another folder in that, even though I've opened it, it will not find it.
I guess until I am ready to spend the money to upgrade I will spend an evening opening all my keyworded folders. I better find a good video to watch while doing it! -
ASP VBScript to XML RSS question
I'm just not getting this to work in ASP VBScript. I just want to loop the recordset so I have all the rows be translated into a xml based rss feed. What I have makes sense to me, but I only get the first record no matter what I try.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/cnConn.asp" -->
<%
set rsJobs = Server.CreateObject("ADODB.Recordset")
rsJobs.ActiveConnection = MM_cnConn_STRING
rsJobs.Source = "SELECT id, city, [state], jobtype, datePosted FROM DatabaseTable"
rsJobs.CursorType = 0
rsJobs.CursorLocation = 2
rsJobs.LockType = 3
rsJobs.Open()
rsJobs_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rsJobs_numRows = rsJobs_numRows + Repeat1__numRows
%>
<%
response.write "<?xml version=""1.0"" encoding=""utf-8""?>"
response.write "<rss version=""2.0"">"
response.write "<channel>"
response.write "<title></title>"
response.write "<link>/</link>"
response.write "<description></description>"
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsJobs.EOF))
%>
<%
response.write "<item>"
response.write "<title>" & (rsJobs.Fields.Item("jobtype").Value) & "</title>"
response.write "<description>" & (rsJobs.Fields.Item("city").Value) & ", " & (rsJobs.Fields.Item("state").Value) & "</description>"
response.write "<link>domain</link>"
response.write "<pubDate>" & (rsJobs.Fields.Item("dateposted").Value) & "</pubDate>"
response.write "</item>"
%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsJobs.MoveNext()
Wend
%>
<%
response.write "</channel>"
response.write "</rss>"
%>
<%
rsJobs.Close()
Set rsJobs = Nothing
%>Just giving it a casual look I don't see why it is not working. But why are you declaring all of those counters and then not using them? Seems to overly complicate things. I would get rid of all references to:
rsJobs_numRows
Dim Repeat1__numRows
Dim Repeat1__index
and then change the while loop test to:
While (NOT rsJobs.EOF)
It shouldn't really matter, since your counter used in the while test starts at -1 and is decremented so it should never = 0, but still, it's confusing to read.
And of course, verify that the select statement actually returns more than one row. Use the recordcount property of the recordset. -
ASP VBScript producing Dreamweaver Javascript Error Messages
Do almost anything in Dreamweaver CS4 with ASP VBScript seems to produce javascript error messages. can be a blank page, and you try to create a recordset... error box, error box, and then the code gets inserted but is not in the server behaviors panel. i'm usually working in php and have never had this problem, but it's quite annoying to work that way... being forced to hand code a lot simple because dreamweaver isn't working correctly.
warning one:
the following javascript error(s) occurred:
warning two:
while executing findServerbehaviors in Recordset.htm, a JavaScript error occurred
deleted .dat file and restarted dreamweaver, per some discussions via google... did nothing.anyone know how to fix this issue with dreamweaver?
-
ASP VBScript and ADDT Dynamic List Wizard HELP
Using ADDT I've created a dynamic list in a membership area. How do I get that dynamic list to populate only the data for that particular member that is logged in. Any help would be so much appreciated as I have been trying to figure this out for days now.
<br />
<br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<br />
<!--#include file="../Connections/rentalpaypro.asp" -->
<br />
<!--#include file="../includes/common/KT_common.asp" -->
<br />
<!--#include file="../includes/tNG/tNG.inc.asp" -->
<br /><%<br />'Start log out user<br /> Set logout = new tNG_Logout<br /> logout.setLogoutType "link"<br /> logout.setPageRedirect "../index.html"<br /> logout.Execute<br />'End log out user<br />%>
<br />
<!--#include file="../includes/tfi/TFI.asp" -->
<br />
<!--#include file="../includes/tso/TSO.asp" -->
<br />
<!--#include file="../includes/nav/NAV.asp" -->
<br /><%<br />'Start Restrict Access to Page<br /> Dim restrict: Set restrict = new tNG_RestrictAccess<br /> restrict.Init MM_rentalpaypro_STRING, "../"<br />'Grand Levels: Any<br /> restrict.Execute<br />'End Restrict Access to Page<br />%>
<br /><%<br />' Filter<br /> Dim tfi_listLandlord_Property1: Set tfi_listLandlord_Property1 = new TFI_TableFilter<br /> tfi_listLandlord_Property1.Init MM_rentalpaypro_STRING, "tfi_listLandlord_Property1"<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.ContactInfoID", "NUMERIC_TYPE", "ContactInfoID", "="<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.RegistrationID", "NUMERIC_TYPE", "RegistrationID", "="<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.StreetNumber", "NUMERIC_TYPE", "StreetNumber", "="<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.StreetName", "STRING_TYPE", "StreetName", "%"<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.AptNumber", "NUMERIC_TYPE", "AptNumber", "="<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.City", "STRING_TYPE", "City", "%"<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.State", "STRING_TYPE", "State", "%"<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.ZipCode", "NUMERIC_TYPE", "ZipCode", "="<br /> tfi_listLandlord_Property1.addColumn "Landlord_Property.MonthlyRent", "NUMERIC_TYPE", "MonthlyRent", "="<br /> tfi_listLandlord_Property1.Execute()<br /><br />' Sorter<br /> Dim tso_listLandlord_Property1: Set tso_listLandlord_Property1 = new TSO_TableSorter<br /> tso_listLandlord_Property1.Init "rslistLandlord_Property1", "tso_listLandlord_Property1"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.ContactInfoID"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.RegistrationID"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.StreetNumber"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.StreetName"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.AptNumber"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.City"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.State"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.ZipCode"<br /> tso_listLandlord_Property1.addColumn "Landlord_Property.MonthlyRent"<br /> tso_listLandlord_Property1.setDefault "Landlord_Property.ContactInfoID"<br /> tso_listLandlord_Property1.Execute()<br /><br />' Navigation<br /> Dim nav_listLandlord_Property1: Set nav_listLandlord_Property1 = new NAV_Regular<br /> nav_listLandlord_Property1.Init "nav_listLandlord_Property1", "rsLandlord_Property1", "../", Request.ServerVariables("URL"), 10<br />%>
<br /><%<br />Dim qry_contactinfo__MMColParam<br />qry_contactinfo__MMColParam = "1"<br />If (Session("kt_login_id") <> "") Then <br /> qry_contactinfo__MMColParam = Session("kt_login_id")<br />End If<br />%>
<br />Use the session variable from the log in method (MM_Username as I recall) to create a recordset that you then use in the dynamic list versus using the whole table.
-
Error '800a0411' Name redefined (ASP VBScript)
Hello, I am new in trying to program and I have this problem when I am trying to test my Login page built in Dreamweaver CS4 and my database is in Microsoft Access.
The error message is the following:
Microsoft VBScript compilation error '800a0411'
Name redefined
/Login.asp, line 10
Dim MM_NBconnect1_STRING
----^
I have checked the code view , its not repeated towice , so the problem should be something else.thank you
-
Hi,
I have created a dsn and a connection string that test fine on my web host (crystaltech), but I get an unidentified error when I test them on DW CS4. Any thoughts?
This is my connection string:
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\bnicrossroadsconnections\dbs\members.mdb;"
which generates this code:
<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_testConn_STRING
MM_testConn_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\bnicrossroadsconnections\dbs\members.mdb;"
%>
The connection include code is here: http://bnicrossroadsconnections.com/connections/testconn.asp
My dsn code is:
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_memberconn_STRING
MM_memberconn_STRING = "dsn=memberdsn;uid=bnixroads;pwd=pass;"
%>
The dsn include code is here: http://bnicrossroadsconnections.com/connections/memberconn.asp
What am I doing wrong?
This is on a Windows server and I have set the file permissions to the dbs folder to allow writes and deletes.
I tried moving a db and dsn from another site, where they work, and I get the same unidentified error on this site. I'm thinking I may have missed something with the host, but don't know what. Crystaltech says everything looks fine at their end, and IE throws no error messages.
Many thanks!!!Thank you. I closed all firewalls and tried it but got the same error. Then I tried rebooting and restarting DW to no avail. So, I started clicking on the commands and on the site>advanced there is a Remove Connection Script command. I clicked that and retried creating the dynamic table and much to my surprise it worked. I think perhaps that it was a combination of your suggestion and getting rid of the old script that left it work. Thanks again for your help.
Best regards,
Clair -
What's wrong with this IF / ELSE statement? ASP/VBScript
Hi,
I'm trying to display a section, within an ASP page, where
the customer
logged in is the same as the customer who placed the order,
identified by
their "customerID".
<%IF (rsUser.Fields.Item("customerID").Value) =
"(rsOrderDetails.Fields.Item("& customerID
&").Value)" Then%>
Text etc...
<%Else%>
Other text etc...
<%End IF%>
The customerID in both database tables is a "bigint" type,
but when I try
the above, I get: "Type Mismatch"?
I've tried this:
<%IF (rsUser.Fields.Item("customerID").Value) =
(rsOrderDetails.Fields.Item("& customerID &").Value)
Then%>
Text etc...
<%Else%>
Other text etc...
<%End IF%>
But this also produces a Type Mismatch error.
Anything glaringly obviously wrong with this? Much
appreciated.
Nath.Thanks Dooza, that's sorted it.
Why does ASP not recognise that they are the same format?
Appreciate the help.
Regards
Nath.
"Dooza" <[email protected]> wrote in message
news:[email protected]...
> Ok, it looks like you will need to convert them to the
same format, even
> if ASP doesn't think they are the same.
>
> <%IF cstr(rsUser.Fields.Item("customerID").Value) =
> cstr(rsOrderDetails.Fields.Item("customerID").Value)
Then%>
> Text etc...
> <%Else%>
> Other text etc...
> <%End IF%>
>
> That converts both to a string, which should evaluate
against each other.
>
> See if that helps.
>
> Steve
>
> tradmusic.com wrote:
>> Sorry Steve,
>>
>> I forgot to remove those from the last example. It
should have read:
>>
>> <%IF (rsUser.Fields.Item("customerID").Value) =
>> (rsOrderDetails.Fields.Item("customerID").Value)
Then%>
>> Text etc...
>> <%Else%>
>> Other text etc...
>> <%End IF%>
>>
>> ....which still doesn't work. :o)
>>
>> Type Mismatch, yet both fields are bigint.
>>
>> Any idea's where the problem is? Much appreciated.
>> Nath.
>>
>>
>> "Dooza" <[email protected]> wrote in
message
>> news:[email protected]...
>>> tradmusic.com wrote:
>>>> Hi,
>>>>
>>>> I'm trying to display a section, within an
ASP page, where the customer
>>>> logged in is the same as the customer who
placed the order, identified
>>>> by their "customerID".
>>>>
>>>> <%IF
(rsUser.Fields.Item("customerID").Value) =
>>>> "(rsOrderDetails.Fields.Item("&
customerID &").Value)" Then%>
>>>> Text etc...
>>>> <%Else%>
>>>> Other text etc...
>>>> <%End IF%>
>>>>
>>>> The customerID in both database tables is a
"bigint" type, but when I
>>>> try the above, I get: "Type Mismatch"?
>>>>
>>>> I've tried this:
>>>>
>>>> <%IF
(rsUser.Fields.Item("customerID").Value) =
>>>> (rsOrderDetails.Fields.Item("&
customerID &").Value) Then%>
>>>> Text etc...
>>>> <%Else%>
>>>> Other text etc...
>>>> <%End IF%>
>>>>
>>>> But this also produces a Type Mismatch
error.
>>>>
>>>> Anything glaringly obviously wrong with
this? Much appreciated.
>>> Whats with this?
(rsOrderDetails.Fields.Item("& customerID &").Value)
>>> Why are there ampersands in there?
>>>
>>> It should be just this:
(rsOrderDetails.Fields.Item("customerID").Value)
>>>
>>> Steve
>> -
How to see ASP/VBScript variable names inline
When you use an ASP output in a form control (like <%=Submit_Button_Label%>), you can easily see on the page what you've done. This doesn't work for ASP outputs in the rest of the page--all you see are "ASP" graphics all over the place.
I'm in the process of externalizing all of the text on our ASP pages to variables for translation, and my choices seem to be having a completely unreadable page (where there are just a bunch of ASP labels and not much else) or using a structure like
<% If False Then 'so we can find it easily on the page, leave the original text
%>
I accept and agree to abide by the Terms of Use
and Privacy Policy.
<% Else %><%= TOS_Prompt %><% End If %>
so I can at least find things.
Is there a third option?
Thanks in advance!
Message was edited by: Amy BlankenshipHow bout those crickets?
Maybe you are looking for
-
How do I connect DVI to Scart (or S-serial) on my Sony WEGA?
Does anyone know how I can connect my MacBook Pro (with a DVI socket) to my Sony WEGA TV. The TV has both Scart and S-serial video (plus the red and white audio sockets). Many thanks, Richard
-
Attachment Does Not Open in UWL
Hi, Using a Background Method i have attached a '.PDF' attachment to the workflow. When open in r3 the Attachment works fine and it opens in PDF reader. But when the same thing is tried through portal, it say the file could not be found. Kindly Help.
-
Does BPC in NW7.0 support Multi-Provider
Hi All, Does the BPC applications support Multi_Provider data for Actuals and Planned? We have queries right now on multi-provider and seeing the feasibility of replicating those reports into BPC reports. Is this feasible and if so please share some
-
Please Tell Me The Simple & Easy Steps To Run Forms 6i On Web.
hi there, please tell me the easy n simple way to run a form on web , created in form6i. or if you have any informative link about it. regards Asif Iqbal Software Engineer (Karachi, Pakistan).
-
I have bought Iphone 4 from apple store at Santa clara CA. However now I am in India. My phone has developed problem and getting switched off at randomly though it is fully charged. The authorised apple service centre is not providing me service as