Меню

Sql server ошибка 80040e14

Проблемы

Ошибка во время выполнения «-2147217900 (80040e14)»: [Microsoft] [драйвер SQL Server ODBC] [SQL Server] в запросе используются операторы внешнего соединения, не относящиеся к ANSI («* =» или «= *»). Чтобы выполнить этот запрос без изменения, установите для свойства уровень совместимости текущей базы данных значение 80 или ниже, используя sp_dbcmptlevel хранимой процедуры. Настоятельно рекомендуется переписать запрос с использованием операторов внешнего соединения ANSI (левое ВНЕШНее соединение, ПРАВОе ВНЕШНее соединение). В будущих версиях SQL Server операторы соединения, не относящиеся к ANSI, не поддерживаются даже в режимах обратной совместимости, эта ошибка возникает в одном из следующих трех экземпляров.

  1. FDM 6,0 и 7,0 — ошибка в ФИНАНСОВом масштабе в формате строки для базы данных SQL 2005.

  2. FRL13, FDM 6,0 и 7,0 — ошибка при запуске мастера отчетов для базы данных SQL 2005.

  3. Отчеты с эталонными кодами, TREF, TPROJ получать ошибки для SQL 2005 DB.

Статус

Этот SMR был исправлен в пакете обновления для R07670 и последующих пакетах обновления, а также на веб-сайте (www.FRxSoftware.com) для обеспечения доступности пакетов обновления для главной книги. Вы также можете зарегистрироваться для автоматического уведомления о службах на нашем веб-сайте.

Обходное решение

Чтобы обойти эту ошибку, выполните указанные ниже действия, чтобы установить уровень совместимости базы данных в 80:

  1. В корпоративном диспетчере щелкните правой кнопкой мыши базу данных. Выберите пункт Свойства.

  2. Откройте вкладку Параметры.

  3. Измените уровень совместимости на 80.

Ссылки

Нужна дополнительная помощь?

I run the SSIS 2012 package and got following error.

SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E14.  An OLE DB record is available.  Source: «Microsoft SQL Server Native Client 11.0»  Hresult: 0x80040E14  Description: «Could not bulk load because
SSIS file mapping object ‘GlobalDTSQLIMPORT              ‘ could not be opened. Operating system error code 5(Access is denied.). Make sure you are accessing a local server via Windows security.»

I saw similar posts. The solution would be — set “Local Security Policy” — «create global objects».
I run the package by ‘Administrator’ user that permitted the «create global objects».

In the Connection manager, the authentication is ‘SQL Server Authentication’ and specified ‘sa’ user.

It is not remote environment. Run the package on the Server machine.

If I changed to Windows Authentication in the connection manager, it works fine.
If I switched OLD DB destination, the package works fine.

Any idea to solve this issue to keep ‘SQL Server destination’ and ‘SQL Server authentication’?

 0 

   

Распечатать

Ошибка СУБД:
Microsoft OLE DB Provider for SQL Server: Журнал транзакций для базы данных «zup» заполнен. Чтобы обнаружить причину, по которой место в журнале не может быть повторно использовано, обратитесь к столбцу log_reuse_wait_desc таблицы
sys. databases HRESULT=80040E14, SQLStvr: Error state=2, Severity=11,native=9002, line=1

или

Ошибка СУБД:
Microsoft OLE Provider for SQL Server: The transaction log for database “DataBase” is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column is sys.database
HRESULT=80040E14, SQLSTATE=4 2000, native=9002

Решение:
1. Посмотрите сколько свободного места осталось на дисках, может его нет и логу некуда записаться…
2. Это ошибка Microsoft SQL Server — переполняется лог транзакций и не очищается. Урезать его возможно различными способами, в том числе и с помощью стандартной оснастки, но не всегда данная операция получается, и размер файла лога остается прежним. Как вариант предлагаю следующее решение из двух строчек:
для использования убрать символ _

Код SQL

  use master
backup log myDataBase with T_runcate_only
use myDataBase
DBCC SHRINKFILE (myDataBase_Log,20)

Где myDataBase – имя базы данных, 20 – Размер лога в мегабайтах.

  • Remove From My Forums
  • Question

  • Any suggestions on this error message?

    Code: 0xC0202009     Source: Copy over client_pmt_3rd SQL Server Destination [40]    
    Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E14. 
    An OLE DB record is available.  Source: «Microsoft SQL Server Native Client 10.0»
     Hresult: 0x80040E14  Description: «Cannot fetch a row from OLE DB provider «BULK» for linked server «(null)».». 
    An OLE DB record is available.  Source: «Microsoft SQL Server Native Client 10.0» 
    Hresult: 0x80040E14  Description: «The OLE DB provider «BULK» for linked server «(null)» reported an error. The provider did not give any information about the error.». 
    An OLE DB record is available.  Source: «Microsoft SQL Server Native Client 10.0» 
    Hresult: 0x80040E14  Description: «The Bulk Insert operation of SQL Server Destination has timed out. Please consider increasing the value of Timeout property on the SQL Server Destination in the dataflow.». 
    End Error  Error: 2013-01-22 10:41:46.30    
    Code: 0xC020200E     Source: Copy over client_pmt_1st Flat File Destination [99]    
    Description: Cannot open the datafile «E:DataErrorsCP3Err.txt». 
    End Error  Error: 2013-01-22 10:41:46.30    
    Code: 0xC004701A     Source: Copy over client_pmt_1st SSIS.Pipeline    
    Description: component «Flat File Destination» (99) failed the pre-execute phase and returned error code 0xC020200E. 
    End Error  Error: 2013-01-22 10:41:56.24    
    Code: 0xC02020C7     Source: Copy over client_pmt_3rd SQL Server Destination [40]    
    Description: The attempt to send a row to SQL Server failed with error code 0x80004005. 
    End Error  Error: 2013-01-22 10:41:56.24    
    Code: 0xC0047022     Source: Copy over client_pmt_3rd SSIS.Pipeline    
    Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. 
    The ProcessInput method on component «SQL Server Destination» (40) failed with error code 0xC02020C7 while processing input «SQL Server Destination Input» (56). The identified component returned an error from the ProcessInput method. The
    error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. 
    There may be error messages posted before this with more information about the failure. 
    End Error  Error: 2013-01-22 10:42:42.80    
    Code: 0xC02090F5     Source: Copy over client_pmt_3rd ADO NET Source [1]    
    Description: The component «ADO NET Source» (1) was unable to process the data. Exception from HRESULT: 0xC0047020 
    End Error  Error: 2013-01-22 10:42:42.82    
    Code: 0xC0047038     Source: Copy over client_pmt_3rd SSIS.Pipeline    
    Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component «ADO NET Source» (1) returned error code 0xC02090F5. 
    The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. 
    There may be error messages posted before this with more information about the failure. 
    End Error  Error: 2013-01-22 10:42:42.84    
    Code: 0xC02092B5     Source: Copy over client_pmt_3rd SQL Server Destination [40]    
    Description: A commit failed.  End Error 
    Error: 2013-01-22 10:42:42.84     Code: 0xC0047018    
    Source: Copy over client_pmt_3rd SSIS.Pipeline    
    Description: component «SQL Server Destination» (40) failed the post-execute phase and returned error code 0xC02092B5. 
    End Error  DTExec: The package execution returned DTSER_FAILURE (1). 
    Started:  10:34:55 AM  Finished: 10:42:43 AM 
    Elapsed:  467.453 seconds.  The package execution failed. 
    The step failed.

    • Moved by

      Thursday, January 31, 2013 7:06 AM
      Not T-SQL.

Ошибка СУБД Microsoft SQL Server Native Client 11.0: «Журнал транзакций для базы данных переполнен». Причина: «LOG_BACKUP». HRESULT=80040E14, SQLSrvr: SQLSTATE=42000, state=2, Severity=11, native=9002, line=1

Описание ошибки:
В это публикации будет рассмотрена не только сама ошибка СУБД о переполнении журнала транзакций, но описание того, как уменьшить (очистить, сократить) журнал транзакций.

Найденные решения:

1C 8 ошибка СУБД SQL, журнал транзакций для базы данных переполнен

Эту ситуацию можно было отнести к части обслуживающих операций. Но дает знать о себе переполнение журнала транзакций СУБД в самые неподходящие моменты. Например, часто, при обновлении баз данных, поскольку частое выполнение операций по модификации данных базы приводит к увеличению размеров журнала транзакций. Старые записи журнала транзакций в некоторый момент могут стать не востребованными и могут быть удалены. Таким образом освобождается место для новых записей. Если вовремя не удалять старые записи журнала транзакций, то его файл может занять все свободное дисковое пространство и работа с базой данных станет невозможной, сопровождаемая приведенной ошибкой.

Рассмотрим 

Еще примеры того, как сократить журнал регистрации см. в публикации посвященной непосредственно этому вопросу в разделе часто задаваемых вопросов.

