Quantcast
Channel: MySQL Forums - Microsoft Access
Viewing all 487 articles
Browse latest View live

ALTER TABLE FOREIGN (3 replies)

$
0
0
Hi:

Three tables. users, users_initial and users_dues

Trying to set relation form users_dues to users_initial in php MyAdmin SQL

SQL query:

ALTER TABLE users_dues
ADD FOREIGN KEY (user_id)
REFERENCES users_initial(user_id)
ON DELETE CASCADE
ON UPDATE CASCADE;

MySQL said: Documentation
#1146 - Table 'bwmjcmus_mem_mgr.users_dues' doesn't exist

The table does exist. Don't understand

bwmjcmus_mem_mgr

Procedures
Tables
Tables
sessions
users
users-dues
users-initial

Also, why isn't there an ON INSERT CASCADE?

SQL & substring function (2 replies)

$
0
0
Odd situation:

This works fine stand alone test in php MyAdmin SQL:
select concat(substring(forename, 1,1),'bwm' ,substring(lastname, 1, 1)) from users where user_id = 152;

Output WbwmW for example.

However when same code included as parameter for placeholder:

Error Warn Log:

[Sat Apr 7 19:13:06 2018] update_tables.cgi: insert statement = 'insert into users (user_id,username,password,pin,position,forename,lastname,business,address1,address2,city,state,zip, email, phone_home, phone_cell, MJ, MD, DD, DP, comments) values ((SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='users'),CONCAT('bwm', (SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE()AND TABLE_NAME='users')), ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)' at update_tables.cgi line 973.


$value = $sth->execute ($password_1, (select concat(substring($forename_1, 1,1),'bwm' ,substring($lastname_1, 1, 1))), $position_1, $forename_1, $lastname_1, $business_1, $address1_1, $address2_1, $city_1, $state_1, $zip_1, $email_1, $phone_home_1, $phone_cell_1, $MJ_1, $MD_1, $DD_1, $DP_1, $comments_1) or die "Unable to execute query: " . $sth->errstr;


[Sat Apr 7 19:13:06 2018] update_tables.cgi: Undefined subroutine &update_tables::substring called at update_tables.cgi line 979.

Undefined subroutine. Strange.

Access to MySql (1 reply)

$
0
0
I wish to convert from MS Access to MySql in my VB6 programs.

I am using Access now with DAO and wish to change my VB6 programs to use MySql with the minimum of changes.

1. Can I connect via say ODBC directly and update and edit directly with recordsets from my VB6 program as I do in DAO or even ADO or do I have to use PHP?

2. Does MySql have individual files which I can copy from computer to computer like Access or is it a total installation which is needed to function as a database.

Thanks.
PK

Access not displaying new rows in linked table (2 replies)

$
0
0
I have successfully made a linked table from access to my MySQL database and it successfully writes changes made in one to the other. However, if I add a new row to my MySQL table is does not show up in access. How can I get the new row to be displayed automatically?

VBScript working with new MYSQL DB, but I can't update changes via ODBC (no replies)

$
0
0
Hello,

I have successfully migrated my Access databases to MYSQL 5.7 using Workbench 8.0 on a winServer 2012 machine. The pages are showing data and I'm going about changing the connect scripts in hundreds of pages of a site that I built in 1999.

I'm sticking with VBSCRIPT for now (One big change at a time ;-). The problem is that I can't get rs.update to work when I try to update db from the web. I get this error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[MySQL][ODBC 8.0(w) Driver][mysqld-5.7.20-log]Build WHERE -> insert_fields() failed.

This is my conn script connecting to three tables:

<%Set Conn_Main = CreateObject("ADODB.Connection")
Conn_Main.Open "DSN=vpa_main;"

Set rsP = CreateObject("ADODB.Recordset")
rsP.CursorLocation = 3
rsP.Open "SELECT * FROM people ORDER BY name_last" , conn_main, 3, 3

