Friday, March 30, 2012
Increase field size AND linked tables
versus the current 11, but the message is that I can't do the modification
due to linked tables. I believe the modification must be done at the server
,
but I wouldn't know where to start. It would seem that it should be an easy
fix if someone could point me in the right direction. I hate to call the
tech guys out to open a couple windows and type 16. The database was done i
n
access converted to SQL.
ThanksDear rtucker913,
Please post DDL or any example which clarifies your request.
Thanks in advance,
"rtucker913" wrote:
> I would like to increase a field size to allow input of up to 16 character
s
> versus the current 11, but the message is that I can't do the modification
> due to linked tables. I believe the modification must be done at the serv
er,
> but I wouldn't know where to start. It would seem that it should be an ea
sy
> fix if someone could point me in the right direction. I hate to call the
> tech guys out to open a couple windows and type 16. The database was done
in
> access converted to SQL.
> Thankssql
Wednesday, March 28, 2012
Incorrect syntax near Waltz !
Hello to everyone,
I am developing a web site connected to an sql server 2000.I recently stepped onto this error message.I googled it but didn't find anything.
I do not have any variables,tables or fields named this way.
Have you guys met this error message before?
thanks in advance
Line 1: Incorrect syntax near 'Waltz'.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details:System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'Waltz'.
Source Error:
Line 289:
Line 290: UpdateFilename.Connection.Open()
Line 291: UpdateFilename.ExecuteNonQuery()
Line 292: UpdateFilename.Connection.Close()
Line 293:
Source File:c:\inetpub\wwwroot\agrolasithiAdmin\AdvertInfo.aspx.vb Line:291
Stack Trace:
[SqlException: Line 1: Incorrect syntax near 'Waltz'.]
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +182
agrolasithiAdmin.AdvertInfo.SubmitBtn_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\agrolasithiAdmin\AdvertInfo.aspx.vb:291
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Are you calling a proc o executing T-SQL? Post the relevant T-SQL. Are you passing any values that contain the word "waltz".
|||Post sql which you are using..
Incorrect syntax near the keyword 'WHERE'.
server 7.0
Below is the code I am using for an update to a MS Sql Database.
<%@. Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<title>Sample Script 2 - Part 3 </title>
<!-- copyright MDFernandez -->
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=../part3sol/style.css">
</head>
<body bgcolor="#FFFFFF">
<!--#include virtual="/adovbs.inc"-->
<center>
<%
Dim oRS
Dim Conn
Dim Id
Dim Name
Dim StreetAddress
Dim City
Dim State
Dim Zip
Dim PhoneNumber
dim sql
Id = request.form("Id")
Name = request.form("Name")
StreetAddress = request.form("StreetAddress")
City = request.form("City")
State = request.form("State")
Zip = request.form("Zip")
PhoneNumber = request.form("PhoneNumber")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open =("DRIVER=SQL Server;SERVER=(local);UID=;APP=AspRunner
Professional
Application;WSID=COMPAQAM;DATABASE=FriendsContactI nfo;Trusted_Connection=Yes")
'Conn.Open
sql="update FPFriends"
sql=sql & " set Name='" & Name & "',"
sql=sql & "StreetAddress='" & StreetAddress & "',"
sql=sql & "Ciy='" & City & "',"
sql=sql & "State='" & State & "',"
sql=sql & "Zip='" & Zip & "',"
sql=sql & "PhoneNumber='" & PhoneNumber & "',"
sql=sql & " WHERE Id=" & Id
set oRS=Conn.Execute (sql)
response.write "<font face='arial' size=4>"
response.write "<br><br>The record has been updated."
response.write "</b></font>"
' close the connection to the database
Conn.Close
%>
<!-- don't include in sample code display -->
<form>
<input type="button" value=" Close This Window "
onClick="window.location='aboutus.htm'"><br>
<button onClick="window.location='menu1_1.asp'">Update another
record</button>
</form>
</center>
</body>
</html>sql=sql & "PhoneNumber='" & PhoneNumber & "',"
It looks like the syntax error is due to the extraneous comma after the last
column.
I strongly suggest you google 'SQL injection'. Your current code will allow
a hacker can execute any arbitrary SQL statement. The best protection
against injection is to use parameterized SQL statements, stored procedures
and validate user input. Never build a SQL Statement string by
concatenating user input values. The example below uses a parameterized
UPDATE statement via OLEDB:
Const adParamInput = 1
Const adInteger = 3
Const adVarChar = 200
Set Conn = CreateObject("ADODB.Connection")
Set Command = CreateObject("ADODB.Command")
Conn.Open _
"Provider=SQLOLEDB;" & _
"Data Source=(local);" & _
"Integrated Security=SSPI;" & _
"Initial Catalog=FriendsContactInfo;" & _
"App=AspRunner Professional Application"
Command.ActiveConnection = Conn
Command.CommandText = _
" UPDATE dbo.FPFriends" & _
" SET" & _
" Name=?," & _
" StreetAddress=?," & _
" Ciy=?," & _
" State=?," & _
" Zip=?," & _
" PhoneNumber=?" & _
" WHERE Id=?"
Set parameter = Command.CreateParameter( _
"Name", _
adVarChar, _
adParamInput, _
30)
parameter.Value = Name
Command.Parameters.Append parameter
Set parameter = Command.CreateParameter( _
"StreetAddress", _
adVarChar, _
adParamInput, _
30)
parameter.Value = StreetAddress
Command.Parameters.Append parameter
Set parameter = Command.CreateParameter( _
"City", _
adVarChar, _
adParamInput, _
30)
parameter.Value = City
Command.Parameters.Append parameter
Set parameter = Command.CreateParameter( _
"State", _
adVarChar, _
adParamInput, _
2)
parameter.Value = State
Command.Parameters.Append parameter
Set parameter = Command.CreateParameter( _
"Zip", _
adVarChar, _
adParamInput, _
5)
parameter.Value = Zip
Command.Parameters.Append parameter
Set parameter = Command.CreateParameter( _
"PhoneNumber", _
adVarChar, _
adParamInput, _
15)
parameter.Value = PhoneNumber
Command.Parameters.Append parameter
Set parameter = Command.CreateParameter( _
"Id", _
adInteger, _
adParamInput)
parameter.Value = Id
Command.Parameters.Append parameter
Command.Execute
Conn.Close
--
Hope this helps.
Dan Guzman
SQL Server MVP
"DaveF" <jeacdf@.excite.comwrote in message
news:1173540573.073247.128620@.t69g2000cwt.googlegr oups.com...
Quote:
Originally Posted by
Any Ideas as to this error message. I am trying to learn using ms sql
server 7.0
>
Below is the code I am using for an update to a MS Sql Database.
>
<%@. Language=VBScript %>
<% Option Explicit %>
>
<html>
<head>
<title>Sample Script 2 - Part 3 </title>
<!-- copyright MDFernandez -->
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=../part3sol/style.css">
</head>
<body bgcolor="#FFFFFF">
<!--#include virtual="/adovbs.inc"-->
>
<center>
<%
>
Dim oRS
Dim Conn
>
Dim Id
Dim Name
Dim StreetAddress
Dim City
Dim State
Dim Zip
Dim PhoneNumber
dim sql
>
Id = request.form("Id")
Name = request.form("Name")
StreetAddress = request.form("StreetAddress")
City = request.form("City")
State = request.form("State")
Zip = request.form("Zip")
PhoneNumber = request.form("PhoneNumber")
>
>
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open =("DRIVER=SQL Server;SERVER=(local);UID=;APP=AspRunner
Professional
Application;WSID=COMPAQAM;DATABASE=FriendsContactI nfo;Trusted_Connection=Yes")
'Conn.Open
>
>
sql="update FPFriends"
sql=sql & " set Name='" & Name & "',"
sql=sql & "StreetAddress='" & StreetAddress & "',"
sql=sql & "Ciy='" & City & "',"
sql=sql & "State='" & State & "',"
sql=sql & "Zip='" & Zip & "',"
sql=sql & "PhoneNumber='" & PhoneNumber & "',"
sql=sql & " WHERE Id=" & Id
>
>
>
set oRS=Conn.Execute (sql)
response.write "<font face='arial' size=4>"
response.write "<br><br>The record has been updated."
response.write "</b></font>"
' close the connection to the database
Conn.Close
%>
<!-- don't include in sample code display -->
<form>
<input type="button" value=" Close This Window "
onClick="window.location='aboutus.htm'"><br>
<button onClick="window.location='menu1_1.asp'">Update another
record</button>
>
</form>
>
</center>
</body>
</html>
>
Monday, March 26, 2012
Incorrect syntax near the keyword THEN
I really tried to not post this question but I gave up. I tried brackets,
parenth...etc but nothing worked. I get this error message: Incorrect syntax
near the keyword 'THEN'. Please help, I am learning SQL Server.
thanks in advance.
Ismail
use mis
select CLAIM_DETAILS_HCVW.INTEREST, CLAIM_DETAILS_HCVW.NET, CLAIM_HMASTERS_VS.
CLAIMNO,
'AMOUNT' =
CASE WHEN (CLAIM_DETAILS_HCVW.INTEREST IS NULL THEN '0' ELSE
CLAIM_DETAILS_HCVW.INTEREST + CLAIM_DETAILS_HCVW.NET)
END,
FROM CLAIM_HMASTERS INNER JOIN CLAIM_HMASTERS ON CLAIM_HMASTERS_VS.CLAIMNO =
CLAIM_DETAILS_HCVW.CLAIMNO
where CLAIM_HMASTERS_VS.CLAIMNO like '200601119%'
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forum...eneral/200608/1Try putting the ELSE part out of the brackets
i.e
CASE
WHEN (CLAIM_DETAILS_HCVW.INTEREST IS NULL THEN '0' )
ELSE CLAIM_DETAILS_HCVW.INTEREST + CLAIM_DETAILS_HCVW.NET
END
--
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
Make SQL Server faster - www.quicksqlserver.com
___________________________________
"ielmrani via SQLMonster.com" <u21259@.uwewrote in message
news:65279dafaa057@.uwe...
Quote:
Originally Posted by
Hi Everyone,
I really tried to not post this question but I gave up. I tried brackets,
parenth...etc but nothing worked. I get this error message: Incorrect
syntax
Quote:
Originally Posted by
near the keyword 'THEN'. Please help, I am learning SQL Server.
thanks in advance.
Ismail
>
use mis
select CLAIM_DETAILS_HCVW.INTEREST, CLAIM_DETAILS_HCVW.NET,
CLAIM_HMASTERS_VS.
Quote:
Originally Posted by
>
CLAIMNO,
'AMOUNT' =
CASE WHEN (CLAIM_DETAILS_HCVW.INTEREST IS NULL THEN '0' ELSE
CLAIM_DETAILS_HCVW.INTEREST + CLAIM_DETAILS_HCVW.NET)
END,
>
FROM CLAIM_HMASTERS INNER JOIN CLAIM_HMASTERS ON CLAIM_HMASTERS_VS.CLAIMNO
=
Quote:
Originally Posted by
CLAIM_DETAILS_HCVW.CLAIMNO
>
where CLAIM_HMASTERS_VS.CLAIMNO like '200601119%'
>
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forum...eneral/200608/1
>
>
Jack Vamvas wrote:
Quote:
Originally Posted by
>Try putting the ELSE part out of the brackets
>i.e
>CASE
>WHEN (CLAIM_DETAILS_HCVW.INTEREST IS NULL THEN '0' )
>ELSE CLAIM_DETAILS_HCVW.INTEREST + CLAIM_DETAILS_HCVW.NET
>END
>--
>--
>Jack Vamvas
>___________________________________
>Receive free SQL tips - www.ciquery.com/sqlserver.htm
>Make SQL Server faster - www.quicksqlserver.com
>___________________________________
>
Quote:
Originally Posted by
>Hi Everyone,
>I really tried to not post this question but I gave up. I tried brackets,
>[quoted text clipped - 20 lines]
Quote:
Originally Posted by
>Message posted via SQLMonster.com
>http://www.sqlmonster.com/Uwe/Forum...eneral/200608/1
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forum...eneral/200608/1
Incorrect syntax near the keyword SELECT
Hello, I have the following query. When I run the query I get the following error message: "Incorrect syntax near keyword SELECT"
----------------
SELECT *
FROM (SELECT ROW_NUMBER() OVER(ORDER BY DateAdded) AS rownum, * FROM
SELECT TOP (100) PERCENT Videos.VideoId, Videos.UserId, Videos.UserName, Videos.Title, Videos.Description, Videos.Tags, Videos.VideoLength, Videos.TimesHeard,
Videos.ImageURL, Videos.RecType, Videos.Language, Videos.Category, Videos.DateAdded, Videos.RewardProgram, Videos.EditorChoice, TB2.hits
FROM Videos LEFT OUTER JOIN
(SELECT TOP (100) PERCENT VideoId, COUNT(*) AS hits
FROM (SELECT TOP (100) PERCENT UserId, VideoId, COUNT(*) AS cnt1
FROM Hits
GROUP BY VideoId, UserId) AS TB1
GROUP BY VideoId) AS TB2 ON Videos.VideoId = TB2.VideoId
ORDER BY TB2.hits DESC
) AS T1
WHERE rownum <= 5
-------------
If I run the query that is in BOLD as:
SELECT *
FROM (SELECT ROW_NUMBER() OVER(ORDER BY DateAdded) AS rownum, * FROM Videos) AS T1 WHERE rownum <=5
the query runs just fine. Also if I run the query that is NOT bold (above), it also runs fine. What can I do to run them both together as seen above?
Thank in advance,
Louis
Try this:
SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY DateAdded) AS rownum, * FROM(SELECT TOP (100) PERCENT Videos.VideoId, Videos.UserId, Videos.UserName, Videos.Title, Videos.Description, Videos.Tags, Videos.VideoLength, Videos.TimesHeard,
Videos.ImageURL, Videos.RecType, Videos.Language, Videos.Category, Videos.DateAdded, Videos.RewardProgram, Videos.EditorChoice, TB2.hits
FROM Videos LEFT OUTER JOIN
(SELECT TOP (100) PERCENT VideoId, COUNT(*) AS hits
FROM (SELECT TOP (100) PERCENT UserId, VideoId, COUNT(*) AS cnt1
FROM Hits
GROUP BY VideoId, UserId) AS TB1
GROUP BY VideoId) AS TB2 ON Videos.VideoId = TB2.VideoId
ORDER BY TB2.hits DESC
)
) AS T1
WHERE rownum <= 5
Thanks Limno, but I had tried that before and I get this error:
Incorrect syntax near ')'
I don't understand why
Louis
Here is a working one:
SELECT*FROM(SELECT ROW_NUMBER()OVER(ORDERBY DateAdded)AS rownum,*FROM(SELECTTOP(100)PERCENT Videos.VideoId, Videos.UserId, Videos.UserName, Videos.Title, Videos.Description, Videos.Tags, Videos.VideoLength, Videos.TimesHeard,Videos.ImageURL, Videos.RecType, Videos.Language, Videos.Category, Videos.DateAdded, Videos.RewardProgram, Videos.EditorChoice, TB2.hits
FROM VideosLEFTOUTERJOIN
(SELECTTOP(100)PERCENT VideoId,COUNT(*)AS hitsFROM(SELECTTOP(100)PERCENT UserId, VideoId,COUNT(*)AS cnt1
FROM HitsGROUPBY VideoId, UserId)AS TB1
GROUPBY VideoId)AS TB2ON Videos.VideoId= TB2.VideoId
ORDERBY TB2.hitsDESC
)AS T1) AS T2
WHERE rownum<= 5
|||Thanks Limno, that worked
Louis
Incorrect Syntax near the keyword 'LEFT' in MSSQL6.5
promt me an error message: Incorrect Syntax near the keyword 'LEFT'
SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
what happen to my SQL Server? Because i am sure my statement is correct.
if i run this sql on SQL 2000 or 7, no problem.Hi
Chekc that your column and table name is exaclty the same case as on the SQL
Server 6.5 DB. You might be running a case sensitive SQL 6.5 installation.
Regards
Mike
"yichun" wrote:
> I have an MSSQL6.5 server and when i run the following SQL statement, it
> promt me an error message: Incorrect Syntax near the keyword 'LEFT'
> SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
> what happen to my SQL Server? Because i am sure my statement is correct.
> if i run this sql on SQL 2000 or 7, no problem.
>|||Perhaps the LEFT function was introduced in 7.0? I don't have a Books Online to check against, but I
bet that you do. Check it out. If it isn't available in 6.5, use SUBSTRING instead.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yichun" <yichun@.discussions.microsoft.com> wrote in message
news:349D4286-8C05-4E37-BDB3-00A4F4EEB077@.microsoft.com...
>I have an MSSQL6.5 server and when i run the following SQL statement, it
> promt me an error message: Incorrect Syntax near the keyword 'LEFT'
> SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
> what happen to my SQL Server? Because i am sure my statement is correct.
> if i run this sql on SQL 2000 or 7, no problem.
>
Incorrect Syntax near the keyword 'LEFT' in MSSQL6.5
promt me an error message: Incorrect Syntax near the keyword 'LEFT'
SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
what happen to my SQL Server? Because i am sure my statement is correct.
if i run this sql on SQL 2000 or 7, no problem.
Hi
Chekc that your column and table name is exaclty the same case as on the SQL
Server 6.5 DB. You might be running a case sensitive SQL 6.5 installation.
Regards
Mike
"yichun" wrote:
> I have an MSSQL6.5 server and when i run the following SQL statement, it
> promt me an error message: Incorrect Syntax near the keyword 'LEFT'
> SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
> what happen to my SQL Server? Because i am sure my statement is correct.
> if i run this sql on SQL 2000 or 7, no problem.
>
|||Perhaps the LEFT function was introduced in 7.0? I don't have a Books Online to check against, but I
bet that you do. Check it out. If it isn't available in 6.5, use SUBSTRING instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yichun" <yichun@.discussions.microsoft.com> wrote in message
news:349D4286-8C05-4E37-BDB3-00A4F4EEB077@.microsoft.com...
>I have an MSSQL6.5 server and when i run the following SQL statement, it
> promt me an error message: Incorrect Syntax near the keyword 'LEFT'
> SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
> what happen to my SQL Server? Because i am sure my statement is correct.
> if i run this sql on SQL 2000 or 7, no problem.
>
Incorrect Syntax near the keyword 'LEFT' in MSSQL6.5
promt me an error message: Incorrect Syntax near the keyword 'LEFT'
SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
what happen to my SQL Server? Because i am sure my statement is correct.
if i run this sql on SQL 2000 or 7, no problem.Hi
Chekc that your column and table name is exaclty the same case as on the SQL
Server 6.5 DB. You might be running a case sensitive SQL 6.5 installation.
Regards
Mike
"yichun" wrote:
> I have an MSSQL6.5 server and when i run the following SQL statement, it
> promt me an error message: Incorrect Syntax near the keyword 'LEFT'
> SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
> what happen to my SQL Server? Because i am sure my statement is correct.
> if i run this sql on SQL 2000 or 7, no problem.
>|||Perhaps the LEFT function was introduced in 7.0? I don't have a Books Online
to check against, but I
bet that you do. Check it out. If it isn't available in 6.5, use SUBSTRING i
nstead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yichun" <yichun@.discussions.microsoft.com> wrote in message
news:349D4286-8C05-4E37-BDB3-00A4F4EEB077@.microsoft.com...
>I have an MSSQL6.5 server and when i run the following SQL statement, it
> promt me an error message: Incorrect Syntax near the keyword 'LEFT'
> SELECT LEFT(CUSTOMER_KEY, 1) FROM CUSTOMER
> what happen to my SQL Server? Because i am sure my statement is correct.
> if i run this sql on SQL 2000 or 7, no problem.
>sql
Incorrect syntax near 'sp_cursorclose'
Any ideas?
Amy Thropp wrote:
> I get this error message when using JDBC and JSP to access a sqlserver 2000 database. Trying to insert a record. Insert works perfectly when run from query analyzer. Fails with above error message when inserting from web app.
> Any ideas?
Show the actual jdbc code you're running and also the whole stacktrace of the
exception.
thanks
Joe
|||inserting lock with {INSERT INTO record_locks (type, record_id, session_id, user_id, timestamp) VALUES( 'epss', 1006, 'B77384E6BF824A351B8434967F99C7BF', 1, getdate())}
connection: jdbc:JSQLConnect://tsps5.bha.biancohopkins.com:1433/database=conversion_db/sa barfed on update {INSERT INTO record_locks (type, record_id, session_id, user_id, timestamp) VALUES( 'epss', 1006, 'B77384E6BF824A351B8434967F99C7BF', 1, getdate())}
, error: com.jnetdirect.jsql.u: sp_cursoropen/sp_cursorprepare: The statement parameter can only be a single select or a single stored procedure.
com.jnetdirect.jsql.u: sp_cursoropen/sp_cursorprepare: The statement parameter can only be a single select or a single stored procedure.
at com.jnetdirect.jsql.at.a(Unknown Source)
at com.jnetdirect.jsql.ae.f(Unknown Source)
at com.jnetdirect.jsql.ae.new(Unknown Source)
at com.jnetdirect.jsql.ae.for(Unknown Source)
at com.jnetdirect.jsql.l.execute(Unknown Source)
at com.jnetdirect.jsql.ae.else(Unknown Source)
at com.jnetdirect.jsql.ae.executeQuery(Unknown Source)
at TestLock.main(TestLock.java:28)
"Joe Weinstein" wrote:
>
> Amy Thropp wrote:
>
> Show the actual jdbc code you're running and also the whole stacktrace of the
> exception.
> thanks
> Joe
>
|||here's the code. The other posting had the stacktrace messages
public static void main( String[] args)
{
String query =
"INSERT INTO record_locks (type, record_id, session_id, " +
"user_id) " +
"VALUES( 'epss', 1006, 'B77384E6BF824A351B8434967F99C7BF', 1)";
try {
Class.forName( "com.jnetdirect.jsql.JSQLDriver");
Connection conn = DriverManager.getConnection( DB, USER, PASSWD);
Statement stmt =
conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
print( "inserting lock with {" + query + "}");
ResultSet rs = stmt.executeQuery( query);
print( "and got back from update");
} catch (Exception e) {
print( "connection: " + DB + "/" + USER + " barfed on update {" +
query + "}, error: " + e.toString());
e.printStackTrace();
}
return;
}
"Joe Weinstein" wrote:
>
> Amy Thropp wrote:
>
> Show the actual jdbc code you're running and also the whole stacktrace of the
> exception.
> thanks
> Joe
>
|||Ok.
The problem is that you're doing an insert (not a query), and then calling
executeQuery() instead of executeUpdate().
Try this:
String insert =
"INSERT INTO record_locks (type, record_id, session_id, " +
"user_id) " +
"VALUES( 'epss', 1006, 'B77384E6BF824A351B8434967F99C7BF', 1)";
Class.forName( "com.jnetdirect.jsql.JSQLDriver");
Connection conn = DriverManager.getConnection( DB, USER, PASSWD);
Statement stmt = conn.createStatement();
print( "inserting lock with {" + insert + "}");
stmt.executeUpdate(insert);
Joe Weinstein at BEA
Amy Thropp wrote:
[vbcol=seagreen]
> here's the code. The other posting had the stacktrace messages
> public static void main( String[] args)
> {
> String query =
> "INSERT INTO record_locks (type, record_id, session_id, " +
> "user_id) " +
> "VALUES( 'epss', 1006, 'B77384E6BF824A351B8434967F99C7BF', 1)";
> try {
> Class.forName( "com.jnetdirect.jsql.JSQLDriver");
> Connection conn = DriverManager.getConnection( DB, USER, PASSWD);
> Statement stmt =
> conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY);
> print( "inserting lock with {" + query + "}");
> ResultSet rs = stmt.executeQuery( query);
> print( "and got back from update");
> } catch (Exception e) {
> print( "connection: " + DB + "/" + USER + " barfed on update {" +
> query + "}, error: " + e.toString());
> e.printStackTrace();
> }
> return;
> }
>
> "Joe Weinstein" wrote:
>
Incorrect syntax near Items
Hi,
I am getting a mysterious error message, and it doesnt say which line it referres to, just gives me a stack trace.
Could somone decipher it for me?:
System.Data.SqlClient.SqlException: Incorrect syntax near 'items'.
[SqlException (0x80131904): Incorrect syntax near 'items'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +180
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2411
System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) +190
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +380
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +395
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +405
System.Web.UI.WebControls.SqlDataSource.Insert() +13
detailproview.Button2_Command(Object sender, CommandEventArgs e) +41
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4886
My page code is:
private bool ExecuteUpdate(int quantity)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\ASPNETDB.MDF;Integrated Security=True;User Instance=True";con.Open();
SqlCommand command = new SqlCommand();
command.Connection = con;
TextBox TextBox1 = (TextBox)FormView1.FindControl("TextBox1");
Label labname = (Label)FormView1.FindControl("Label3");
Label labid = (Label)FormView1.FindControl("Label13");command.CommandText = "UPDATE Items SET Quantityavailable = @.qty WHERE productID=@.productID";
command.Parameters.Add("@.qty", TextBox1.Text);
command.Parameters.Add("@.productID", labid.Text);
command.ExecuteNonQuery();con.Close();
return true;
}private bool ExecuteInsert(String quantity)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\ASPNETDB.MDF;Integrated Security=True;User Instance=True";con.Open();
SqlCommand command = new SqlCommand();
command.Connection = con;
TextBox TextBox1 = (TextBox)FormView1.FindControl("TextBox1");
Label labname = (Label)FormView1.FindControl("Label3");
Label labid = (Label)FormView1.FindControl("Label13");command.CommandText = "INSERT INTO Transactions (Usersname)VALUES (@.User)"+
"INSERT INTO Transactions (Itemid)VALUES (@.productID)"+
"INSERT INTO Transactions (itemname)VALUES (@.Itemsname)"+
"INSERT INTO Transactions (Date)VALUES (+DateTime.Now.ToString() +)"+
"INSERT INTO Transactions (Qty)VALUES (@.qty)"+
command.Parameters.Add("@.User", System.Web.HttpContext.Current.User.Identity.Name);
command.Parameters.Add("@.Itemsname", labname.Text);
command.Parameters.Add("@.productID", labid.Text);
command.Parameters.Add("@.qty", TextBox1.Text);
command.ExecuteNonQuery();con.Close();
return true;
}protected void Button2_Click(object sender, EventArgs e)
{
TextBox TextBox1 = FormView1.FindControl("TextBox1") as TextBox;
ExecuteUpdate(Int32.Parse(TextBox1.Text) );
}protected void Button2_Command(object sender, CommandEventArgs e)
{
if (e.CommandName == "Update")
{
SqlDataSource1.Insert();
}
}
}.
Thanks!
Jon
The error is referring to the SQL syntax you are using in your queries. There is a line in your stack trace that reads "System.Web.UI.WebControls.SqlDataSource.Insert() +13" which tends to suggest that the problem is in your INSERT statement, although looking at your INSERT statement I cannot see where "items" is mentioned. One bit that does confuse me is your Button2_Comand event-hander: why do you checke.CommandName == "Update" and then callSqlDataSource1.Insert() ?
Hope this helps
Hi,
I cant see where items is mentioned either..
I checked update because the buttons command name is update, but I also want it to insert.. (it both updates and inserts).
Where else could the items error be happening??
Thanks,
Jon
|||I have just noticed that you haveExecuteUpdateandExecuteInsertmethods defined in your code, but you are calling the Insert method of theSqlDataSource1control: what SQL statements have you got defined against SqlDataSource1?
Well the data is on a formview which is attached so Sqdatasource1..
Perhaps I should try to called insert method of execute insert - how would I write this?:
if (e.CommandName == "Update")
{
ExecuteInsert.Insert();
?
Thanks!
Jon
|||You should just be able to write this:
if (e.CommandName =="Update") { ExecuteInsert();}|||Hi,
I tried that but got the error:
No overload for method 'ExecuteInsert' takes '0' arguments
Line 86: ExecuteInsert();
??
Thanks,
Jon|||
Ah, sorry, I didn't notice that yourExecuteInsertrequired a quantity parameter: just pass the method the quantity you require to be inserted.
Friday, March 23, 2012
Incorrect syntax near '@Sites'.
I have the following code but it keeps erroring on the last line and I'm unsure as to why it is doing it?
Here is the error message
Msg 102, Level 15, State 1, Line 42
Incorrect syntax near '@.Sites'.
declare @.Sites varchar(50)
declare @.Kit_No char(20)
declare @.Location char(2)
set @.Location = 'Ho'
set @.Kit_No = 'mo1k'
if (SELECT sitetype from gss.dbo.kup_regions where region_code = @.Location) = 10
begin
set @.Sites = '''Pe'',''Hg'',''Vo'',''' + @.Location + ''''
end
select
KR.Region_Code,
KR.Region_Name,
Z.Qty,
Z.Kit_Description,
Z.BookedOutToDate as Usage,
Z.Local_Cost,
(select overstock from gss.dbo.vGss_overstock where region_code = Z.region_code and kit_no = 'm01k' )as Rolling_Avg,
C.Symbol,
Z.FOB,
(SELECT
Price
FROM
gss.dbo.FedEx_Rates Fed
WHERE
SourceRegion = (SELECT Region_Code FROM gss.dbo.KUP_Regions WHERE Region_Name = 'penistone')
AND Weight = (SELECT MAX (Weight) FROM gss.dbo.FedEx_Rates WHERE Weight < (SELECT Packed_Unit_Weight From gss.dbo.KUP_Kits WHERE Kit_Code = (select Kit_Code from gss.dbo.GSS_Kits where Kit_No = 'm01k' ))+0.5)
AND Fed.DestRegion=KR.Region_Code) as Fedex_Price
from
(gss.dbo.kup_regions KR with (nolock)
left outer join
(select KRD.Qty,KRD.BookedOutToDate,KRD.Local_Cost,KRD.FOB,GK.Kit_Description,KRD.Region_code,KRD.Archive_Date
from gss.dbo.kup_region_data KRD with (nolock) inner join gss.dbo.gss_kits GK
on KRD.kit_code = GK.kit_code where GK.kit_no =@.Kit_No and KRD.archive_date is not null )Z
on KR.region_code = Z.region_code)
inner join gss.dbo.Currency C with (nolock) on C.Country_Code = KR.Country_Code
where KR.ExpectExtract = 1 and KR.Designation = 'p' and KR.Region_code in @.Sites
Many thanks for any help
The IN keyword requires a parenthesis, modify the last line as follows:where KR.ExpectExtract = 1 and KR.Designation = 'p' and KR.Region_code in (@.Sites)
|||Simon:
If @.sites is a simple 1-item variable then what carlop says is correct.
However, I assume that @.sites is a "string list" -- that is, it is a list of region codes such as @.Sites = 'rg1,rg2,rg3'. If that is the case there are a couple of solutions. A good read is at website:
http://www.sommarskog.se/arrays-in-sql.html
The "cheap" solution here is to convert your huge select statement into a string and then execute the converted string. This is in fact a simplified overview, but you will also need change this:
KR.Region_code in @.Sites
into this:
' ... KR.Region_code in ( ' + @.Sites + ') '
However, this solution might leave you vulnerable to SQL injection and this is not what I would do.
I would either create a function to list out your string list or I would just process your "string list" and load each separate entry into a table variable and change your IN portion into selecting the region codes out of the list.
(BLEAH my comments sound like a bunch of mumbo-jumbo. Let me find an example.)
|||Dave
-- --
-- Use a "stringList" function to enumerate the parts of the "@.sites" string
-- --
declare @.sites varchar (20) set @.sites = 'N,A'
declare @.kup_regions table (Region_code char (1), Region_Name varchar (25))
insert into @.kup_regions values ('N', 'Northern Region')
insert into @.kup_regions values ('E', 'Eastern Region')
insert into @.kup_regions values ('W', 'West Region')
insert into @.kup_regions values ('S', 'South Region')
insert into @.kup_regions values ('A', 'A non-conforming Region')
-- An example using an inner join -
select a.region_code,
a.region_name
from @.kup_regions a
inner join stringList (',', @.sites) b
on b.entry = left (a.region_code,1)
-- An example using an "IN" clause
select a.region_code,
a.region_name
from @.kup_regions a
where a.region_code in
(select entry from stringList (',', @.sites) )
-- -
-- Sample Output
-- -
-- region_code region_name
-- -- -
-- N Northern Region
-- A A non-conforming Region
Incorrect syntax near '?'
Here is a part of the code:
Me.NewOrder.CommandText = "INSERT INTO TTOrder (beskrivning, bestallarnr, bestdatum, bolagsnr, champnr, " & _
"costcenter, doknr, doktypnr, ordernr, projekt, timenr, ttkommentar, volvokomment" & _
"ar) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Me.NewOrder.Connection = Me.sqlOrderDb
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("beskrivning", System.Data.SqlDbType.NVarChar, 0, "beskrivning"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("bestallarnr", System.Data.SqlDbType.Int, 0, "bestallarnr"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("bestdatum", System.Data.SqlDbType.DateTime, 0, "bestdatum"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("bolagsnr", System.Data.SqlDbType.Int, 0, "bolagsnr"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("champnr", System.Data.SqlDbType.NVarChar, 255, "champnr"))
Any ideas? I'm not using any stored procedures. Maybe I should?
Hi,
Me.NewOrder.CommandText = "INSERT INTO TTOrder (beskrivning, bestallarnr, bestdatum, bolagsnr, champnr, " & _
"costcenter, doknr, doktypnr, ordernr, projekt, timenr, ttkommentar, volvokomment" & _
"ar) VALUES (@.beskrivning, @.bestallarnr, @.bestdatum, @.bolagsnr, @.champnr, @.costcenter, @.doknr, @.doktypnr, @.ordernr, @.projekt, @.timenr, @.ttkommentar, @.volvokomment)
Me.NewOrder.Connection = Me.sqlOrderDb
Me.NewOrder.Parameters.Add("@.beskrivning", System.Data.SqlDbType.NVarChar)
and so on...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Incorrect syntax near ''?''
Here is a part of the code:
Me.NewOrder.CommandText = "INSERT INTO TTOrder (beskrivning, bestallarnr, bestdatum, bolagsnr, champnr, " & _
"costcenter, doknr, doktypnr, ordernr, projekt, timenr, ttkommentar, volvokomment" & _
"ar) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Me.NewOrder.Connection = Me.sqlOrderDb
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("beskrivning", System.Data.SqlDbType.NVarChar, 0, "beskrivning"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("bestallarnr", System.Data.SqlDbType.Int, 0, "bestallarnr"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("bestdatum", System.Data.SqlDbType.DateTime, 0, "bestdatum"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("bolagsnr", System.Data.SqlDbType.Int, 0, "bolagsnr"))
Me.NewOrder.Parameters.Add(New System.Data.SqlClient.SqlParameter("champnr", System.Data.SqlDbType.NVarChar, 255, "champnr"))
Any ideas? I'm not using any stored procedures. Maybe I should?
Hi,
Me.NewOrder.CommandText = "INSERT INTO TTOrder (beskrivning, bestallarnr, bestdatum, bolagsnr, champnr, " & _
"costcenter, doknr, doktypnr, ordernr, projekt, timenr, ttkommentar, volvokomment" & _
"ar) VALUES (@.beskrivning, @.bestallarnr, @.bestdatum, @.bolagsnr, @.champnr, @.costcenter, @.doknr, @.doktypnr, @.ordernr, @.projekt, @.timenr, @.ttkommentar, @.volvokomment)
Me.NewOrder.Connection = Me.sqlOrderDb
Me.NewOrder.Parameters.Add("@.beskrivning", System.Data.SqlDbType.NVarChar)
and so on...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||
This post was very helpful to me, thanks
incorrect syntax near ;
Hi,
I am trying to test a login form and I get this error message and can't find out why. Istarted out with the Login control, but since I have to try it on the ISP's server, I can't use the SQL Server Managment Studio's integrated authentication. So, I converted the login control to a template and assigned a handler for the login button:
protectedvoid LoginButton_Click(object sender,EventArgs e)
{
String usrname = lpLogin.UserName.ToString(); //lpLogin is the <ASP:Login ...>
String conString ="Data Source=mylocalserver\\SQLEXPRESS;Initial Catalog=LPRU;Integrated Security=True";
String selQuery ="SELECT [Password], [FirstName], [LastName] FROM [lpUserInfo] WHERE ([UserID] ='" + usrname +"';";
SqlConnection con =newSqlConnection(conString);
SqlCommand cmd =newSqlCommand(selQuery, con);
con.Open();
SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection); // <--it says "syntax error near ';' " on this line, I tried it without CommandBehavior
while (rdr.Read())
{
Label1.Text= rdr.GetString(0) + rdr.GetString(1); // for testing purposes, trying to print out first name and last name
}
rdr.Close();
con.Close();
}
Is there a way of using SQLServer 2000, used by my ISP, and take advantage of .net 2.0's login control, roles, membership, ...? By just using a connection string?
I think you have an unwanted ";" in the line code
String selQuery ="SELECT [Password], [FirstName], [LastName] FROM [lpUserInfo] WHERE ([UserID] ='" + usrname +"';";
You should change it to this,maybe it can work well.
String selQuery ="SELECT [Password], [FirstName], [LastName] FROM [lpUserInfo] WHERE ([UserID] ='" + usrname;
wish this help you
|||In the immortal words of Homer Simpson, "DOH!".. (I know your working in C#, but that doesn't mean a semi-colon is good for everything)
look at your line:
String selQuery ="SELECT [Password], [FirstName], [LastName] FROM [lpUserInfo] WHERE ([UserID] ='" + usrname +"';";
And then look at this line:
String selQuery ="SELECT [Password], [FirstName], [LastName] FROM [lpUserInfo] WHERE ([UserID] ='" + usrname +"')";
Don't you just hate it when that happens... For the record, the queryis executed on the line where you get the exception rather than where you make the assignment.
|||
Jason,
You got rid of the offending semicolon, but you still have to close the single quote and close parenthesis around 'usrname'
|||
NoBullMan:
String selQuery ="SELECT [Password], [FirstName], [LastName] FROM [lpUserInfo] WHERE ([UserID] ='" + usrname +"';";
You missed a ')' at the end of the query string, which you can easily check in Query Analyzer (or any where you can parse T-SQL statement) BTW, if there is a single quote in the usrname, the query string will be broken, unless you replace every single quote in the usrname with 2 single quotes; and such concatenated queries may lead to SQL Injection, so always useParameterized Queries.
Thank you guys. I am from php/MySQL background and the ';' at the end of the query doesn't cause problems in MySQL. I appreciate your help.
|||T-SQL in SQL Server also accepts ';'Incorrect syntax near ')' SQL 2000
I keep receiving the error message Incorrect syntax near ')' whilst trying to save a stored procedure from within visual studio, I get the same error from within enterprise manager. The procedure is incomplete but valid, any idea appreciated. The procedure follows:
CREATE PROCEDURE dbo.ProcessComment
@.source AS VARCHAR(50) = NULL
AS
SET NOCOUNT ON
DECLARE @.sourceID AS INT
DECLARE @.counter AS INT
DECLARE @.Sources TABLE
(
sourceid AS INT,
lastconversation AS DATETIME
)
SET @.sourceID = -1
SET @.counter = -1
/*We need to see if this is a new or existing source*/
IF NOT @.source = NULL
BEGIN
INSERT @.Sources SELECT sourceID, lastconversation
FROM sources
WHERE name = @.source
ORDER BY lastconversation
--Do we have any matching sources or is this a new source?
--We need to pick the most likely source from the table
--The most likely source will be either one with an open conversation
--or the latest conversation or if we are lucky the only
--one in the result set
END
Thanks
Gav:
These two lines:
sourceid AS INT,
lastconversation AS DATETIME
need to be changed to:
sourceid AS INT,
lastconversation AS DATETIME
The compiler "thinks" that you are defining a computed column when you include the "AS" keyword.
|||Thanks Mugambo, that sorted me out :)
Dave
I wonder where I picked up that 'AS' syntax from in a table declaration, it just rolled off my fingertips onto the keyboard.
Thanks a lot.sql
Wednesday, March 21, 2012
Incorrect syntax
Ive written the code, but when I execute it, I keep getting an error
message (below)
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'customer'.
Code below, any help would be great!
--Table structure for table 'customer'
CREATE TABLE 'customer'(
'CustID' int(10) NOT NULL AUTO_INCREMENT,
'CustName' char(50) NOT NULL,
'Address' char(50) NOT NULL,
PRIMARY KEY ('CustID')
)
--Dumping data for table 'customer'
INSERT INTO 'customer' VALUES (1,'Railtrack HQ','25-49 Railway
Cuttings, Euphoria'),(2,'Sinking.com','Virtual Lane, Peckham'),
(3,'DailyMurkInc','Fleet Marina');
--Table Structure for table 'deliverynote'
CREATE TABLE 'deliverynote'(
'CATref' int(20) NOT NULL auto_increment,
'CustID' int(50) NOT NULL,
'EquipCat' char(50) NOT NULL,
'EquipNumber' int(20) NOT NULL,
'EquipName' char(50) NOT NULL,
PRIMARY KEY ('CATref','CustID')
)
--Dumping data for table 'deliverynote'
INSERT INTO 'deliverynote' VALUES
('01235',2,'Domestic',1,'Fan'),('03278',3,'Domestic',7,'Toothbrush'),('03452',2,'Domestic',2,'Fan'),
('04577',1,'Commercial',8,'Computer'),('07853',1,'Commercial',9,'Printer'),('08453',3,'Commercial',4,'Computer'),('08734',3,'Industrial',6,'Heater'),
('08897',1,'Commercial',10,'Fax'),('08924',3,'Domestic',5,'Kettle'),('08992',3,'Commercial',3,'Monitor');
--Table Structure for table 'engineer'
CREATE TABLE 'engineer'(
'EngineerName' char(50) NOT NULL,
PRIMARY KEY ('EngineerName')
}
--Dumping data for table 'engineer'
INSERT INTO 'engineer' VALUES ('Botchit'),('Fudgeit'),('Perfect');
--Table Structure for table 'equipmentcat'
CREATE TABLE 'equipmentcat' (
'EquipCat' char(50) NOT NULL,
PRIMARY KEY ('EquipCat')
)
--Dumping data for table 'equipmentcat'
INSERT INTO 'equipmentcat' VALUES
('Commercial'),('Domestic'),('Industrial');
--Table Structure for table 'repairer'
CREATE TABLE 'repairer' (
'RepID' int(10) NOT NULL,
'RepName' char(50) NOT NULL,
PRIMARY KEY ('RepID')
)
--Dumping data for table 'repairer'
INSERT INTO 'repairer' VALUES (1, 'Mr Green'),(2,'Mrs Brown'),(3,'Mr
White');
--Table Structure for table 'locationid'
CREATE TABLE 'locationid' (
'LocationName' char(50) NOT NULL,
PRIMARY KEY ('LocationName')
)
--Dumping data for table 'locationid'
INSERT INTO 'locationid' VALUES
('Despatch'),('Gone_Home'),('Goods_In'),('Repairer'),('Testing');
--Table Structure for table 'location'
CREATE TABLE 'location' (
'EquipNumber' int(20) NOT NULL,
'CATref' int(20) NOT NULL,
'Testing' char(50) NOT NULL,
'Despatchdate' char(50) NOT NULL,
PRIMARY KEY ('CATref')
FOREIGN KEY ('CATref')
)
--Dumping data for table 'location'
INSERT INTO 'location' VALUES (1,'01235','April 5th 1999, Aprl 13th
1999','April 14th 1999'),(10,'08997','May 3rd 1999','May 5th 1999'),
(2,'03452','April 5th 1999','April 6th 1999'),(3,'08992','April 12th
1999','April 13th 1999'),(4,'08453','April 12th 1999','April 14th
1999'),
(5,'08924','April 12th 1999, April 17th 1999','April 20th
1999'),(6,'08734','April 13th 1999','April 14th
1999'),(7,'03278','April 13th 1999, April 17th 1999','April 19th
1999'),
(8,'04577','May 3rd 1999','May 5th 1999'), (9,'07853','May 3rd
1999','May 5th 1999');
--Table Structure for table 'testrecord'
CREATE TABLE 'testrecord' (
'CATref' int(20) NOT NULL,
'CustID' int(50) NOT NULL,
'EquipNumber' int(20) NOT NULL,
'Date' char(50) NOT NULL,
'EngineerName' char(50) NOT NULL,
'Pass/Fail' char(20) NOT NULL,
PRIMARY KEY ('CATref','CustID')
FOREIGN KEY ('CATref','CustID','EngineerName')
)
--Dumping data for table 'testrecord'
INSERT INTO 'testrecord' VALUES ('01235',2,1,'Fan','April 6th
1999','Botchit','Pass'),('012357',2,1,'Fan','May 2nd
2000','Fudgeit','Fail'),('03278',3,7,'Toothbrush','April 13th
1999','Perfect','Pass')
,('08453',3,4,'Computer','April 12th
1999','Botchit','Pass'),('084531',3,4,'Computer','May 6th
2000','Perfect','Pass'),('084532',3,4,'Computer','May 9th
2000','Botchit','Pass'),('08734',3,6,'Heater','April 13th
1999','Botchit','Pass'),
('08924',3,5,'Kettle','April 12th
1999','Perfect','Fail'),('089248',3,5,'Kettle','May 6th
2000','Fudgeit','Pass'),('08992',3,3,'Monitor','April 12th
1999','Fudgeit','Pass'),('089921',3,3,'Monitor','May 6th
2000','Perfect','Pass');
--Table Structure for table 'equipment'
CREATE TABLE 'equipment' (
'CATref' int(20) NOT NULL,
'CustID' int(50) NOT NULL,
'EquipNumber' int(20) NOT NULL,
'EquipCat' char(50) NOT NULL,
'EquipName' char(50) NOT NULL,
'Goods_In_Date' char(50) NOT NULL,
'Repairer_Date' char (50) NOT NULL,
'Despatch_Date' char(50) NOT NULL,
'Home_Date' char(50) NOT NULL,
'RepID' int(10) NOT NULL,
PRIMARY KEY ('CATref', 'CustID')
FOREIGN KEU ('RepID','EqipCat','CATref','CustID')
)
--Dumping data for table 'equipment'
INSERT INTO 'equipment' VALUES
('01235',2,1,'Domestic','Fan','April 5th 1999','April 7th, 1, 'April
12th 1999','April 14th 1999',2),
('012357',2,1,'Domestic','Fan','May 1st 2000','May 3rd 2000','May 18th
2000','May 20th 2000',3),
('03278',3,7,'Domestic','Toothbrush','April 12th 1999', 'April 15th
1999','April 16th 1999','April 20th 1999',1),
('03452',2,2,'Domestic','Fan','April 5th 1999','April 14th
1999'),('04577',1,8,'Commercial','Computer','May 1st 1999','May 5th
1999'),
('07853',1,9,'Commercial','Printer','May 1st 1999','May 5th
1999'),('08453',3,4,'Commercial','Computer','April 12th 1999','April
15th 1999'),
('084531',3,4,'Commercial','Computer','May 5th 2000','May 6th
2000','May 8th 2000','May 10th
2000',1),('08734',3,6,'Industrial','Heater','April 12th 1999','April
15th 1999'),
('08892',3,3,'Commercial','Monitor','April 12th 1999','April 15th
1999'),('08897',1,10,'Commercial','Fax','May 1st 1999','May 5th
1999'),('08924',3,5,'Domestic','Kettle','April 12th 1999','April 13th
1999','April 17th 1999','April 20th 1999',2),
('089248',3,5,'Domestic','Kettle','May 5th 2000','May 10th
2000'),('089921',3,3,'Commercial','Monitor','May 5th 2000','May 10th
2000');Daz
You have to specify INSERT INTO for each data to be insterted in your case
See if this helps
INSERT INTO 'customer' VALUES (1,'Railtrack HQ','25-49 Railway Cuttings,
Euphoria')
INSERT INTO 'customer' VALUES (2,'Sinking.com','Virtual Lane, Peckham')
INSERT INTO 'customer' VALUES (3,'DailyMurkInc','Fleet Marina');
"Daz01" <dazzaf15@.hotmail.com> wrote in message
news:1166005705.720733.30310@.73g2000cwn.googlegroups.com...
> Hi Im trying to build a database in Microsoft SQL Server 2005.
> Ive written the code, but when I execute it, I keep getting an error
> message (below)
> Msg 102, Level 15, State 1, Line 1
> Incorrect syntax near 'customer'.
>
> Code below, any help would be great!
> --Table structure for table 'customer'
>
> CREATE TABLE 'customer'(
> 'CustID' int(10) NOT NULL AUTO_INCREMENT,
> 'CustName' char(50) NOT NULL,
> 'Address' char(50) NOT NULL,
> PRIMARY KEY ('CustID')
> )
> --Dumping data for table 'customer'
> INSERT INTO 'customer' VALUES (1,'Railtrack HQ','25-49 Railway
> Cuttings, Euphoria'),(2,'Sinking.com','Virtual Lane, Peckham'),
> (3,'DailyMurkInc','Fleet Marina');
>
> --Table Structure for table 'deliverynote'
>
> CREATE TABLE 'deliverynote'(
> 'CATref' int(20) NOT NULL auto_increment,
> 'CustID' int(50) NOT NULL,
> 'EquipCat' char(50) NOT NULL,
> 'EquipNumber' int(20) NOT NULL,
> 'EquipName' char(50) NOT NULL,
> PRIMARY KEY ('CATref','CustID')
> )
> --Dumping data for table 'deliverynote'
> INSERT INTO 'deliverynote' VALUES
> ('01235',2,'Domestic',1,'Fan'),('03278',3,'Domestic',7,'Toothbrush'),('03452',2,'Domestic',2,'Fan'),
> ('04577',1,'Commercial',8,'Computer'),('07853',1,'Commercial',9,'Printer'),('08453',3,'Commercial',4,'Computer'),('08734',3,'Industrial',6,'Heater'),
> ('08897',1,'Commercial',10,'Fax'),('08924',3,'Domestic',5,'Kettle'),('08992',3,'Commercial',3,'Monitor');
>
> --Table Structure for table 'engineer'
> CREATE TABLE 'engineer'(
> 'EngineerName' char(50) NOT NULL,
> PRIMARY KEY ('EngineerName')
> }
> --Dumping data for table 'engineer'
> INSERT INTO 'engineer' VALUES ('Botchit'),('Fudgeit'),('Perfect');
>
> --Table Structure for table 'equipmentcat'
> CREATE TABLE 'equipmentcat' (
> 'EquipCat' char(50) NOT NULL,
> PRIMARY KEY ('EquipCat')
> )
> --Dumping data for table 'equipmentcat'
>
> INSERT INTO 'equipmentcat' VALUES
> ('Commercial'),('Domestic'),('Industrial');
>
> --Table Structure for table 'repairer'
> CREATE TABLE 'repairer' (
> 'RepID' int(10) NOT NULL,
> 'RepName' char(50) NOT NULL,
> PRIMARY KEY ('RepID')
> )
> --Dumping data for table 'repairer'
> INSERT INTO 'repairer' VALUES (1, 'Mr Green'),(2,'Mrs Brown'),(3,'Mr
> White');
>
> --Table Structure for table 'locationid'
> CREATE TABLE 'locationid' (
> 'LocationName' char(50) NOT NULL,
> PRIMARY KEY ('LocationName')
> )
> --Dumping data for table 'locationid'
>
> INSERT INTO 'locationid' VALUES
> ('Despatch'),('Gone_Home'),('Goods_In'),('Repairer'),('Testing');
>
> --Table Structure for table 'location'
> CREATE TABLE 'location' (
> 'EquipNumber' int(20) NOT NULL,
> 'CATref' int(20) NOT NULL,
> 'Testing' char(50) NOT NULL,
> 'Despatchdate' char(50) NOT NULL,
> PRIMARY KEY ('CATref')
> FOREIGN KEY ('CATref')
> )
> --Dumping data for table 'location'
>
> INSERT INTO 'location' VALUES (1,'01235','April 5th 1999, Aprl 13th
> 1999','April 14th 1999'),(10,'08997','May 3rd 1999','May 5th 1999'),
> (2,'03452','April 5th 1999','April 6th 1999'),(3,'08992','April 12th
> 1999','April 13th 1999'),(4,'08453','April 12th 1999','April 14th
> 1999'),
> (5,'08924','April 12th 1999, April 17th 1999','April 20th
> 1999'),(6,'08734','April 13th 1999','April 14th
> 1999'),(7,'03278','April 13th 1999, April 17th 1999','April 19th
> 1999'),
> (8,'04577','May 3rd 1999','May 5th 1999'), (9,'07853','May 3rd
> 1999','May 5th 1999');
>
> --Table Structure for table 'testrecord'
> CREATE TABLE 'testrecord' (
> 'CATref' int(20) NOT NULL,
> 'CustID' int(50) NOT NULL,
> 'EquipNumber' int(20) NOT NULL,
> 'Date' char(50) NOT NULL,
> 'EngineerName' char(50) NOT NULL,
> 'Pass/Fail' char(20) NOT NULL,
> PRIMARY KEY ('CATref','CustID')
> FOREIGN KEY ('CATref','CustID','EngineerName')
> )
> --Dumping data for table 'testrecord'
> INSERT INTO 'testrecord' VALUES ('01235',2,1,'Fan','April 6th
> 1999','Botchit','Pass'),('012357',2,1,'Fan','May 2nd
> 2000','Fudgeit','Fail'),('03278',3,7,'Toothbrush','April 13th
> 1999','Perfect','Pass')
> ,('08453',3,4,'Computer','April 12th
> 1999','Botchit','Pass'),('084531',3,4,'Computer','May 6th
> 2000','Perfect','Pass'),('084532',3,4,'Computer','May 9th
> 2000','Botchit','Pass'),('08734',3,6,'Heater','April 13th
> 1999','Botchit','Pass'),
> ('08924',3,5,'Kettle','April 12th
> 1999','Perfect','Fail'),('089248',3,5,'Kettle','May 6th
> 2000','Fudgeit','Pass'),('08992',3,3,'Monitor','April 12th
> 1999','Fudgeit','Pass'),('089921',3,3,'Monitor','May 6th
> 2000','Perfect','Pass');
>
> --Table Structure for table 'equipment'
> CREATE TABLE 'equipment' (
> 'CATref' int(20) NOT NULL,
> 'CustID' int(50) NOT NULL,
> 'EquipNumber' int(20) NOT NULL,
> 'EquipCat' char(50) NOT NULL,
> 'EquipName' char(50) NOT NULL,
> 'Goods_In_Date' char(50) NOT NULL,
> 'Repairer_Date' char (50) NOT NULL,
> 'Despatch_Date' char(50) NOT NULL,
> 'Home_Date' char(50) NOT NULL,
> 'RepID' int(10) NOT NULL,
> PRIMARY KEY ('CATref', 'CustID')
> FOREIGN KEU ('RepID','EqipCat','CATref','CustID')
> )
> --Dumping data for table 'equipment'
> INSERT INTO 'equipment' VALUES
> ('01235',2,1,'Domestic','Fan','April 5th 1999','April 7th, 1, 'April
> 12th 1999','April 14th 1999',2),
> ('012357',2,1,'Domestic','Fan','May 1st 2000','May 3rd 2000','May 18th
> 2000','May 20th 2000',3),
> ('03278',3,7,'Domestic','Toothbrush','April 12th 1999', 'April 15th
> 1999','April 16th 1999','April 20th 1999',1),
> ('03452',2,2,'Domestic','Fan','April 5th 1999','April 14th
> 1999'),('04577',1,8,'Commercial','Computer','May 1st 1999','May 5th
> 1999'),
> ('07853',1,9,'Commercial','Printer','May 1st 1999','May 5th
> 1999'),('08453',3,4,'Commercial','Computer','April 12th 1999','April
> 15th 1999'),
> ('084531',3,4,'Commercial','Computer','May 5th 2000','May 6th
> 2000','May 8th 2000','May 10th
> 2000',1),('08734',3,6,'Industrial','Heater','April 12th 1999','April
> 15th 1999'),
> ('08892',3,3,'Commercial','Monitor','April 12th 1999','April 15th
> 1999'),('08897',1,10,'Commercial','Fax','May 1st 1999','May 5th
> 1999'),('08924',3,5,'Domestic','Kettle','April 12th 1999','April 13th
> 1999','April 17th 1999','April 20th 1999',2),
> ('089248',3,5,'Domestic','Kettle','May 5th 2000','May 10th
> 2000'),('089921',3,3,'Commercial','Monitor','May 5th 2000','May 10th
> 2000');
>|||Do not put 'single quotes' around the table and object names.
As already noted, each row INSERTed needs its own INSERT.
Once you get those taken care of the problems that remain will be
easier to see.
Roy Harvey
Beacon Falls, CT
On 13 Dec 2006 02:28:25 -0800, "Daz01" <dazzaf15@.hotmail.com> wrote:
>Hi Im trying to build a database in Microsoft SQL Server 2005.
>Ive written the code, but when I execute it, I keep getting an error
>message (below)
>Msg 102, Level 15, State 1, Line 1
>Incorrect syntax near 'customer'.
>
>Code below, any help would be great!
>--Table structure for table 'customer'
>
>CREATE TABLE 'customer'(
>'CustID' int(10) NOT NULL AUTO_INCREMENT,
>'CustName' char(50) NOT NULL,
>'Address' char(50) NOT NULL,
>PRIMARY KEY ('CustID')
>)
>--Dumping data for table 'customer'
>INSERT INTO 'customer' VALUES (1,'Railtrack HQ','25-49 Railway
>Cuttings, Euphoria'),(2,'Sinking.com','Virtual Lane, Peckham'),
>(3,'DailyMurkInc','Fleet Marina');
Incorrect PageAudit Property
Hello, after a fatal server crash (with no backups!!) I have tried to re-attach a database but I get the following message;
"Msg 5172, Level 16, State 15, Line 1
The header for file 'E:\Database.mdf' is not a valid database file header. The PageAudit property is incorrect."
The database files ( both mdf & ldf ) where recovered from a file system copy which was made while SQL Server 2005 was still running. The files where copied with Symantec Backup Exec (10d).
Is there any way that the database can be recovered from these files?
(I have tried a few 3rd party tools ie, Apex SQL Log & Recovery for SQL Server, but none of these where successful )
Would Miscorsoft Product Support be able to recover any data or does anyone know of any 3rd party companies that could help?
Any help would be greatly appreciated.
Roy
It could help... or maybe couldn't...
http://support.microsoft.com/default.aspx?scid=kb;en-us;268481
|||The file header page is corrupt, which means the file cannot be attached. Product Support will not attempt data recovery for you - I advise you to contact a 3rd party to try it (and get a SQL backup strategy so this doesn't happen again).
Thanks
|||Not all backup products are able to save the contents of a file while that file is open. Others do only if you enable (purchase) an extra option. If that were the case here (I can't speak directly to Backup Exec), what you have backed up is an empty file. This should be easy to see if you just open it in a hex editor.
I wish I had better news, but it doesn't look good.
|||Roy,
If you email me directly at kfarlee@.microsoft.com , I'll put you in touch with a Backup Exec engineer who may be able to help figure out what happened.
Incorrect PageAudit Property
Hello, after a fatal server crash (with no backups!!) I have tried to re-attach a database but I get the following message;
"Msg 5172, Level 16, State 15, Line 1
The header for file 'E:\Database.mdf' is not a valid database file header. The PageAudit property is incorrect."
The database files ( both mdf & ldf ) where recovered from a file system copy which was made while SQL Server 2005 was still running. The files where copied with Symantec Backup Exec (10d).
Is there any way that the database can be recovered from these files?
(I have tried a few 3rd party tools ie, Apex SQL Log & Recovery for SQL Server, but none of these where successful )
Would Miscorsoft Product Support be able to recover any data or does anyone know of any 3rd party companies that could help?
Any help would be greatly appreciated.
Roy
It could help... or maybe couldn't...
http://support.microsoft.com/default.aspx?scid=kb;en-us;268481
|||The file header page is corrupt, which means the file cannot be attached. Product Support will not attempt data recovery for you - I advise you to contact a 3rd party to try it (and get a SQL backup strategy so this doesn't happen again).
Thanks
|||Not all backup products are able to save the contents of a file while that file is open. Others do only if you enable (purchase) an extra option. If that were the case here (I can't speak directly to Backup Exec), what you have backed up is an empty file. This should be easy to see if you just open it in a hex editor.
I wish I had better news, but it doesn't look good.
|||Roy,
If you email me directly at kfarlee@.microsoft.com , I'll put you in touch with a Backup Exec engineer who may be able to help figure out what happened.
sqlWednesday, March 7, 2012
incompatible beta components
SQL Server 2005 Setup has detected incompatible components from beta
versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add and
Remove Programs to remove these components.
I haven't installed any beta software. What step should I take next?
Daniel
Daniel
> I haven't installed any beta software. What step should I take next?
Looks strange, are you sure?
What is the version are you installing ?
Uninstall all programs that relate to SQL Server 2005 or VS .
"Daniel" <Mahonri@.cableone.net> wrote in message
news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
> When I try to install SQL Server 2005 I get a message that says:
> SQL Server 2005 Setup has detected incompatible components from beta
> versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
> and Remove Programs to remove these components.
> I haven't installed any beta software. What step should I take next?
> Daniel
>
|||Did you check the add/remove programs in control panel to make sure none of
those listed components were installed? If you do see any previous versions
of those components, uninstall them. Also, restart your server before
attempting the install.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Daniel" <Mahonri@.cableone.net> wrote in message
news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
> When I try to install SQL Server 2005 I get a message that says:
> SQL Server 2005 Setup has detected incompatible components from beta
> versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
> and Remove Programs to remove these components.
> I haven't installed any beta software. What step should I take next?
> Daniel
>
|||You may also want to run MsiInv to see what applications the
installer may be picking up. Sometimes the different apps or
remains of some apps don't show up in Add/Remove Programs.
The installer can pick up on those and throw the error you
are getting. MsInv should pick that up. For more info, check
the following article and follow the links in that article:
http://blogs.msdn.com/astebner/archi...30/487096.aspx
-Sue
On Sat, 16 Sep 2006 19:53:12 -0500, "Daniel"
<Mahonri@.cableone.net> wrote:
>When I try to install SQL Server 2005 I get a message that says:
>SQL Server 2005 Setup has detected incompatible components from beta
>versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add and
>Remove Programs to remove these components.
>I haven't installed any beta software. What step should I take next?
>Daniel
>
|||I've done that. It is strange to me too. Has no one else ever run into
this problem? I wasn't able to find anything in knowledge base.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:emkY1hj2GHA.4924@.TK2MSFTNGP05.phx.gbl...
> Daniel
> Looks strange, are you sure?
> What is the version are you installing ?
> Uninstall all programs that relate to SQL Server 2005 or VS .
>
> "Daniel" <Mahonri@.cableone.net> wrote in message
> news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
>
|||I've done those things. There are not any of those components installed. I
even uninstalled .NET 1.1. I considered uninstalling .NET 2.0. There are a
lot of Windows Server 2003 Hotfixes. I didn't think they would matter since
I just installed Windows Server 2003 SP1. I wonder if I need to get a newer
version of SQL Server 2005.
Daniel
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%23uI3TUk2GHA.1292@.TK2MSFTNGP03.phx.gbl...
> Did you check the add/remove programs in control panel to make sure none
> of those listed components were installed? If you do see any previous
> versions of those components, uninstall them. Also, restart your server
> before attempting the install.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Daniel" <Mahonri@.cableone.net> wrote in message
> news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
>
|||After using MSIInv.exe, I could not find anything beta.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:atjrg2hq70ob5vdvnldp6e6fpabh3cc5pj@.4ax.com...
> You may also want to run MsiInv to see what applications the
> installer may be picking up. Sometimes the different apps or
> remains of some apps don't show up in Add/Remove Programs.
> The installer can pick up on those and throw the error you
> are getting. MsInv should pick that up. For more info, check
> the following article and follow the links in that article:
> http://blogs.msdn.com/astebner/archi...30/487096.aspx
> -Sue
> On Sat, 16 Sep 2006 19:53:12 -0500, "Daniel"
> <Mahonri@.cableone.net> wrote:
>
incompatible beta components
SQL Server 2005 Setup has detected incompatible components from beta
versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add and
Remove Programs to remove these components.
I haven't installed any beta software. What step should I take next?
DanielDaniel
> I haven't installed any beta software. What step should I take next?
Looks strange, are you sure?
What is the version are you installing ?
Uninstall all programs that relate to SQL Server 2005 or VS .
"Daniel" <Mahonri@.cableone.net> wrote in message
news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
> When I try to install SQL Server 2005 I get a message that says:
> SQL Server 2005 Setup has detected incompatible components from beta
> versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
> and Remove Programs to remove these components.
> I haven't installed any beta software. What step should I take next?
> Daniel
>|||Did you check the add/remove programs in control panel to make sure none of
those listed components were installed? If you do see any previous versions
of those components, uninstall them. Also, restart your server before
attempting the install.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Daniel" <Mahonri@.cableone.net> wrote in message
news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
> When I try to install SQL Server 2005 I get a message that says:
> SQL Server 2005 Setup has detected incompatible components from beta
> versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
> and Remove Programs to remove these components.
> I haven't installed any beta software. What step should I take next?
> Daniel
>|||You may also want to run MsiInv to see what applications the
installer may be picking up. Sometimes the different apps or
remains of some apps don't show up in Add/Remove Programs.
The installer can pick up on those and throw the error you
are getting. MsInv should pick that up. For more info, check
the following article and follow the links in that article:
http://blogs.msdn.com/astebner/archive/2005/10/30/487096.aspx
-Sue
On Sat, 16 Sep 2006 19:53:12 -0500, "Daniel"
<Mahonri@.cableone.net> wrote:
>When I try to install SQL Server 2005 I get a message that says:
>SQL Server 2005 Setup has detected incompatible components from beta
>versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add and
>Remove Programs to remove these components.
>I haven't installed any beta software. What step should I take next?
>Daniel
>|||I've done that. It is strange to me too. Has no one else ever run into
this problem? I wasn't able to find anything in knowledge base.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:emkY1hj2GHA.4924@.TK2MSFTNGP05.phx.gbl...
> Daniel
>> I haven't installed any beta software. What step should I take next?
> Looks strange, are you sure?
> What is the version are you installing ?
> Uninstall all programs that relate to SQL Server 2005 or VS .
>
> "Daniel" <Mahonri@.cableone.net> wrote in message
> news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
>> When I try to install SQL Server 2005 I get a message that says:
>> SQL Server 2005 Setup has detected incompatible components from beta
>> versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
>> and Remove Programs to remove these components.
>> I haven't installed any beta software. What step should I take next?
>> Daniel
>|||I've done those things. There are not any of those components installed. I
even uninstalled .NET 1.1. I considered uninstalling .NET 2.0. There are a
lot of Windows Server 2003 Hotfixes. I didn't think they would matter since
I just installed Windows Server 2003 SP1. I wonder if I need to get a newer
version of SQL Server 2005.
Daniel
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%23uI3TUk2GHA.1292@.TK2MSFTNGP03.phx.gbl...
> Did you check the add/remove programs in control panel to make sure none
> of those listed components were installed? If you do see any previous
> versions of those components, uninstall them. Also, restart your server
> before attempting the install.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Daniel" <Mahonri@.cableone.net> wrote in message
> news:%235s4nOf2GHA.4632@.TK2MSFTNGP03.phx.gbl...
>> When I try to install SQL Server 2005 I get a message that says:
>> SQL Server 2005 Setup has detected incompatible components from beta
>> versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
>> and Remove Programs to remove these components.
>> I haven't installed any beta software. What step should I take next?
>> Daniel
>|||After using MSIInv.exe, I could not find anything beta.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:atjrg2hq70ob5vdvnldp6e6fpabh3cc5pj@.4ax.com...
> You may also want to run MsiInv to see what applications the
> installer may be picking up. Sometimes the different apps or
> remains of some apps don't show up in Add/Remove Programs.
> The installer can pick up on those and throw the error you
> are getting. MsInv should pick that up. For more info, check
> the following article and follow the links in that article:
> http://blogs.msdn.com/astebner/archive/2005/10/30/487096.aspx
> -Sue
> On Sat, 16 Sep 2006 19:53:12 -0500, "Daniel"
> <Mahonri@.cableone.net> wrote:
>>When I try to install SQL Server 2005 I get a message that says:
>>SQL Server 2005 Setup has detected incompatible components from beta
>>versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add
>>and
>>Remove Programs to remove these components.
>>I haven't installed any beta software. What step should I take next?
>>Daniel
>