за една грешка
6 отговора
262 прегледа
за една грешка
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near '1'.
възниква на MS SQL2000 при ползване не (exec, execute)
Причината в сервера ли е или в MDAC 2.7
Line 2: Incorrect syntax near '1'.
възниква на MS SQL2000 при ползване не (exec, execute)
Причината в сервера ли е или в MDAC 2.7
Re: за една грешка
За да получиш коректен отговор, трябва да зададеш коректен въпрос namigam].
Така че първо напиши израза, който се опитваш да изпълниш...
И защо си сигурен, че причината не е в теб?
Така че първо напиши израза, който се опитваш да изпълниш...
И защо си сигурен, че причината не е в теб?
Re: за една грешка
възниква при различни програмисти на един и същ сервер, различни view, stored proc. и др.(при работещ SQL)
Re: за една грешка
Ami MS tva kazvat:
Error 170
Severity Level 15
Message Text
Line %d: Incorrect syntax near '%.*ls'.
Explanation
This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the Transact-SQL syntax element specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL syntax elements or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.
This example produces error 170:
USE Northwind
GO
SELECT &
FROM Categories
ORDER BY CategoryName ASC
Action
First, check the Transact-SQL statement syntax near the syntax element specified in the error message. Because Transact-SQL language syntax can be very complex, Microsoft® SQL Server™ may report the syntax error later in the Transact-SQL statement syntax than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.
In the above example, changing the ampersand (&) to an asterisk (*) corrects the problem:
USE Northwind
GO
SELECT *
FROM Categories
ORDER BY CategoryName ASC
Shto vse pak ne pokajesh kakav statement izpalniavash? Greshkata intermittent li e, mojesh li da ia povtorish ili si se poiaviava taka ot vreme na vreme?
V moia lichen opit sam poluchaval greshkata samo kogato sam podaval greshen SQL na SQL servera.
НЕ МЕ ЕБЕ КАК Е ВУТЕ, АЗ ГЛЕДАМ ДА СЪМ ДОБРЕ
Error 170
Severity Level 15
Message Text
Line %d: Incorrect syntax near '%.*ls'.
Explanation
This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the Transact-SQL syntax element specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL syntax elements or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.
This example produces error 170:
USE Northwind
GO
SELECT &
FROM Categories
ORDER BY CategoryName ASC
Action
First, check the Transact-SQL statement syntax near the syntax element specified in the error message. Because Transact-SQL language syntax can be very complex, Microsoft® SQL Server™ may report the syntax error later in the Transact-SQL statement syntax than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.
In the above example, changing the ampersand (&) to an asterisk (*) corrects the problem:
USE Northwind
GO
SELECT *
FROM Categories
ORDER BY CategoryName ASC
Shto vse pak ne pokajesh kakav statement izpalniavash? Greshkata intermittent li e, mojesh li da ia povtorish ili si se poiaviava taka ot vreme na vreme?
V moia lichen opit sam poluchaval greshkata samo kogato sam podaval greshen SQL na SQL servera.
НЕ МЕ ЕБЕ КАК Е ВУТЕ, АЗ ГЛЕДАМ ДА СЪМ ДОБРЕ
Re: за една грешка
polutchava se otvereme navreme(daje naprimer kogato se otvaria v Query Analizer
view za redaktirane, a sledvachtia put otvaria)
view za redaktirane, a sledvachtia put otvaria)
Re: за една грешка
Виждам, че и в чужбинските форуми си поствал тази информация, ама както си забелязал никой друг освен теб не смята това за бъг...
Има някаква вероятност това да е бъг (<0.0001%), но ти не даваш допълнителна информация (трябва с ченгела дума по дума да ти я вадим) - напр. версия на Win32 и SQLServer(Enterprice li e ili kakyw), инсталирани servise pack's както на SQLServera, така и на компютъра, други инсталирани приложения и т.н.
Инсталирай последните ServicePack's (май за MDAC2.7 още няма такъв, за SQL e SP2, a за Win2KServer - SP4) и виж какво ще стане. Ако и това не помогне - преинсталация на OS и SQLServer. Ако и това не помогне и SQLServer-a ти е лицензен (а не от Славейков) - тогава едно дълго писмо до Чичко Бил (и след 1 година ще ти е решен проблема)..., а ако не ти е лицензен - инсталация на SQLServer7.0(и MDAC<=2.6) ще реши проблема
.
P.S.
И аз отвреме навреме я виждам тази грешка, ама откакто започнах да слагам книжката с Т-SQL под възглавницата ми, и тази грешка нещо изчезна
.
Има някаква вероятност това да е бъг (<0.0001%), но ти не даваш допълнителна информация (трябва с ченгела дума по дума да ти я вадим) - напр. версия на Win32 и SQLServer(Enterprice li e ili kakyw), инсталирани servise pack's както на SQLServera, така и на компютъра, други инсталирани приложения и т.н.
Инсталирай последните ServicePack's (май за MDAC2.7 още няма такъв, за SQL e SP2, a за Win2KServer - SP4) и виж какво ще стане. Ако и това не помогне - преинсталация на OS и SQLServer. Ако и това не помогне и SQLServer-a ти е лицензен (а не от Славейков) - тогава едно дълго писмо до Чичко Бил (и след 1 година ще ти е решен проблема)..., а ако не ти е лицензен - инсталация на SQLServer7.0(и MDAC<=2.6) ще реши проблема
P.S.
И аз отвреме навреме я виждам тази грешка, ама откакто започнах да слагам книжката с Т-SQL под възглавницата ми, и тази грешка нещо изчезна
Re: за една грешка
A samo tazi greshka li se poluchava ili ima i drugi? Zavisi li ot natovarvaneto na servera? Razlichna li e chestotata na poluchavane za po-prosti i po-slojni expressioni? Kacheni li sa vsichki service pakove na windowsa i sql-a?
НЕ МЕ ЕБЕ КАК Е ВУТЕ, АЗ ГЛЕДАМ ДА СЪМ ДОБРЕ
НЕ МЕ ЕБЕ КАК Е ВУТЕ, АЗ ГЛЕДАМ ДА СЪМ ДОБРЕ