Set rsS = CreateObject("ADODB.Recordset")
rsS.CursorLocation = 3
rsS.Open "SELECT * FROM schools ORDER BY name" , conn_main, 3, 3

Set rsSU = CreateObject("ADODB.Recordset")
rsSU.CursorLocation = 3
rsSU.Open "SELECT * FROM su ORDER BY name" , conn_main, 3, 3%>




Then the script in the page opening the "schools" table as a dataset:

Set rsUser = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM schools WHERE ID = " & SID
rsUser.open SQL, conn_main, 3, 3



I'm connectiong using the ODBC Data Source Administrator (64-bit), Unicode.

The user is root with all permissions.


I'm stuck!!

Any help would be great!

Peter

Migration failing (no replies)

$
0
0
I'm following the steps to migrate the databae but I keep getting an error at reverse engineer source step

Starting...
Connect to source DBMS...
- Connecting...
Connecting to ...
Opening ODBC connection to DSN=Employee19...
Traceback (most recent call last):
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_msaccess_re_grt.py", line 701, in connect
return MsAccessReverseEngineering.connect(connection, password)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_msaccess_re_grt.py", line 152, in connect
con = db_driver.connect(connection, password)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\db_driver.py", line 95, in connect
connection = library.connect(connection_string, password=password)
pyodbc.Error: ('HY000', 'The driver did not supply an error!')

Traceback (most recent call last):
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 70, in run
self.func()
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_schema_selection.py", line 168, in task_connect
if not self.main.plan.migrationSource.connect():
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 199, in connect
self._rev_eng_module.connect(self.connection, self.password or "")
SystemError: Error("('HY000', 'The driver did not supply an error!')"): error calling Python module function DbMsAccessRE.connect
ERROR: Error during Connect to source DBMS: Error("('HY000', 'The driver did not supply an error!')"): error calling Python module function DbMsAccessRE.connect
ERROR: Exception in task 'Connect to source DBMS': SystemError('Error("(\'HY000\', \'The driver did not supply an error!\')"): error calling Python module function DbMsAccessRE.connect',)

Failed

Migration from Access to MySQL (no replies)

$
0
0
I have MS Access for Office 365. I am trying to follow the instructions on how to migrate using MySQL Workbench Migration Wizard.

I thought that I needed a 64 bit ODBC driver for Access, but according to a tech from Microsoft, there is only a 32 bit driver, but since the 32 bit driver is located in c:\windows\SysWOW64, then it should work. However, when I click on "Open ODBC Administrator" and got to the Drivers tab, there is no Access driver listed.

Can anyone point me to a step-by-step tutorial as I am completely lost.

ACCESS 2003 and MySQL - problems with linked tables (no replies)

$
0
0
Hi,
I have an application developed via MS-ACCESS 2003.
I migrated the data (ACCESS tables) to a MySQL 5.7.25.
Then, I linked the MySQL tables to the ACCESS.
Most of data works correctly (viewing the tables content and accessing the data via the Forms).
I have a problem with 2 table:

1. Table contains list of activities (5 fields per record): up to 210 records, all works fine. After adding record no. 211, there is a problem:
when opening the table in ACCESS in view mode, I get the "ODBC - call failed" message, and only 86 records are displayed, where all fields have "#Name?" value.
But, when accessing the table data from the Forms, the data is OK.

2. Table contains list of people details (name, address, etc.): In case of few records in this table, all works fine. But when using the full data (197 records), there is a problem:
In view mode in ACCESS, I can see all data correctly. But I cannot access the data from my Forms. The table and fields are not recognized in the code.

Hope you can help me with these issues. THANKS!