Рассмотрим один из примеров того, как сократить журнал транзакций.

Запускается SQL Server Management Studio. В ветке «Базы данных» дерева «Обозревателя объектов» находим базу данных по названию. Вызываем контекстное меню правой кнопкой мыши и в нем выбираем пункт «Создать запрос» и вводим текст:

BACKUP LOG [name_db] WITH TRUNCATE_ONLY
go
DBCC SHRINKFILE ([log_file])
go

, где [name_db] — имя (название) базы данных СУБД. В примере — «Бухгалтерия»;
, а [log_file] имя или путь к файлу журнала (лога) транзакций формата *.ldf. О том, как определить его название и местоположение см. ниже, в примере — «Бухгалтерия_log.ldf»

1С 8, ошибка, журнал транзакций для базы данных переполнен, как уменьшить, сократить журнал

Прежде чем «Выполнить» запрос нажатием соответствующей кнопки потребуется определить имя файла журнала транзакций. Можно просто искать его по названию базы и расширению на дисках сервера. А можно посмотреть в свойствах базы.

Для этого через то же контекстное меню, что уже вызывали ранее, переходим в «Свойства» базы данных SQL.

1С 8, руководство, инструкция, как сократить, уменьшить, файл, лог журнала транзакций SQL

В открывшемся окне «Свойств базы данных» переходим на страницу «Файлы». И смотрим «Путь» и «Имя файла» журнала транзакций в колонках таблицы «Файлы базы данных». Эти сведения и используем для заполнения в запросе для параметра [log_file].

1С 8, разрастается журнал транзакций *_log.ldf, MS SQL, как уменьшить, сократить

Так же можно на будущее настроить автоматическое сжатие журнала транзакций. Это изложено в документации на сайте SQL: настройка авторасширения и автосжатия в SQL Server

Оцените, помогло ли Вам предоставленное описание решения ошибки?




© www.azhur-c.ru 2014-2020. Все права защищены. Использование текстов и изображений с данной страницы без письменного разрешения владельца запрещено. При использовании материалов с данной страницы обязательно указание ссылки на данную страницу.

04-08-2021

Журавлев А.С.
(Сайт azhur-c.ru)

Published: 14 Mar 2013
Last Modified Date: 24 Aug 2022

Issue

When creating a calculated field, one of the following errors might occur:

Database error 0x80040E14: Case expresssions may only be nested to level 10
Database error 0x80040E14: Missing ), ], or Item in query expression

Environment

  • Tableau Desktop
  • Microsoft SQL Server or Access database

Resolution

Option 1

Rewrite case statement without nesting.

Option 2

Use an extract instead of a live connection to data source.
 

Cause

Database limitation of Microsoft SQL Server.

Additional Information

May also be a limitation of other Microsoft Data Sources.




Журнал транзакций для базы данных db_buh переполнен. Причина: LOG_BACKUP. HRESULT=80040E14

При обновлении бухгалтерии, на этапе сохранения, получил следующую ошибку:

Каталог не обнаружен ‘v8srvr://sql/acc_main/configsave/e0666db2-45d6-49b4-a200-061c6ba7d569.6b9d6525-ee94-4e13-b73d-82d3e8e8441d’

по причине: Каталог не обнаружен ‘ConfigSavee0666db2-45d6-49b4-a200-061c6ba7d569.6b9d6525-ee94-4e13-b73d-82d3e8e8441d’

по причине: Ошибка СУБД: Microsoft SQL Server Native Client 11.0: Журнал транзакций для базы данных «acc_main» переполнен. Причина: «LOG_BACKUP». HRESULT=80040E14, SQLSrvr: SQLSTATE=42000, state=2, Severity=11, native=9002, line=1

Идем на сервер и первым делом проверяем место на дисках,

А оно закончилось ) нужно потом почистить хард или увеличивать объем, а пока порежем лог

Открываем SQL Server Management Studio

Это ошибка Microsoft SQL Server — переполняется лог транзакций и не очищается. Урезать его возможно различными способами, в том числе и с помощью стандартной оснастки, но не всегда данная операция получается, и размер файла лога остается прежним. Как вариант предлагаю следующее решение из двух строчек( где acc_main — название базы Бух)

Код SQL

 USE acc_main
ALTER DATABASE acc_main SET RECOVERY SIMPLE
DBCC SHRINKFILE (acc_main, 50);
ALTER DATABASE acc_main SET RECOVERY FULL   

Результат выполнения:

