+ Reply to Thread
Results 1 to 9 of 9

run-time error '-2147467259(80004005)':

  1. #1
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    run-time error '-2147467259(80004005)':

    please help me out i getting an error

    [Mysql][ODBC 5.2(W) Driver][mysqld-5.6.16-log]Incorrect integer value;'WDS_ID'for column 'wds_id' at row 1

    Dim conn As New ADODB.Connection
    Dim server_name As String
    Dim database_name As String
    Dim user_id As String
    Dim password As String
    Dim database_table As String
    Dim count As Integer
    Dim cell As String
    'Dim cell_1 As String
    Dim cell_2 As String
    Dim count_2 As Integer
    Dim count_3 As Integer

    Do Until count = aHeight

    'repopulate the first cell
    cell_2 = "'" & esc(array_values(count_2, 1))

    'Populate the cell value
    Do Until count_3 = aWidth
    cell_2 = cell_2 & "'" & ", " & "'" & esc(array_values(count_2, (count_3 + 1)))
    count_3 = count_3 + 1
    Loop

    cell_2 = cell_2 & "'" 'add the last ' to the name

    'MsgBox (cell) 'debug
    'MsgBox (cell_2) 'debug

    'Run the query
    strSQL = "INSERT INTO " & database_table & " (" & cell_1 & ") VALUES (" & cell_2 & ")"
    'MsgBox (strSQL) 'debug
    conn.Execute (strSQL) 'execute the above query

    'Reset the variables for the loop
    count_2 = count_2 + 1
    count = count + 1
    count_3 = 1
    cell_2 = ""
    Loop

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: run-time error '-2147467259(80004005)':

    Looks like the column represented as an cell_1 is an integer column and you are trying to insert a string value into it.

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: run-time error '-2147467259(80004005)':

    i am still getting an error same

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: run-time error '-2147467259(80004005)':

    Your code treats every field as text and encloses the values in single quotes. That is not appropriate for a numeric field.
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: run-time error '-2147467259(80004005)':

    let me know what i do next to overcome this issue still i am getting the same problem

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: run-time error '-2147467259(80004005)':

    You would need to check each value to see if it's a number - something like this:
    Please Login or Register  to view this content.
    If you have text columns that look like numbers, this may not work.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: run-time error '-2147467259(80004005)':

    Welcome to the forum.

    We'd like to help you but first..

    Pls take some minutes to read forum rules and specially-in this case- rule#3 and add code tags around your code.
    Then anyone will be able to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  8. #8
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: run-time error '-2147467259(80004005)':

    i have used this code but showing that subscript out of range
    Please Login or Register  to view this content.

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: run-time error '-2147467259(80004005)':

    I take it there's no point in posting in this thread anymore?

    http://www.excelforum.com/excel-prog...-80040e14.html
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Run-time error '-2147467259(80004005)'
    By Lloyd Blankfein in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-14-2013, 01:52 PM
  2. Excel 2010 Run Time Error '-2147467259 (80004005)'
    By jdpeterson72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 06:52 PM
  3. [SOLVED] Run time error '-2147467259 (80004005) adding icon
    By DMc2005 in forum Excel General
    Replies: 3
    Last Post: 10-02-2005, 12:05 PM
  4. [SOLVED] Run time error '-2147467259 (80004005) adding icon
    By DMc2005 in forum Excel General
    Replies: 3
    Last Post: 10-02-2005, 12:05 PM
  5. Run time error '-2147467259 (80004005) adding icon
    By DMc2005 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2005, 12:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1