• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Getting sql error [Microsoft ][odbc microsoft access driver]numeric index out of range

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using MS ACCESS as a data base to insert some text into the table and getting this error.If i do not add alphanumeric character in the text field than its working , but when i am writing alphanumeric character in this address field than i am getting this error.
 
navinsingh dalal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please someone help me regarding this.
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Navin,
Note that this is an international forum. Due to work hours/sleep schedules, it can take up to 24 hours for people to see your post.

What does the DDL for customerdetails look like? In particular, how many columns and what types. Also, I recommend adding explicit column names to your query. That way you know Access is inserting the values in the order you intended.


 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which line of code produces the error?
 
navinsingh dalal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a table of customer details which have four column.name(text),address(memo(alphanumeric)),phone number(number),rank(text).When i am entering text in the address field ,its working fine,but when i am using text and numeric its giving this error.I don't know resolve it .I have google it but got found nothing about how to resolve this error.please help.
 
navinsingh dalal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jenne,

IF you don't write the column name it will select all the column.

Tom,

Its a run time error and it says sql error [Microsoft ][odbc microsoft access driver]numeric index out of range.And it comes when i am adding alphanumeric character to address field and it works fine when i am just entering text in address field.
 
navinsingh dalal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys for your efforts .The problem is solved now .Its a mistake done by me as i have selected wrong data type in database.
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

navinsingh dalal wrote:Jenne,

IF you don't write the column name it will select all the column.


Yes. In the order defined in the DDL. This means if that order cvhanges, the code won't work. Not something that happens often, but listing the columns is a good habit to get into. It also helps with readability.
 
this is supposed to be a surprise, but it smells like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic