Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Problem with SQL REPLACE function when connecting to MS Access
 

Problem with SQL REPLACE function when connecting to MS Access

Hello everyone! I am new here on this forum and not that experienced programmer. Maybe you can help me with a "big" problem for me.

I am writing my windows forms application and using an access database through a DAL for the SQL queries. I have a problem trying to use the replace function (and substr etc.) in SQL. I get the answer undefined function and have researched this to be not supported through the JET Db engine when connecting to Access!?

Is there any way to get this function (or something directly in the query) to work?

Since it didn't work I have made a temporary solution where I select the records that have the strings I want to update and then iterate through a foreach(blablabla row in table) etc., but that takes forever when I have sometimes thousands of rows to go through.

For example. Updating almost 7000 Descriptions in a Products table took ~15 minutes! Not great :)

I am not sure if I should include any code to help explain my structure, but maybe you recognize the situation?

Thanks for all tips in advance!
joakim_1976  Thursday, August 20, 2009 8:15 PM
Hi joakim,

After I read the question, there is some unclear point to me. So I want to discuss with you about the problem detail.

I have a problem trying to use the replace function (and substr etc.) in SQL. I get the answer undefined function and have researched this to be not supported through the JET Db engine when connecting to Access!?

First I think use DAL to access the database is a classic design for .net project which use database as back end storage. So I cannot understand what is the undefined function mean in your question? Why it doesn’t support JET db engine? Could you please post some code of your current project and tell me where the problem is?

I am willing to hear from you.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Monday, August 24, 2009 7:52 AM
We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post editor window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Monday, August 31, 2009 1:54 AM

You can use google to search for other answers

Custom Search

More Threads

• Add DateTimePicker Into Column Of DataGridView
• Help needed on using FindBy method
• Data not updated unless controls loose focus first.
• Double sort datagridview
• Incorrect row count
• Need help with combo box
• Selected datagridview columns reappear after being removed
• How to do simultaneous insert into another table on insert in datagridview bound table
• Allowing the user to choose the system dsn
• Free values in ComboBox in DataGridView