Tom Muck

Cartweaver | Flash Remoting | Community MX | CMXtraneous
Home page
All articles | DWTeam | Flash Remoting | Basic-Ultradev | Community MX
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Faq

Insert Record and Retrieve Autonumber for MS Access and SQL Server: FAQs

Q: I'm trying to use the server behavior with the Check New Username behavior but it is not working. Is there anything I can do?

A: Unfortunately, the problem lies in the Check Username server behavior. If you want to hack that file, you can make it work with my extension or other insert extensions. Find this file (make a backup of it just in case something goes wrong):

c:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\ServerBehaviors\Shared\Check New Username.js

(may be in a different location in your computer)

In that file, find this code (there will be 4 instances of it):

var insertSBs = dwscripts.getServerBehaviorsByFileName("Insert Record.htm");

Insert these two lines below that line in all 4 places (if this is an insert behavior from somewhere else, find the name of the HTML files used by the extension and add them to the list, separated by commas):

var temp = getSBs("InsertRetrieveID.htm,Insert-Retrieve Identity.htm");
for(var i=0; i < temp.length; i++) insertSBs.push(temp[i]);

Add this function to the top of the file:

function getSBs(sb) {
  var mySbs = sb.split(",");
  var ssRecs, i;
  var sbs = new Array();

  for(var j=0; j<mySbs.length; j++) {
    ssRecs = dw.serverBehaviorInspector.getServerBehaviors();
    for (i=0; i < ssRecs.length; i++) {
      if (ssRecs[i].serverBehavior == mySbs[j]) {
        sbs.push(ssRecs[i]);
      }
    }
  }
  return sbs;
}

After applying the Check New Username behavior to the page, change the MM_insert variable to TM_insert. If this is an insert behavior from another extension developer, this step may not be necessary or you may have to locate a form field of another name for this step.

That should be all you need to do. Let me know if you have problems using the contact form at the bottom of the page, and make a backup of the original file just in case.

Q: Does the server behavior work if you are uploading a file to the server at the same time as the database insert operation?

A: No, unfortunately it does not at this time.

Q: I am getting an error like this:

Active Server Pages error 'ASP 0131'

Disallowed Parent Path

/extensiontesting/ASPVB/master.asp, line 2

The Include file '../../Connections/t.asp' cannot contain '..' to indicate the parent directory.

A: The behavior of include files in ASP changed in IIS 6. Check this Microsoft technote for details:

http://support.microsoft.com/default.aspx?scid=kb;en-us;332117

and this Macromedia technote for a fix for Dreamweaver:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16573


Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!

Powered by Cartweaver

About | Privacy Policy | Contact | License Agreement | ©2002-2008 Tom Muck | Dreamweaver Extensions