Тоже самое можно сделать вручную:

Шаг 1. Установить модель восстановления Простая (Simple). Правой кнопкой на базе — Свойства(Properties) — Параметры(Options) — 4-й сверху пункт Модель восстановления(Recovery model) — Простая(Simple) — OK.

Шаг 2. Выполнить шринк (сжатие) лога транзакций. Правой кнопкой на базе — Задачи(Tasks) — Сжать(Shrink) — Файлы(Files) — установить Тип файла(File type) — Журнал(Log) — в Операция сжатия(Shrink action) — выбрать Реорганизовать страницы, перед тем осводить неиспользуемое место(Reorganize pages before releseasing unused space) — Сжать файл (Shrink file to) — указать приемлемый размер лога.

Шаг 3. Установить модель восстановления Полная(Full). Правой кнопкой на базе — Свойства(Properties) — Параметры(Options) — 4-й сверху пункт Модель восстановления(Recovery model) — Полная(Full) — OK.


В дополнении скажу, что можно сохранить лог в файл и выполнить шринк так(BaseDB — имя базы данных):

Код SQL

 BACKUP LOG BaseDB TO DISK = '<D:BackupBase_Log.trn'
DBCC SHRINKFILE (BaseDB_Log, 20) WITH NO_INFOMSGS   

Содержание

  1. Ошибка во время выполнения «-2147217900 (80040e14)
  2. Проблемы
  3. Статус
  4. Обходное решение
  5. Ole db error 0x80040e14
  6. Asked by:
  7. Question
  8. Ole db error 0x80040e14
  9. Answered by:
  10. Question
  11. Answers
  12. All replies
  13. Ole db error 0x80040e14
  14. Answered by:
  15. Question
  16. Ole db error 0x80040e14
  17. Answered by:
  18. Question
  19. Answers
  20. All replies

Ошибка во время выполнения «-2147217900 (80040e14)

Проблемы

Ошибка во время выполнения «-2147217900 (80040e14)»: [Microsoft] [драйвер SQL Server ODBC] [SQL Server] в запросе используются операторы внешнего соединения, не относящиеся к ANSI («* =» или «= *»). Чтобы выполнить этот запрос без изменения, установите для свойства уровень совместимости текущей базы данных значение 80 или ниже, используя sp_dbcmptlevel хранимой процедуры. Настоятельно рекомендуется переписать запрос с использованием операторов внешнего соединения ANSI (левое ВНЕШНее соединение, ПРАВОе ВНЕШНее соединение). В будущих версиях SQL Server операторы соединения, не относящиеся к ANSI, не поддерживаются даже в режимах обратной совместимости, эта ошибка возникает в одном из следующих трех экземпляров.

FDM 6,0 и 7,0 — ошибка в ФИНАНСОВом масштабе в формате строки для базы данных SQL 2005.

FRL13, FDM 6,0 и 7,0 — ошибка при запуске мастера отчетов для базы данных SQL 2005.

Отчеты с эталонными кодами, TREF, TPROJ получать ошибки для SQL 2005 DB.

Статус

Этот SMR был исправлен в пакете обновления для R07670 и последующих пакетах обновления, а также на веб-сайте (www.FRxSoftware.com) для обеспечения доступности пакетов обновления для главной книги. Вы также можете зарегистрироваться для автоматического уведомления о службах на нашем веб-сайте.

Обходное решение

Чтобы обойти эту ошибку, выполните указанные ниже действия, чтобы установить уровень совместимости базы данных в 80:

В корпоративном диспетчере щелкните правой кнопкой мыши базу данных. Выберите пункт Свойства.

Источник

Ole db error 0x80040e14

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

I run the SSIS 2012 package and got following error.

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: «Microsoft SQL Server Native Client 11.0» Hresult: 0x80040E14 Description: «Could not bulk load because SSIS file mapping object ‘GlobalDTSQLIMPORT ‘ could not be opened. Operating system error code 5(Access is denied.). Make sure you are accessing a local server via Windows security.»

I saw similar posts. The solution would be — set “Local Security Policy” — «create global objects».
I run the package by ‘Administrator’ user that permitted the «create global objects».

In the Connection manager, the authentication is ‘SQL Server Authentication’ and specified ‘sa’ user.

It is not remote environment. Run the package on the Server machine.

If I changed to Windows Authentication in the connection manager, it works fine.
If I switched OLD DB destination, the package works fine.

Any idea to solve this issue to keep ‘SQL Server destination’ and ‘SQL Server authentication’?

