Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8181959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:41:58+00:00 2026-06-07T00:41:58+00:00

Right now I have an upload field while uploads files to the server. The

  • 0

Right now I have an upload field while uploads files to the server. The prefix is saved so that it can later be obtained for retrieval. For this I need to attach the ID of the form to the prefix. I would like to be able to do this as such:

 @filePrefix = SCOPE_IDENTITY() + @filePrefix;

However I am not so sure this would work because the record has not been created yet. If anything I could call an update function which obtains the ID and then injects it into the row after it has been created. To speed things up, I don’t want to do this on the server but rather do this on the database.

Regardless of what the approach is, I would still like to know if something like the above is possible (at least for future reference?) So if we replace that with

 @filePrefix = 5 + @filePrefix;

would that be possible? SQL doesn’t seem to like the current syntax very much…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:41:58+00:00Added an answer on June 7, 2026 at 12:41 am

    While you could use IDENT_CURRENT to try and predict this value I would advise against it.

    If you want to set the variable try this:

    SET @filePrefix = 5 + @filePrefix
    

    I’m a bit confused by your statement To speed things up, I don't want to do this on the server but rather do this on the database. What do you mean by this?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I have something like this in NHibernate: Expression.Like(property, value, MatchMode.Anywhere) and that
Right now i have a line of code, in vb, that calls a text
I have an app that basically can be used to download, upload, and manage
I have ~16,000 images I'm trying to upload to Amazon. Right now, they're on
I am lost right now with trying to upload an image to my server.
I'm working with NodeJS and I'm working on letting users upload files. Right now
Right now I have file upload/download through Entity Framework working but I see an
How does résumé upload work? I have a site in PHP and right now
Right now users have to two ways to send data to my application: upload
I have a form that a user uses to upload a CSV file. Right

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.