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

  • Home
  • SEARCH
  • 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 7525189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:28:19+00:00 2026-05-30T03:28:19+00:00

I get this error in PDO: error: Message: PDO::lastInsertId() [pdo.lastinsertid]: SQLSTATE[IM001]: Driver does not

  • 0

I get this error in PDO:

error: Message: PDO::lastInsertId() [pdo.lastinsertid]:
SQLSTATE[IM001]: Driver does not support this function: driver does
not support lastInsertId()

when trying to get last inserted id from an oracle database. I added the sequence string to the last insert id function but still not working. Google doesn’t say much regarding this error on Oracle with PDO.

  • 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-05-30T03:28:21+00:00Added an answer on May 30, 2026 at 3:28 am

    Oracle doesn’t have autoincrement columns, so lastInsertId isn’t supported in the same way as for MySQL. You have to implement the equivalent “by hand” using Oracle sequences.

    Create an oracle sequence for every table that requires it, and use NEXTVAL to retrieve it whenever you need to do an insert, then use that value when inserting in the table.

    $sh = $conn->prepare('SELECT uid_seq.NEXTVAL AS nextInsertID FROM DUAL');
    $sh->execute();
    $nextInsertId = $sh->fetchColumn(0);
    
    $sh = $conn->prepare("INSERT INTO table (id, data) VALUES(?, 255)");
    $sh->execute(array($nextInsertId));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error message in Eclipse: Access restriction: The type DirectoryWalker is not
I get this error when trying ruby script/console Rails requires RubyGems >= . Please
I get this error when trying to link a win32 exe project. I have
I get this error when trying to load a Zend Framework application: Fatal error:
All this afte rupgrading from 1.4.1 I get a quite specific error message: Next
I'm trying to get into PDO details. So I coded this: $cn = getConnection();
Basically, I get this error in my scripts: Fatal error: Call to undefined function
I get this 'error' when running PEVerify on a custom generated assembly. [MD](0x8013124C): Error:
I get this error when I run a django app ( dpaste ) Template
I get this error when I try to use time_ago_in_words : Comparison of String

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.