Buy real registered passports((www.supportdocuments24hrs.com (no replies)

$
0
0
real registered passports (www.supportdocuments24hrs.com) driver's license, identity card

We only offer original passport, driver's license, identity cards, visas, stamps and other documents for the following countries: Australia, Belgium,

buy Brazil, Finland, France, Great Britain, Ireland, Italy, Netherlands, Norway, Austria, Sweden, Switzerland, Spain, Great Britain, USA and some others.
We offer you one of the best services in the world. Most customers have experienced our true service.

Buy online passport
buy identity card online
Buy online driving license
Buy the residence permit online
Buy / Get Citizenship Online
Buy Online Documents

Our website ..http //: www.supportdocuments24hrs.com
http //: www.supportdocuments24hrs.com

http //: www.supportdocuments24hrs.com

http //: www.supportdocuments24hrs.com

http //: www.supportdocuments24hrs.com

Contact emails ......... documents24hrs@gmail.com

WHATSAPP ......... 1 (201) 701-0871
Skype ........ berning121


Fake passport
buy fake ID card
Buy a license
buy fake

Our website ..http //: www.supportdocuments24hrs.com
http //: www.supportdocuments24hrs.com

http //: www.supportdocuments24hrs.com

http //: www.supportdocuments24hrs.com

http //: www.supportdocuments24hrs.com


WHATSAPP ......... 1 (201) 701-0871

Skype ........ berning121


buy real and fake passport
buy real and wrong driver's license
Buy a real and false identity card
buy real and false citizenship
buy real and false citizenship
Buy real and fake papers

Our website ....... http //: www.supportdocuments24hrs.com

Contact emails ......... documents24hrs@gmail.com

WHATSAPP ......... 1 (201) 701-0871

Skype ........ berning121

Access form ODBC error using "GET DIAGNOSTICS" (1 reply)

$
0
0
It's well known that Accesss forms don't return the exact ODBC error message. If you perform an insert without setting a NO NULL field to a value it just returns "ODBC call failed" rather than e.g. "'Field ''table1col3Nonnull'' doesn''t have a default value'".

You can use DAO or ADO and return the precise error after performing a query in DAO or ADO but when the query is called by an Access form the only error returned is "ODBC call failed".

I tried using this function:

CREATE FUNCTION `new_function` ()
RETURNS VARCHAR(5)
BEGIN
GET DIAGNOSTICS CONDITION 1 @p1 = RETURNED_SQLSTATE, @p2 = MESSAGE_TEXT, @p3 = MYSQL_ERRNO;
RETURN @p1;
END

The function works fine when called from MySQL workbench but returns null when called from VBA e.g.:

Set rs = db.OpenRecordset("SELECT mydb.new_function();", dbOpenSnapshot, dbSQLPassThrough)
Debug.Print rs.Fields(0)

This returns null (and subsequent calls to the function from within MySQL workbench does return the error code meaning that the diagnostics area is still populated with the error.

When the function is changed to:

CREATE FUNCTION `new_function` ()
RETURNS VARCHAR(5)
BEGIN
GET DIAGNOSTICS CONDITION 1 @p1 = RETURNED_SQLSTATE, @p2 = MESSAGE_TEXT, @p3 = MYSQL_ERRNO;
RETURN "Testing";
END

Set rs = db.OpenRecordset("SELECT mydb.new_function();", dbOpenSnapshot, dbSQLPassThrough)
Debug.Print rs.Fields(0)

Returns "Testing" as expected.

I've also tried "SHOW ERRORS;" but this returns null as well.

Does anyone know if ODBC/VBA can return variables ok? Or is it just that "GET DIAGNOSTICS" doesn't work when called from ODBC/VBA?

Or does anyone know of another method to return the precise error?

Using Access Linked Tables (no replies)

$
0
0
Help me please!

I have an MS Access 2010 application that has 25 or so users. Due to corruption issues, I have converted it to MySQL and it is working fine with one exception. The first time one of the "Linked" tables is accessed anywhere in the application, the screen pops up to have the login info entered. I would like to add code to log in from the VBA front end to access each of the linked databases with the user ID and Password before any of the tables are accessed. I can't seem to get the right VBA code to accomplish this.

Thanks

Linked tables (no replies)

$
0
0
Hi,
I have a working msaccess Database but recently I rebuilt the tables in MySQL. On linking the tables, the fields that had primary keys(auto increment) in MySQL are now in number data type in access 2016 instead of AutoNumber, and I can't change them.
Any help will be much appreciated.
Fred

Is there a generator or frontend for MYSQL databases for crud operations like in Microsoft Access? (no replies)

$
0
0
Hello,

You know that good old Microsoft Access database: On Windows, you can create forms with subforms, views, etc. You can browse trough all the records using forms, edit data, etc.

It is easy and straightforward; So, I'd like to achieve similar functionality with my MYSQL database on my apache website; Is there some web-form generator or frontend to generate similar interface like Microsoft Access, but in web pages residing on my 'contracted' linux web server with apache on it ? (if it's also responsive it would do better).

I'm Looking for a semi-automated tool; I don't want to develop the whole thing myself.

I imagine that something have to exist that, let's say, generates a basic form from table CUSTOMERS, and then you can edit it in a web-based form designer...

And I suppose, as MYSQL is so popular, that it MUST EXIST, and that it shoud be free alternatives there... Am I wrong ?

Thanks !

SQL Error: 1168"): error calling Python module function DbMySQLRE.reverseEngineer Failed (no replies)

$
0
0
Hello All,

I am Trying to migrate on Sql Server which is running in windows to Linux and getting error as below. Anyone please help me out.

- Retrieving table ahrs.email...
Traceback (most recent call last):
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_mssql_grt.py", line 266, in reverseEngineer
result = execute_query(connection, "SHOW CREATE TABLE `%s`.`%s`" % (escape_sql_identifier(schema_name), escape_sql_identifier(table_name)))
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_mssql_grt.py", line 43, in execute_query
return get_connection(connection_object).executeQuery(query)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\db_utils.py", line 364, in executeQuery
raise QueryError("Error executing '%s'\n%s"%(query, error), code, error)
workbench.db_utils.QueryError: Error executing 'SHOW CREATE TABLE `ahrs`.`email`'
Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist.
SQL Error: 1168

Traceback (most recent call last):
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 197, in thread_work
self.func()
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_schema_selection.py", line 183, in task_reveng
self.main.plan.migrationSource.reverseEngineer()
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 364, in reverseEngineer
self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)
SystemError: QueryError("Error executing 'SHOW CREATE TABLE `ahrs`.`email`'
Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist.
SQL Error: 1168"): error calling Python module function DbMySQLRE.reverseEngineer
ERROR: Reverse engineer selected schemas: QueryError("Error executing 'SHOW CREATE TABLE `ahrs`.`email`'
Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist.
SQL Error: 1168"): error calling Python module function DbMySQLRE.reverseEngineer
Failed

move a simple db from access to web (1 reply)

$
0
0
Hello i have a very simple database in access, a kind of anagraphic, name, date of birth, geneder, nationality and so on
I would like to be able to have a similar application online, so that users can insert data and make simples query(all male, all male from nationality ecc)
I don't need to take the orignal application in access, i would just need to be able to import the records..about 1500

I make this for an Onlus, little momney available, would be great if there is a free solution on line, or maybe a wordpress plugin, in any case not much programming hopefully

Thanks a lot

Query transform / pivot (2 replies)

$
0
0
Hi, I'm new on this, I'm traying to do a Query that works in Access, but not in MySQL.. can anybody help?

This is my Query:

TRANSFORM Sum(Total) AS SumOfTotal
SELECT Client, Sum(Total) AS Sum_Total
FROM Remission
WHERE (((Year(DatePay))=2020) AND ((Month(DatePay))=1))
GROUP BY Client, DatePay
PIVOT DatePay;

Thanks in advance!

Trouble with Generated Column (2 replies)

$
0
0
Not sure if this is correct forum for this issue.
I'm trying to migrate a Microsoft Access back-end database to MySQL, and having problems with generated columns. Couldn't get migration assistant to work properly, so used a 3rd-party tool to migrate my tables. This created the tables but I have to fix some things before populating data.

In Access I have some calculated columns. For example, the 'Heading' column is a combination of title (Mr & Mrs, etc.) and names and spouse names.

Here is calculation in Access to build a heading:

IIf([UseTitle],[Title] & " ","") & IIf(IsNull([DonorFirstName]),[DonorLastName],[DonorFirstName] & IIf(IsNull([SpouseName])," " & [DonorLastName],IIf(IsNull([SpouseLastName])," and " & [SpouseName] & " " & [DonorLastName]," " & [DonorLastName] & " and " & [SpouseName] & " " & [SpouseLastName])))

(In Access, IIF is same as MySQL IF function)

So if I'm supposed to use a title, put that in.
If first name is null, add last name (that's how this database denotes a company name). Otherwise, add first name. If no spouse name, add space and last name. If spouse, add " and " plus spouse first name. Then add last name. So now you have "Mr. & Mrs. John and Jane Doe". In case the spouse has a different last name, it will instead build a string like "Mr. & Mrs. John Doe and Jane Smith".

I tried doing this in MySQL generated column, but it keeps erroring out. It seems to work, then when I go into the table designer in Workbench, it says Error parsing DDL. When I view the DDL, the calculated column shows the error on the Heading column:

`Heading` varchar(509) CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (concat(if(((`UseTitle` = 0) or (`Title` is null)),_utf8mb3'',concat(`Title`,_utf8mb3' ')),`DonorFirstName`,_utf8mb3' ',`DonorLastName`)) VIRTUAL,

The squiggly red line is at _utf8mb3'', right under the ''. It says "Syntax error: extraneous input found - expected 'comma'".

This is using a very simple generated field for a test, trying to combine only 2 or 3 columns.
It's very strange that the DDL will create a new table, then give me a syntax error when I try to open the table designer in Workbench.

Is there a better way to accomplish this rather than a bunch of contats with IF statements like I'm doing?

Thanks...

get odbc error info (no replies)

$
0
0
i'm testing my login to remote mysql, and want to show message if invalid user/pwd. I first got a generic 3151, then added and checked DBEngine.Errors - still get a generic message (same message for network down or invalid user/pword)

where/how could the specific error message such as "authenticaton failed"?

thanks!

convert to uppercase or just display? (2 replies)

$
0
0
I have varchar() fields on an access form, and want them to be uppercase.

should i convert on the access client on entry?
or on remote MYSQL server?
or neither,, and just display/format them for viewing on access form or reports?

thanks!

Convert Access Latin1 to utfmb4 problem (1 reply)

$
0
0
I have a problem converting legacy Access databases to MySQL. Access ported over multiple generations and in .accdb format. I assume they are encoded in Latin 1 case insensitive accent sensitive. I am wrestling with early poor decisions Access allowed me to make and I was too naive to know better.

The main field is a varchar field 255 char ("Title") with a unique index and contains text strings. The database is a long annotated list of single words and phrases. Most are short, but hundreds of thousands of entries are over 191 characters. I need them to be unique and accent sensitive (e.g. Aché are indigenous peoples in Paraguay. ache is to hurt).

If I import to utf8mb4, the maximum index length is 191 characters. I don't really need universal character and emoji capability in the Title field, but I do with others. I can create a "tiebreaker field" (188 char + 3 char tiebreaker unique index), But then I have the problem of identifying all the duplicates beforehand, and imports to MySQL drop hundreds of thousands of records.

I spent many hours trying to find documentation of this issue on the web. I've not encountered comprehensive treatments of these kinds of collation issues. I'm even only guessing at Access collation, since I haven't found a way to get Access to reveal it's exact encoding.

Any links or search terms I can use that are not so generic I just get hundreds of pages on collation-free descriptions of performing ideal transfers?
Viewing all 487 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>