473,753 Members | 7,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting records to MYSQL using ODBC

Hello,

im using MS Access as a front end to link to MYSQL. although this is
possibly an Access issue i thought someone would be able to help me.
the error message "ODBC--insert on a linked table 'tablname' failed" is
displayed when i attempt to insert records to the MYSQL table.

Does anyone know of a way round this ?? im using the most recent MYSQL
driver and i have only text fields in my insert statement.

any help appreciated.

CG

May 15 '06 #1
2 2422

"csgraham74 " <cs********@gma il.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. .
Hello,

im using MS Access as a front end to link to MYSQL. although this is
possibly an Access issue i thought someone would be able to help me.
the error message "ODBC--insert on a linked table 'tablname' failed" is
displayed when i attempt to insert records to the MYSQL table.

Does anyone know of a way round this ?? im using the most recent MYSQL
driver and i have only text fields in my insert statement.

any help appreciated.


The error message is, of course, very general and unhelpful.

How was the insert created? Did you use the Access query builder? If so
it's not likely you have a bad SQL statment. Or did you write the "INSERT"
statement yourself? I make mistakes all the time - and I'm an expert ;-)
It would be helpful to post your SQL INSERT statement here.

I'm going to assume that you can double click on the linked table and when
you do, Access brings up the table record view.

A few of the most common problems:

1) The usr/pwd used to set up the linked table ODBC does not have
permission to INSERT/DELETE records. You can view records (SELECT) but you
can not INSERT or DELETE. You may want to try this directly in the Access
table view. You should be able to go to the end of the table and type in a
new record manually.

2) The MySQL table structure has been altered since the link was created
and it needs to be updated/refreshed. Access is confused about the table
structure. A common situation because you can change the table structure in
MySQL and neglect to tell Access about it!

3) You have a malformed SQL statement - not likely if you used the
Access query builder.

There's more but I think that's probably 99%+ of all the problems your
likely to see ;-)
Thomas Bartkus
May 15 '06 #2
thanks for that - im sorry for the lack of information.

Basically i used the Access query builder to build an insert query. Its
a very simple table inserting one automunber field & text/memo fields.
this inserts into a table with integer in MYSQL and varchar. I probably
think the problem relates to ur first suggestion.

I suppose all i have to do is use the root account to test this - il
give it a whirl later.
thanks

again

May 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2906
by: Frank Pryor | last post by:
Hello, I'd appreciate suggestions as I hash out my idea. Perhaps I'm going about this the wrong way. I have users using a third party windows application. They can export data from this application directly to a text file (CSV). So far as I know, there is no way to make this application talk directly to the MySQL server. We're talking thousands of records here - it's not practical to have an HTML
20
4821
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " . mysql_error()); echo "Connected successfully"; mysql_close($link);
9
5983
by: atse | last post by:
Hi, My table in the database may contain duplicate records, which means except the primary key (auto_increment) field is unique, all or almost of all the fields are with the same content. How can I select them to display and delete them? Thanks for any idea. Atse
10
4683
by: TS | last post by:
I hope someone here can help me. We are currently looking at redeveloping the membership database for out church. It is mainly usd to hold details of our members, produce reports etc. I am investigating both mysql and MS Access. Ultimately I would like the front end to be browser based, both for querying and entering data. Are there basic membership databases that can be downloaded from the web
7
9294
by: jj | last post by:
It's taking forever to upload 400,000 records to the database through access/odbc, and I've tried phpMyAdmin's interface but it seems to timeout during import of a CSV file. Is there a better way to import 400,000+ records?
2
8781
by: FizzBin | last post by:
We are writing a C application that is using ODBC to insert records into a database. We have a NOT NULL column that can legitimately have an empty value, i.e. we know the value and it is empty (i.e. a zero length string). We are using SQLBindParameter() to bind a variable to the parameterized insert statement <<in the form: INSERT INTO table VALUES (?, ?, ?)>>. We are using SQLExecDirect() to process the SQL. We are running into the...
11
11990
by: Matt | last post by:
Hi everyone, still pretty new to MySQL. I was wondering if there is a way to automatically filter records based on a mysql userlogin name?? I have serveral databases that I want to combine in order to manage the databases more efficiently. - I'm currently using MySQL 4.1.12 and I'm currently testing 5.0.14 - I have a databases for each user account. - Each database has the same schema and entity relation model.
3
2305
by: Mike | last post by:
Using MS Access XP standard install (no Jet or MDAC updates applied yet) as front end, MySQL 4.0 as backend and MySQL ODBC connector version 3.51. When pasting multiple records into the database either in a form or directly in the table, all records / fields display #deleted in each column. This only happens when pasting multiple records, if a single record is pasted, the #deleted comment does not appear. When I refreash the view, the...
2
1709
ak1dnar
by: ak1dnar | last post by:
Hi, I am getting some sql errors when trying to insert a record to mysql table using asp.net application. Let me explain the scenario for your reference. This asp.net web form is executing perfectly when i am trying it in my localhost. The error is getting when I tried it with my hosting server. System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Dr_no', table 'myDB.username.tablename'; column does not...
0
9072
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8896
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9451
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9421
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9333
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8328
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2872
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.