Источник

Ole db error 0x80040e14

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I receive this error on my company intranet page:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ‘angelo@companyname’ .
/asp/getEmployeeInfo.inc, line 429

The include file calls data from a sql server 2000 db; I do not see any errors on the db.

There has not been any server work to point that there have been changes to the server that would cause this to happen. It was working the previous day.
Any ideas?

Answers

It ended up that the code pulls names not from active directory, but a database where it needs to display names and logins. And when it came to a new perosn who has a name with an apostrophe in it, it had no idea what to do with it.

His last name is D’Angelo, while I was looking for Angelo as a first name.

So, the statement inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»‘

would always throw an error where there is an apostrophe in the name.

I took out the apostrophe, but I would like to know how to write statement to allow names with apostrophe.

If you’re the administrator of the system/database, please use SQL Profiler to find out what the query is. Besides, you can try ASP debug.

What you can do:
1. Try to get SQL Profiler logs if you’re the database administrator and see how you can fix the failure query. I’d suppose that the quotes are not paired right.
2. If not, please post the code around line 429 in /asp/getEmployeeInfo.inc and we can give you advices on this.

I cannot get to the sql profiler.

Here is line 429 in bold:

Public Function checkEmail(inEmail)

inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»

set rsEmail = connDB.execute(inSQL)

if rsEmail.eof then

set rsEmail = nothing

Please add some code to output the string inSQL before executing the SQL query so that you can get the result in client side(you might need to comment out the SQL query execution logic so that no error will be thrown and the client can get the response). After the content of inSQL is retireved, try executing it in sqlcmd.exe or any other query tool.

If the SQL Server you’re using is not SQL Server Express, you can find the SQL Profiler tool under start->Microsoft SQL Server XXX->performance tools

inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»

Hello peonysmiles,
I already tried the smiliar sql string as yours. It can work well with SQL Server 2000 and 2008
So can you display the value of «inSQL» by adding code «msgbox inSQL«,let’s see what value of it.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ‘angelo@companyname’ .
/asp/getEmployeeInfo.inc, line 429

Hi Peonysmiles,
I means that add statement as follow, and tell us the real value of inSQL.

Public Function checkEmail(inEmail)

inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»

msgbox inSQL

This is the error I receive after adding that line:

Microsoft VBScript runtime (0x800A0046)
Permission denied: ‘msgbox’

You are running your script at server side, it is not allowed to run msgbox.

Well, in order to know the value of SQL string, you have to collect ODBC trace by running odbcad32.exe.
You can do it by following the webpage http://www.easysoft.com/support/kb/kb00946.html It should be a way to collect right value of TSQL String.

After get the ODBC tracing, you can find the TSQL String by search » angelo@companyname». Show us the value of it.

Well, I followed the instructiions, but no logs were written. What am I doing incorrectly?

hi Peonysmiles,
First of all, you must make sure to enable ODBC Trace before staring appliation, or else, there is no any ODBC Trace was logged.

1. run odbcad32.exe
2. switch to tab windows «Tracing»
3. select a log file to save the trace.
4. press «Start Tracing Now»
5. Start up your application until get error
6. Press «Stop Tracing Now» to stop trace
7. you should find trace log.

Hi peonysmiles,
It seems that your ASP is running as a service, right? So, whenever you enable ODBC Trace, your ASP already runned.

So, first of all, suggest to disable your service, and enable ODBC Trace, then enable your service again.
Try it. Hopefullly , you can get right trace.
By the way, if you have another issue, please send email to me livecloud.su@hotmail.com directory. Let’s discuss the issue offline.

SQL Profiler is the easiest way to see exactly what is being sent to the server and why the syntax error is coming back. If you run profiler and trace SQL:BatchCompleted, SP:Completed, and User Error Messages you should see what is causing the problem directly. Look for the red events (error messages) and look just below it for the batch or stored procedure that generated the error. This is the easiest way I know to find out where my syntax errors are coming from. Once you know what the statement is, it is fairly easy to backtrack to the part of the program that is generating it.

Hope that helps,

John This post is provided ‘as is’ and confers no express or implied warranties or rights.

Источник

Ole db error 0x80040e14

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

We are using OLEDB Command transformation and we are updating the records in the destination.

The component was working fine always, but suddenly we are getting a failure and the below error.

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: «Microsoft SQL Server Native Client 10.0» Hresult: 0x80040E14 Description: «This operation conflicts with another pending operation on this transaction. The operation failed.». SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: «Microsoft SQL Server Native Client 10.0» Hresult: 0x80040E14 Description: «This operation conflicts with another pending operation on this transaction. The operation failed.»

