Where in the Code can I Call a function Before Insert

Hi, using DWMX and VBSCRIPT with n MS Access table set on a
W2k3 server and ASP
I need to insert a value 'intGradID' from a function into a
hidden field 'hGradID' when the submit button (to insert a record
in an access database) is clicked (and before insert takes place as
this is the key field that I am adding).
I realise Javascript might be required (not too great with
Java) so any help please tell me where to put script/code and what
to put. Thanks.

Why not just setup the field in the record to be
auto-incrementing? That way
on insert the next # in the series is assigned to the new
record. And even
if 2 people someone did it at exactly the same time, the
server takes care
of the collision.
"Dave(UK)" <[email protected]> wrote in
message
news:e9uakp$s11$[email protected]..
> Hi, using DWMX and VBSCRIPT on a W2k3 server and ASP
>
> I have an on-line application form for Graduates (bound
to Insert Into a
> table
> called graduates). On open of the page (at the top) I
have some some code
> to go
> look in the Graduates table for the last gradID No and
add 1 for this new
> Graduate and I set a session variab;e with the GradID
found and that value
> is
> the 'Initial Value' of a hidden field hGradID which is
inserted into
> GradID in
> the table on Submit, along with the other info. Works
Perfectly!! Until,
> that
> is, during the course of one Graduate registering,
another tries to do so
> ..
> both get the same gradID and the one who submits last
ends up with the
> error
> 'Dulicate in Key field '(ie GradID in the table). What I
got to work was
> to set
> up another table (GradOn) into which at the end of the
GradID+1 routine,
> the
> GradID was entered and when the form was submitted, it
ran a routine to
> delete
> the contents of GradOn. Then if the form was opened
again by another user,
> the
> first routine now was to check for a presence of a
record (any record) in
> the
> GradOn Table - if a record existed, it redirected to a
'Registration in
> Progress - Please try later page' ... again all worked
well, perfectly,
> until
> a. The user left the form open for hours
> b. The user used the browser to wuit the page instead of
the logoff which
> ran
> a routine to 'Delele * from GradOn'

Similar Messages

  • I need to download Adobe Macromedia Flash and Adobe won't let me download it until i get a 32 bit version of Firefox. Where on the website can I find this version?

    I'm using Windows 7 and Firefox 3.6.6 as a browser. I need to dowload some Adobe software like Flash and i can't do it because this version of firefox is a 64 bit app. I need a 32 bit FF app/where on the website can i dowload this?
    Thanks
    Tim

    You already have Shockwave Flash 10.2 r152 installed for Firefox on the PC you used to post here, see your ''More system details...'' next to your posting.
    There are no 64-bit builds of Firefox made, only 32-bit currently. There are some 3rd party builds floating around out there, but Mozilla doesn't allow them to be named Firefox - they would be called Namoroka for 3.6 versions. Mozilla does have a Minefield 64-bit build for 4.0-pre versions, but it won't be available as Firefox until probably Firefox 5 is released.
    If your situation is with a different PC than what you used to post here: <br />
    1.Download the Flash setup file from here: <br />
    [http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe Adobe Flash - Plugin version]. <br />
    Save it to your Desktop.<br />
    2. Close Firefox using File > Exit <br />
    then check the Task Manager > Processes tab to make sure '''firefox.exe''' is closed, <br />
    {XP: Ctrl+Alt+Del, Vista: Shift+Ctrl+ESC = Processes tab}
    3. Then run the Flash setup file from your Desktop.
    * On Vista and Windows 7 you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). <br />
    See this: <br />
    [http://vistasupport.mvps.org/run_as_administrator.htm]

  • Is the k209a-z e print enabled ? where is the code?

    is the k209a-z e print enabled ? where is the code?

    Hi,
    I can't find it anywhere only the following link:
       http://h10025.www1.hp.com/ewfrf/wc/documentSubCategory?tmp_task=prodinfoCategory&cc=us&dlc=en&lc=en&...
    Please check the following list to see is it an ePrint printer:
        http://h10025.www1.hp.com/ewfrf/wc/document?cc=hr&dlc=hr&docname=c02814760&lang=hr&lc=en&product=391...
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Where is the code for the  contentBackgroundColor  in the spark textArea

    Where is the code for the  contentBackgroundColor  in the spark textArea, I can't seem to locate it anywhere but you can set the contentBackgroundColor in the <s:TextArea tag

    Hi,
    may be it's helpful for you.
    http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
    Regards
    -Bechar

  • Why I need a code for rent a film and where ist the code? (I dont have a card)

    Why I need a code for rent a film and where ist the code? (I dont have a card)

    it's unclear what you mean
    you say you dont have a card which I guess is you don't have a creditcard
    in which case the other option is to pay by a giftcard which include a code which you put in
    because to rent you have to pay otherwise it's not really renting

  • APEX_COLLECTION - where does the code go?

    I am trying to create my first APEX collection.
    Where does the code go?
    Do I create a region as a PL/SQL anonymous block?
    Please advise -
    Regards,
    Stan

    Hi,
    I think best is create page process where you create/populate collection
    Br,Jari

  • Where on the Mac can I find the math symbol for Pi. Ie. what is the Unicode number for Pi.?

    Where on the Mac can I find the math symbol for Pi?
    Ie. what is the Unicode number for Pi.?
    I am using system 10.6.8
    Jubbjubb.

    Jubbjubb wrote:
    Where on the Mac can I find the math symbol for Pi?
    On the US keyboard layout, alt/option + p = π

  • Where on the card can I find out if it is a NB-MIO-16XL vs. 16XH

    Where on the card can I find out if it is a NB-MIO-16XL vs. 16XH

    Greetings,
    The part number can be used to obtain this information. It should be of the following form: 777227-01. Let me know the part number of your board,and I can tell you which of these two devices it is.
    Spencer S.

  • Where on the LWS can i find what our enterprise has downloaded?

    Where on the LWS can i find what our enterprise has downloaded?

    Hi Karlehem,
    If you are added as a Contact on LWS website then please login to LWS and click on Downloads. From the Download screen please select your Deploy to ID and then select Creative Cloud Pkgr from the Product name to download and create Adobe applications package.
    You can also refer to this link to use Creative Cloud Packager
    http://helpx.adobe.com/creative-cloud/packager.html
    Please let us know if it helps.
    Regards,
    Abhijit

  • TS3992 How can I back up an iphone when I haven't set the phone up for back ups & the touch screen doesn't work? The phone can receive calls (not answer) & the pictures & messages can be seen but touch screen doesn't work to unlock the phone or select any

    How can I back up an iphone when I haven't set the phone up for back ups & the touch screen doesn't work? The phone can receive calls (not answer) & the pictures & messages can be seen but the touch screen doesn't work to unlock the phone or select anything. We want to save/transfer pictures, contacts, and music to the replacement phone.

    Try backing it up to your computer with iTunes.  Connect it to your computer, open iTunes, click on the name of the phone in iTunes, go to the Summary tab of your iTunes sync settings and click Back Up Now.  Also go to File>Devices>Transfer Purchases to transfer you apps and other purchased media to your iTunes library.

  • What is the exact syntax for calling remote function module.

    Hi to all
    1.....what is the exact syntax for calling remote function module.?
    Thanks and regards,
    k.swaminath reddy

    hi
    good
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & check the pass value (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & check the pass value
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & check the pass value
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination 'XXXXXX'
    exporting
    p_num1 = 10
    p_num2 = 15
    importing
    p_tot = tot.
    write tot.
    please note that XXXXXX is RFC connection which is avialable in sm59 transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of XXXXXX in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    reward point if helpful.
    thanks
    mrutyun^

  • Can I call a function from a dll in LabVIEW that returns:double*string and int.?

    I have a function from a dll that return a double* string and an integer. How can I call this function from LabVIEW? There is a possibility to work in LabVIEW with a double* string?

    pcbv wrote:
    > Hello all,<br><br>The header of the function is:
    >
    > "HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems);"
    >
    > where WRAPI_NDIS_DEVICE have this form:
    >
    > typedef struct WRAPI_NDIS_DEVICE<br>{<br>
    > WCHAR *pDeviceName;<br>
    > WCHAR *pDeviceDescription;<br><br>}
    > WRAPI_NDIS_DEVICE;<br><br>
    >
    > The function is from WRAPI.dll, used for communication with wireless card.
    > For my application I need to call in LabVIEW this function.
    Two difficulties I can see with this.
    First the application seems to allocate the array of references
    internally and return a pointer to that array. In that case there must
    be another function which then deallocates that array again.
    Then you would need to setup the function call to have a pointer to an
    int32 number for the deviceList parameter and another pointer to int32
    one for the plItems parameter.
    Then create another function in your DLL similar to this:
    HRESULT WRAPIEnumExtractDevice(WRAPI_NDIS_DEVICE *lpDeviceList, long i,
    CHAR lpszDeviceName, LONG lenDeviceName,
    CHAR lpszDeviceDesc, LONG lenDeviceDesc)
    if (!lpDeviceList)
    return ERROR_INV_PARAMETER;
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceName, -1,
    lpszDeviceName, lenDeviceName,
    NULL, NULL);
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceDescription, -1,
    lpszDeviceDesc, lenDeviceDesc,
    NULL, NULL);
    return NO_ERROR;
    Pass the int32 you got from the first parameter of the previous call as
    a simple int32 passed by value to this function (and make sure you don't
    call this function with a higher index than (plItems - 1) returned from
    the first function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can we call custom functions in view objects?

    Can we call custom functions in view objects?these custom functions are from my backing bean...
    Please help.....

    User,
    You can certainly add code to your view objects to do whatever you like.
    However, it would be considered a very bad practice to call something in the backing bean from your view object. It violates the whole MVC design principle of ADF.
    Perhaps if you can share your real use case, someone will give you ideas about the best way to do it, but I, for one, would advise you to forget about calling a backing bean function from your view object.
    Best,
    John

  • Can LabVIEW call a function from a .sys file or is LabVIEW limited to dll access?

    My vendor has sent me a .sys file with functions accessing their hardware.  Can i call these function from labview directly or do I have to wrapper the .sys with a dll?

    Well a sys file is a kernel device driver. LabVIEW does not have any direct way of accessing such a driver. The way kernel drivers are accessed is usually through a DLL which makes calls to WinAPI functions such as CreateFile(), ReadFile(), WriteFile(), CloseHandle() and DeviceIORequest(). Since these WinAPI calls are basically just DLL calls too, you could theoretically use the Call Library Node to call them and access the kernel device driver in such a way.
    However for any kernel device driver with more than one or two device driver calls, it will certainly be easier in terms of development, debugging and maintenance of the code, to write actually a dedicated DLL in C/C++ for this device driver and access that DLL from LabVIEW, especially if you consider the LabVIEW datatype limitations when designing the DLL interface (Basically this same DLL can then be called from any other Windows development environment, be it Visual Basic (similar datatype limitation as LabVIEW), Delphi, (Visual) C, LabVIEW or also various scripting environments like Python and Lua.
    Some of the necessary WindAPI calls are rather involved and pose quite a bit of trouble to get the parameter data right in LabVIEw.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can we call a function module in ADHOC query

    Hi
    Can we call a function module in ADHOC query if yes how.
    Also we ned to know how to call a function module in SAP query.
    An early responce is appreciated.
    Thanks and best regards
    Rajeev

    Okay as far as I understand your aim is:
    To fill a field in the output list with a value that is based on the current line information and calculated by a function module
    So go to SQ02 and create an additional field in the InfoSet.
    You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
    More information is avaiable in the Help part look for additional field in SQ02.
    Regards,
    Michael

Maybe you are looking for

  • I am gravely disappointed in updating my iPhone 4 to i OS 5

    I am gravely disappointed in updating my iPhone 4 to i OS 5 Update for iPhone. It did every thing to update but at the end did not restore the files from back up and asked for a password to unlock the files. it was the first time ever I had updated m

  • Loop in Classification System

    Hi. I've discovered a loop in my classification system. Class 'A' has a subordinated one, named 'B' and class 'B' has class 'A' as its subordinated, so there's a loop that blocks my classification system. I can't break this loop. Any idea? Best regar

  • Old CRM 4.0 Javascripts (hard to make sense of)

    We're in the process of moving an on premise CRM from 4.0 to 2013.   Our goal is just to get an idea of what the original programmer was trying to do - and replicate the functionality in 2013 ideally NOT using javascript (but using javascript if nece

  • XRaid Performance Sub-Par for HD Video

    Hey Guys....I'm testing out my fully populated XRaid with AJA's Kona 2 System Checker. Starts out great, writing at around 272 Mbps. But then after a few seconds, it drops off to around 60 Mbps. Read times are even slower at around 30 Mbps. Here are

  • Appletv can't play bloomberg, wsj, trailer. . .

    My appletv can't play video from bloomberg, wsj, vimeo . . . Randomly with YouTube since I change to my new Buffalo WBMR HP G300H. The error prompt is: wsj live is unavailable. I'm in Vietnam. What should I do?  Thanks!