I am not sure the reason behind getting this issue.

Any help is much appreciated !! Thank You..

Источник

Ole db error 0x80040e14

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I receive this error on my company intranet page:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ‘angelo@companyname’ .
/asp/getEmployeeInfo.inc, line 429

The include file calls data from a sql server 2000 db; I do not see any errors on the db.

There has not been any server work to point that there have been changes to the server that would cause this to happen. It was working the previous day.
Any ideas?

Answers

It ended up that the code pulls names not from active directory, but a database where it needs to display names and logins. And when it came to a new perosn who has a name with an apostrophe in it, it had no idea what to do with it.

His last name is D’Angelo, while I was looking for Angelo as a first name.

So, the statement inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»‘

would always throw an error where there is an apostrophe in the name.

I took out the apostrophe, but I would like to know how to write statement to allow names with apostrophe.

If you’re the administrator of the system/database, please use SQL Profiler to find out what the query is. Besides, you can try ASP debug.

What you can do:
1. Try to get SQL Profiler logs if you’re the database administrator and see how you can fix the failure query. I’d suppose that the quotes are not paired right.
2. If not, please post the code around line 429 in /asp/getEmployeeInfo.inc and we can give you advices on this.

I cannot get to the sql profiler.

Here is line 429 in bold:

Public Function checkEmail(inEmail)

inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»

set rsEmail = connDB.execute(inSQL)

if rsEmail.eof then

set rsEmail = nothing

Please add some code to output the string inSQL before executing the SQL query so that you can get the result in client side(you might need to comment out the SQL query execution logic so that no error will be thrown and the client can get the response). After the content of inSQL is retireved, try executing it in sqlcmd.exe or any other query tool.

If the SQL Server you’re using is not SQL Server Express, you can find the SQL Profiler tool under start->Microsoft SQL Server XXX->performance tools

inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»

Hello peonysmiles,
I already tried the smiliar sql string as yours. It can work well with SQL Server 2000 and 2008
So can you display the value of «inSQL» by adding code «msgbox inSQL«,let’s see what value of it.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ‘angelo@companyname’ .
/asp/getEmployeeInfo.inc, line 429

Hi Peonysmiles,
I means that add statement as follow, and tell us the real value of inSQL.

Public Function checkEmail(inEmail)

inSQL = » select emailaddress from employee where emailaddress = ‘» & inEmail & «‘»

msgbox inSQL

This is the error I receive after adding that line:

Microsoft VBScript runtime (0x800A0046)
Permission denied: ‘msgbox’

You are running your script at server side, it is not allowed to run msgbox.

Well, in order to know the value of SQL string, you have to collect ODBC trace by running odbcad32.exe.
You can do it by following the webpage http://www.easysoft.com/support/kb/kb00946.html It should be a way to collect right value of TSQL String.

After get the ODBC tracing, you can find the TSQL String by search » angelo@companyname». Show us the value of it.

Well, I followed the instructiions, but no logs were written. What am I doing incorrectly?

hi Peonysmiles,
First of all, you must make sure to enable ODBC Trace before staring appliation, or else, there is no any ODBC Trace was logged.

1. run odbcad32.exe
2. switch to tab windows «Tracing»
3. select a log file to save the trace.
4. press «Start Tracing Now»
5. Start up your application until get error
6. Press «Stop Tracing Now» to stop trace
7. you should find trace log.

Hi peonysmiles,
It seems that your ASP is running as a service, right? So, whenever you enable ODBC Trace, your ASP already runned.

So, first of all, suggest to disable your service, and enable ODBC Trace, then enable your service again.
Try it. Hopefullly , you can get right trace.
By the way, if you have another issue, please send email to me livecloud.su@hotmail.com directory. Let’s discuss the issue offline.

SQL Profiler is the easiest way to see exactly what is being sent to the server and why the syntax error is coming back. If you run profiler and trace SQL:BatchCompleted, SP:Completed, and User Error Messages you should see what is causing the problem directly. Look for the red events (error messages) and look just below it for the batch or stored procedure that generated the error. This is the easiest way I know to find out where my syntax errors are coming from. Once you know what the statement is, it is fairly easy to backtrack to the part of the program that is generating it.

Hope that helps,

John This post is provided ‘as is’ and confers no express or implied warranties or rights.

Источник

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Sql server ошибка 3201
  • Sql server ошибка 313