Thursday, March 29, 2012

Database Connection

hi everybody;
my questions about when database connection :
i am when connecting database latter receiveing exception error.Error is : An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
codes :
SqlCeConnection cnn=new SqlCeConnection("Datasource=\\My Documents\\Business\\LOREAL.sdf");
cnn.Open(); // Exception is here
help me..
can i doing ?

Moving it to Sql Mobile forum, when it has got better chance of being answered.

-Thanks,

Mohit

|||

Does the file exist in the path shown ?

Try to catch SqlCeException. That will show why it failed. Take a look at the VS 2005 docs on SqlCeException example.

Thank you!

Syed N. Yousuf

Microsoft Developer Support Professional

This posting is provided “AS IS” with no warranties, and confers no rights.

DataBase Connection

hi everybody;
my questions about when database connection :
i am when connecting database latter receiveing exception error.Error is : An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
codes :
SqlCeConnection cnn=new SqlCeConnection("Datasource=\\My Documents\\Business\\LOREAL.sdf");
cnn.Open(); // Exception is here
help me..
can i doing ?

Mehmet,

Try the code below instead - it fixes your connection string and provides you with a way to get more information about specific exceptions you may encounter using SQL Mobile.

-Darren

try

{

SqlCeConnection cnn = new SqlCeConnection(@."Data Source = \My Documents\Business\LOREAL.sdf");

cnn.Open();

}

catch (SqlCeException sqlex)
{
DisplaySQLCEErrors(sqlex);

}

public void DisplaySQLCEErrors(SqlCeException ex)
{
SqlCeErrorCollection errorCollection = ex.Errors;

StringBuilder bld = new StringBuilder();
Exception inner = ex.InnerException;

foreach (SqlCeError err in errorCollection)
{
bld.Append("\n Error Code: " + err.HResult.ToString("X"));
bld.Append("\n Message : " + err.Message);
bld.Append("\n Minor Err.: " + err.NativeError);
bld.Append("\n Source : " + err.Source);

foreach (int numPar in err.NumericErrorParameters)
{
if ( 0 != numPar ) bld.Append( "\n Num. Par. : " + numPar );
}

foreach ( string errPar in err.ErrorParameters )
{
if ( String.Empty != errPar ) bld.Append( "\n Err. Par. : " + errPar );
}

MessageBox.Show( bld.ToString(), "SQL Server CE Error" );
bld.Remove(0, bld.Length);
}
}

|||thank you Darren for my tring
and i am writing error Message :
ErrorCode:80004005
Message : There is a file sharing violation. A different process might be using the file.[,,,,,]
Mino Error .: 25035
Source: Microsoft SQL Server 2000 Windows CE Edition
Err.Par.:\My Documents\Business\LOREAL.sdf

help me (:|||

Something else on your device has a lock on the .SDF file. Try soft-resetting the device and run your code again. If that doesn't work, you may not have a clean install of SQL Mobile on the device.

Regards,

Darren

|||thank you Darren very very much
i am tring now and when being error message i will write is here (:|||but not do Darren..
i am reset machine and later i was set to program and i was install my application. but not did.
again same error...
can i doing ?
please help....|||

Mehmet,

Can you open the .sdf file using Query Analyzer 3.0 on your device? If that works and your application cannot create a connection to the database, there is some problem in your code and I'd ask you to post more of your code. If you cannot open the database with Query Analyzer 3.0, I'd be interested to know what error is reported. The error you are getting indicates that the .sdf fileis locked, but SQL Mobile is a multi-user database and can accept multiple connections. The only thing that I know of that would lock the entire database would be that you are running a Compact, AutoFlush, or merge repl with AddOption.CreateDatabase while you have code that is trying to connect to it. And it doesn't sound like that is the case.

Are you sure you have a good install of SQL Mobile and that the .sdf file is valid? How did you create your .sdf file?

Darren

|||hi again...
i am using SQL CE 2.0 in dotnet 2003 .
and my database running in PDA. and it s running on QueryAnalyzer.
but i am not connection database on codebehind in .net. and i sent code to you.
or i did writing code for create database on codebehind. Then creating database on PDA but again i am not connected database ):
and when i not connection open database later i am not running ExecuteReader or ExecuteNonQuery on PDA.
but no problem PDA.|||

SQL CE 2.0 allows only one connection to database, QA connection counts. Make sure to exit QA or you won't be able to open this database.

|||but my code is correct and my code is running on Windows Application.but not running on PDA application.
i reseted pda , i installed QA and i installed my program.
but again not running.
usually error is : An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
connection.Open(); /// exception is here
or not running code is : SqlDataAdapter.Fill(DataTable); // not running code..|||

I’m not quite sure how your code can run on Windows application because SQL Server CE 2.0 is not available on desktop. Even if it does, it does not mean it would run unchanged on device.

This exception you're getting means something wrong with your code, data and/or environment. Error messages in the exception would tell you what it is, so you can fix your application code, data or environment.

If that's the same message as before, please make sure you're not running another copy of your application, you do not open more than one connection to the same DB from your application and you do not have Query Analyzer running at the same time as your application.

|||

pls help me as soon as possible.I am getting an error as

An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

|||first only not running your database (sdf) on query analyzer..
usually your code first : connection.open()
command.ExecuteNonQuery();
connection.Close();
for example.....
if you opened connection and end your process later close connection...|||Hi, Darren;
I am facing this same problem.
I am quite sure that no other process is trying to connect my .sdf file.
My code is:
....
conn.Close();
conn.Open();//open connection just after close; throw exception.

The reason that close connection and open again is that if I still use this open connection (passed in as parameter), I got exception sth like "...connection is Fetching...". So I close and then open it. It works most of the time, but it throws that exception. I looks like connection hasn't been closed but try to open it again. I add code:
...
conn.Close();
int count = 0;
while (conn.State != ConnectionState.Closed)
{
Thread.Sleep(250);
if(count>4)
break;
count++;
}
conn.Open();
...
it still throws that exception.
How can I fix that problem?

Thank u very much.

|||

Hi everbody,

I have a problem like this.There is a programme on PDA and it has a (.sdf) database .When I trying to start program,I got this error : "not access to user table" and then "it will be upgrade" and then "25035: There is a file sharing violation.A different process might be using the file"

and when I look at the database,I saw three tables: MSysConstraints,MSysObjects,MSysRDATombstone.

I supposed that the database havent a "user table" ,but I dont know what serve the three tables on the database.

thanks much..

DataBase Connection

hi everybody;
my questions about when database connection :
i am when connecting database latter receiveing exception error.Error is : An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
codes :
SqlCeConnection cnn=new SqlCeConnection("Datasource=\\My Documents\\Business\\LOREAL.sdf");
cnn.Open(); // Exception is here
help me..
can i doing ?

Mehmet,

Try the code below instead - it fixes your connection string and provides you with a way to get more information about specific exceptions you may encounter using SQL Mobile.

-Darren

try

{

SqlCeConnection cnn = new SqlCeConnection(@."Data Source = \My Documents\Business\LOREAL.sdf");

cnn.Open();

}

catch (SqlCeException sqlex)
{
DisplaySQLCEErrors(sqlex);

}

public void DisplaySQLCEErrors(SqlCeException ex)
{
SqlCeErrorCollection errorCollection = ex.Errors;

StringBuilder bld = new StringBuilder();
Exception inner = ex.InnerException;

foreach (SqlCeError err in errorCollection)
{
bld.Append("\n Error Code: " + err.HResult.ToString("X"));
bld.Append("\n Message : " + err.Message);
bld.Append("\n Minor Err.: " + err.NativeError);
bld.Append("\n Source : " + err.Source);

foreach (int numPar in err.NumericErrorParameters)
{
if ( 0 != numPar ) bld.Append( "\n Num. Par. : " + numPar );
}

foreach ( string errPar in err.ErrorParameters )
{
if ( String.Empty != errPar ) bld.Append( "\n Err. Par. : " + errPar );
}

MessageBox.Show( bld.ToString(), "SQL Server CE Error" );
bld.Remove(0, bld.Length);
}
}

|||thank you Darren for my tring
and i am writing error Message :
ErrorCode:80004005
Message : There is a file sharing violation. A different process might be using the file.[,,,,,]
Mino Error .: 25035
Source: Microsoft SQL Server 2000 Windows CE Edition
Err.Par.:\My Documents\Business\LOREAL.sdf

help me (:|||

Something else on your device has a lock on the .SDF file. Try soft-resetting the device and run your code again. If that doesn't work, you may not have a clean install of SQL Mobile on the device.

Regards,

Darren

|||thank you Darren very very much
i am tring now and when being error message i will write is here (:|||but not do Darren..
i am reset machine and later i was set to program and i was install my application. but not did.
again same error...
can i doing ?
please help....|||

Mehmet,

Can you open the .sdf file using Query Analyzer 3.0 on your device? If that works and your application cannot create a connection to the database, there is some problem in your code and I'd ask you to post more of your code. If you cannot open the database with Query Analyzer 3.0, I'd be interested to know what error is reported. The error you are getting indicates that the .sdf fileis locked, but SQL Mobile is a multi-user database and can accept multiple connections. The only thing that I know of that would lock the entire database would be that you are running a Compact, AutoFlush, or merge repl with AddOption.CreateDatabase while you have code that is trying to connect to it. And it doesn't sound like that is the case.

Are you sure you have a good install of SQL Mobile and that the .sdf file is valid? How did you create your .sdf file?

Darren

|||hi again...
i am using SQL CE 2.0 in dotnet 2003 .
and my database running in PDA. and it s running on QueryAnalyzer.
but i am not connection database on codebehind in .net. and i sent code to you.
or i did writing code for create database on codebehind. Then creating database on PDA but again i am not connected database ):
and when i not connection open database later i am not running ExecuteReader or ExecuteNonQuery on PDA.
but no problem PDA.|||

SQL CE 2.0 allows only one connection to database, QA connection counts. Make sure to exit QA or you won't be able to open this database.

|||but my code is correct and my code is running on Windows Application.but not running on PDA application.
i reseted pda , i installed QA and i installed my program.
but again not running.
usually error is : An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
connection.Open(); /// exception is here
or not running code is : SqlDataAdapter.Fill(DataTable); // not running code..|||

I’m not quite sure how your code can run on Windows application because SQL Server CE 2.0 is not available on desktop. Even if it does, it does not mean it would run unchanged on device.

This exception you're getting means something wrong with your code, data and/or environment. Error messages in the exception would tell you what it is, so you can fix your application code, data or environment.

If that's the same message as before, please make sure you're not running another copy of your application, you do not open more than one connection to the same DB from your application and you do not have Query Analyzer running at the same time as your application.

|||

pls help me as soon as possible.I am getting an error as

An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll|||first only not running your database (sdf) on query analyzer..
usually your code first : connection.open()
command.ExecuteNonQuery();
connection.Close();
for example.....
if you opened connection and end your process later close connection...|||Hi, Darren;
I am facing this same problem.
I am quite sure that no other process is trying to connect my .sdf file.
My code is:
....
conn.Close();
conn.Open();//open connection just after close; throw exception.

The reason that close connection and open again is that if I still use this open connection (passed in as parameter), I got exception sth like "...connection is Fetching...". So I close and then open it. It works most of the time, but it throws that exception. I looks like connection hasn't been closed but try to open it again. I add code:
...
conn.Close();
int count = 0;
while (conn.State != ConnectionState.Closed)
{
Thread.Sleep(250);
if(count>4)
break;
count++;
}
conn.Open();
...
it still throws that exception.
How can I fix that problem?

Thank u very much.

|||

Hi everbody,

I have a problem like this.There is a programme on PDA and it has a (.sdf) database .When I trying to start program,I got this error : "not access to user table" and then "it will be upgrade" and then "25035: There is a file sharing violation.A different process might be using the file"

and when I look at the database,I saw three tables: MSysConstraints,MSysObjects,MSysRDATombstone.

I supposed that the database havent a "user table" ,but I dont know what serve the three tables on the database.

thanks much..

sql

Database Connection

Still new here, please be gentle.

I created a database inside SQL. I made my tables,etc.

When I try to connect to it from VBE I cannot open it!

I get an error stating that I cannot connect to it.

Am I doing the right thing?

If I create an SQL db from within VBE, I run into issues. I would rather not install the db's into my project since this will be a shared app.

Could some give me a little advice or point me in the right direction, please.

Davids Learning

IF I HAD ONLY TOOK ABOUT 8 HOURS

I COULD HAVE SOLVE MY OWN PROBLEM

READ BLOGS MORE

Davids Learning

database connection

i make a device of access card when i connect database to serial port it dosen't work

Could you please elaborate on how exactly you connect a database to a serial port of an access card?

database connection

i make a device of access card when i connect database to serial port it dosen't work

Could you please elaborate on how exactly you connect a database to a serial port of an access card?

database connection

I am not able to connect to my database. When I run the following, I get the meassage
System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
Although SQL SERVER 2000 WINCC is very much running.Trying to solve the problem for days now. Pl help.

pcg

<%@. Page Language="C#" Debug="true" Trace="true" %>
<%@. import Namespace="System.Data.SqlClient" %>
<%@. import Namespace="System.Data" %>
<script runat="server">

// Insert page code here
//
void addtosalelist(Object sender, EventArgs e)
{
Trace.Write("Note - Entered addtosalelist");
string connectionstring= "server=(127.0.0.1);trusted_connection=true;database=LocalHaat.mdf";
SqlConnection dbConnection= new SqlConnection(connectionstring);
dbConnection.Open();
Trace.Write("Note - DB connection set up");

Trace.Write("Note - DB connection opened");

//string commandstring = "INSERT INTO Salelist(sellername, email, address,city,category, itemname, itemdescription,price,paymentmode,negotiable,location) " + "Values(@.sellername, @.email, @.address,@.city,@.category, @.itemname, @.itemdescription,@.price,@.paymentmode,@.negotiable,@.location)";
string commandstring = "INSERT INTO SaleList(SellerName,SellerCity,ItemName) " + "Values(@.SellerName,@.SellerCity,@.ItemName)";
SqlCommand dbcommand= new SqlCommand(commandstring, dbConnection);

SqlParameter sname = new SqlParameter("@.SellerName", SqlDbType.VarChar, 30);
sname.Value = txtname.Text;
dbcommand.Parameters.Add(sname);

SqlParameter scity = new SqlParameter ("@.SellerCity", SqlDbType.VarChar, 15);
scity.Value = city.SelectedItem.Value;
dbcommand.Parameters.Add(scity);

dbcommand.ExecuteNonQuery();
dbConnection.Close();

}

</script>

Error Message
SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied.

Source Error:


Line 11: string connectionstring= "server=(127.0.0.1);trusted_connection=true;database=LocalHaat.mdf";
Line 12: SqlConnection dbConnection= new SqlConnection(connectionstring);
Line 13: dbConnection.Open();
Line 14: Trace.Write("Note - DB connection set up");
Line 15:

Source File: D:\Localhaat\sell.aspx Line: 13

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +311
System.Data.SqlClient.SqlConnection.Open() +383
ASP.sell_aspx.addtosalelist(Object sender, EventArgs e) in D:\Localhaat\sell.aspx:13
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +83
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() +1266


------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Request Details
Session Id: satdf0jfaoo3tzjd31vxa355 Request Type: POST
Time of Request: 08/07/2007 19:08:19 Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000044 0.000044
aspx.page Begin LoadViewState 0.000070 0.000026
aspx.page End LoadViewState 0.004889 0.004818
aspx.page Begin ProcessPostData 0.004929 0.000040
aspx.page End ProcessPostData 0.009899 0.004970
aspx.page Begin ProcessPostData Second Try 0.009935 0.000036
aspx.page End ProcessPostData Second Try 0.009972 0.000037
aspx.page Begin Raise ChangedEvents 0.009995 0.000023
aspx.page End Raise ChangedEvents 0.010583 0.000588
aspx.page Begin Raise PostBackEvent 0.010612 0.000029
Note - Entered addtosalelist 0.028321 0.017710
Unhandled Execution Error
SQL Server does not exist or access denied.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at ASP.sell_aspx.addtosalelist(Object sender, EventArgs e) in D:\Localhaat\sell.aspx:line 13
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()

In your connection string there are a few issues

If the sql server instance name is WinCC you should use .\WinCC for the server name

The database name should not enclude the .mdf extension.

string connectionstring= @."server=.\wincc;trusted_connection=true;database=LocalHaat;";

|||

pcg:

string connectionstring= "server=(127.0.0.1);trusted_connection=true;database=LocalHaat.mdf";

At fist change the server attribute from (127.0.0.1) to (local), next use the named instance of the Sql-Server, at last remove the .mdf from the database.

string connectionstring = @."server=(local)\mySqlServer;database=LocalHaat;trusted_connection=true";

Hope that helps.

|||

Hi,

visit this

http://www.connectionstrings.com/http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

|||

Thank you very much.

It worked fine.

pcg

|||

Thanks very much for the solution provided.

pcg

database connection

i have database in SQL server .. how can i connect to web page

Please help

many many thanks

Why don't you take a stab at the code and then paste when you have problems.

Search Google for "SQL Server Connect ASP.NET 2.0" and you will get a zillion hits. One of them looks promising.

http://aspnet.4guysfromrolla.com/articles/022206-1.aspx

If you try to do the task and then post a more targeted question, you will likely get better results posting.

Good luck, and do come back with more specific questions.

sql

Database connection

Hi,
Can anyone tell me when to use oleDB, ODBC, SqlConnection and Database
explorer to connect a sql server (from VB.net) where users have windows
security.
ThxHDI
Visit http://www.carlprothman.net/Default.aspx?tabid=81
"HDI" <hdinf@.hotmail.com> wrote in message
news:1168252383.802235.66360@.i15g2000cwa.googlegroups.com...
> Hi,
> Can anyone tell me when to use oleDB, ODBC, SqlConnection and Database
> explorer to connect a sql server (from VB.net) where users have windows
> security.
>
> Thx
>|||Thanx , but this paper explains how to use them not when/ why using
them.
Uri Dimant schreef:
> HDI
> Visit http://www.carlprothman.net/Default.aspx?tabid=81
>
>
> "HDI" <hdinf@.hotmail.com> wrote in message
> news:1168252383.802235.66360@.i15g2000cwa.googlegroups.com...
> > Hi,
> >
> > Can anyone tell me when to use oleDB, ODBC, SqlConnection and Database
> > explorer to connect a sql server (from VB.net) where users have windows
> > security.
> >
> >
> > Thx
> >|||HDI
I thought it was pretty clear if you use VB.NET
"HDI" <hdinf@.hotmail.com> wrote in message
news:1168253291.539504.44540@.38g2000cwa.googlegroups.com...
> Thanx , but this paper explains how to use them not when/ why using
> them.
>
> Uri Dimant schreef:
>> HDI
>> Visit http://www.carlprothman.net/Default.aspx?tabid=81
>>
>>
>> "HDI" <hdinf@.hotmail.com> wrote in message
>> news:1168252383.802235.66360@.i15g2000cwa.googlegroups.com...
>> > Hi,
>> >
>> > Can anyone tell me when to use oleDB, ODBC, SqlConnection and Database
>> > explorer to connect a sql server (from VB.net) where users have windows
>> > security.
>> >
>> >
>> > Thx
>> >
>|||Go for SqlConnection because oleDB and ODBC involve more layers between
the app and SQL Server. See
http://msdn2.microsoft.com/en-us/library/a6cd7c08.aspx for further info.

Database Connection

Hello,

I'm beginner in Ms SQL Server 2005, i dont know how to do a conection to my database.
Using Ms Access, the connection was successful, but using Ms SQL Server 2005 there is a problem.
for information, i try to connect the database using wizard option in ms Frontpage, the problem is, frontpage can only read sys.view file, dbo.view file cannot be able to view.

What is the main procedure or first procedure to create and connect database Ms SQL Server 2005?
I already read a book and internet, but i cant find the solution.

TqHi,

Try to re-install and connect to MS Sql Server 2005 using Windows Authetication. When u install SQL Server it give you some options like using windows Authentication or SQL Server Authentication. So during installation u should select Windows Authentication check box, If u r a single user installing on ur personal computer and practicing. Otherwise u have to set up SQL Server manually and I have no Idea about that.

I hope that helps u

Cheers,

Koonda

Database conn

I have downloaded some code on how to upload images to a sql database and I am getting
this error message

"SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied."

I have opened Enterprise Manager and made sure I was a "user" and everything seems to be ok there.
The connection string looks like this
"server=localhost;uid=sa;pwd=;database=ImageUpload"
Could anyone give me an idea on what to check or try next

Thanksu can try replacing 'localhost' with the ip address
use ipconfig command to know abt ip addr|||What kind of authentication you used? SQL Server authentication or windows integrated?

Try windows integrated authentication.

Database Configuration Problems

I am trying to learn ASP.NET using Visual Basic Standard Edition 2003 and an MSDE database. I am having problems configuring the login. Is this a workable configuration? Are there instructions somewhere for setting up this configuration? I have no problem using Access 2003, but I would like to use MSDE.Hold everything!!! If you're just starting out, then why not learn ASP.NET 2.0 instead? Go to the Home page of this site and follow the 3 steps of "Getting Started with ASP.NET." You get a great free developement tool (Visual Web Developer Express) and download SQL Express 2005 (which replaces MSDE) too (not sure if this is part of the download... if not, google for download... it's free too). That way, you're up-to-date with the latest technology.

Database conference ...

All,
I was looking for a database centric developer conference.
Any suggestions please ?
Thanks in advance.
Bill
You're missing SQL Connections right now!
http://www.sqlconnections.com/shows/...fault.asp?s=59
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||http://www.sqlpass.org/ has an excellent one, or so I hear
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Bill,
SQL PASS is always worthwhile. Just hope that SQL2005 is out for this years
conference. Look at http://www.sqlpass.org/
Chris Wood
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Solid Quality Learning will be holding a Summit in Reston, VA in August. It
will be much smaller than PASS with much deeper, more focussed technical
content. The sessions will build on each other to present a solid
educational experience.
http://www.solidqualitylearning.com/...ston2005Summit
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||OHH!! If Kalen says it's good and Solid Quality Learning is behind it, that
would be my recommendation! They are a class act.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23u770OmLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> Solid Quality Learning will be holding a Summit in Reston, VA in August.
> It will be much smaller than PASS with much deeper, more focussed
> technical content. The sessions will build on each other to present a
> solid educational experience.
> http://www.solidqualitylearning.com/...ston2005Summit
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bill" <bill@.nodomain.com> wrote in message
> news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
>
|||Thanks you all for the information.
Have a great day,
Bill
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||If you don't want to fly all the way to Las Vegas or Orlando just to brush
shoulders with other SQL developers, you could see if there is a SQL Server
users group meeting in your area. For example: http://www.atlantamdf.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
sql

Database conference ...

All,
I was looking for a database centric developer conference.
Any suggestions please ?
Thanks in advance.
Bill
You're missing SQL Connections right now!
http://www.sqlconnections.com/shows/...fault.asp?s=59
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||http://www.sqlpass.org/ has an excellent one, or so I hear
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Bill,
SQL PASS is always worthwhile. Just hope that SQL2005 is out for this years
conference. Look at http://www.sqlpass.org/
Chris Wood
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Solid Quality Learning will be holding a Summit in Reston, VA in August. It
will be much smaller than PASS with much deeper, more focussed technical
content. The sessions will build on each other to present a solid
educational experience.
http://www.solidqualitylearning.com/...ston2005Summit
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||OHH!! If Kalen says it's good and Solid Quality Learning is behind it, that
would be my recommendation! They are a class act.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23u770OmLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> Solid Quality Learning will be holding a Summit in Reston, VA in August.
> It will be much smaller than PASS with much deeper, more focussed
> technical content. The sessions will build on each other to present a
> solid educational experience.
> http://www.solidqualitylearning.com/...ston2005Summit
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bill" <bill@.nodomain.com> wrote in message
> news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
>
|||Thanks you all for the information.
Have a great day,
Bill
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||If you don't want to fly all the way to Las Vegas or Orlando just to brush
shoulders with other SQL developers, you could see if there is a SQL Server
users group meeting in your area. For example: http://www.atlantamdf.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>

Database conference ...

All,
I was looking for a database centric developer conference.
Any suggestions please ?
Thanks in advance.
BillBill,
SQL PASS is always worthwhile. Just hope that SQL2005 is out for this years
conference. Look at http://www.sqlpass.org/
Chris Wood
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||You're missing SQL Connections right now!
http://www.sqlconnections.com/shows/sql/default.asp?s=59
--
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||http://www.sqlpass.org/ has an excellent one, or so I hear :)
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||Solid Quality Learning will be holding a Summit in Reston, VA in August. It
will be much smaller than PASS with much deeper, more focussed technical
content. The sessions will build on each other to present a solid
educational experience.
http://www.solidqualitylearning.com/view.aspx?source=SQLUReston2005Summit
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||OHH!! If Kalen says it's good and Solid Quality Learning is behind it, that
would be my recommendation! They are a class act.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23u770OmLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> Solid Quality Learning will be holding a Summit in Reston, VA in August.
> It will be much smaller than PASS with much deeper, more focussed
> technical content. The sessions will build on each other to present a
> solid educational experience.
> http://www.solidqualitylearning.com/view.aspx?source=SQLUReston2005Summit
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bill" <bill@.nodomain.com> wrote in message
> news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
>> All,
>> I was looking for a database centric developer conference.
>> Any suggestions please ?
>> Thanks in advance.
>> Bill
>>
>|||Thanks you all for the information.
Have a great day,
Bill
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||If you don't want to fly all the way to Las Vegas or Orlando just to brush
shoulders with other SQL developers, you could see if there is a SQL Server
users group meeting in your area. For example: http://www.atlantamdf.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>

Database conference ...

All,
I was looking for a database centric developer conference.
Any suggestions please ?
Thanks in advance.
Bill
You're missing SQL Connections right now!
http://www.sqlconnections.com/shows/...fault.asp?s=59
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||http://www.sqlpass.org/ has an excellent one, or so I hear
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Bill,
SQL PASS is always worthwhile. Just hope that SQL2005 is out for this years
conference. Look at http://www.sqlpass.org/
Chris Wood
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Solid Quality Learning will be holding a Summit in Reston, VA in August. It
will be much smaller than PASS with much deeper, more focussed technical
content. The sessions will build on each other to present a solid
educational experience.
http://www.solidqualitylearning.com/...ston2005Summit
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||OHH!! If Kalen says it's good and Solid Quality Learning is behind it, that
would be my recommendation! They are a class act.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23u770OmLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> Solid Quality Learning will be holding a Summit in Reston, VA in August.
> It will be much smaller than PASS with much deeper, more focussed
> technical content. The sessions will build on each other to present a
> solid educational experience.
> http://www.solidqualitylearning.com/...ston2005Summit
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bill" <bill@.nodomain.com> wrote in message
> news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
>
|||Thanks you all for the information.
Have a great day,
Bill
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||If you don't want to fly all the way to Las Vegas or Orlando just to brush
shoulders with other SQL developers, you could see if there is a SQL Server
users group meeting in your area. For example: http://www.atlantamdf.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>

Database conference ...

All,
I was looking for a database centric developer conference.
Any suggestions please ?
Thanks in advance.
Bill
You're missing SQL Connections right now!
http://www.sqlconnections.com/shows/...fault.asp?s=59
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||http://www.sqlpass.org/ has an excellent one, or so I hear
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Bill,
SQL PASS is always worthwhile. Just hope that SQL2005 is out for this years
conference. Look at http://www.sqlpass.org/
Chris Wood
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||Solid Quality Learning will be holding a Summit in Reston, VA in August. It
will be much smaller than PASS with much deeper, more focussed technical
content. The sessions will build on each other to present a solid
educational experience.
http://www.solidqualitylearning.com/...ston2005Summit
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||OHH!! If Kalen says it's good and Solid Quality Learning is behind it, that
would be my recommendation! They are a class act.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23u770OmLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> Solid Quality Learning will be holding a Summit in Reston, VA in August.
> It will be much smaller than PASS with much deeper, more focussed
> technical content. The sessions will build on each other to present a
> solid educational experience.
> http://www.solidqualitylearning.com/...ston2005Summit
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bill" <bill@.nodomain.com> wrote in message
> news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
>
|||Thanks you all for the information.
Have a great day,
Bill
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>
|||If you don't want to fly all the way to Las Vegas or Orlando just to brush
shoulders with other SQL developers, you could see if there is a SQL Server
users group meeting in your area. For example: http://www.atlantamdf.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>

Database conference ...

All,
I was looking for a database centric developer conference.
Any suggestions please ?
Thanks in advance.
BillYou're missing SQL Connections right now!
http://www.sqlconnections.com/shows...efault.asp?s=59
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||http://www.sqlpass.org/ has an excellent one, or so I hear
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||Bill,
SQL PASS is always worthwhile. Just hope that SQL2005 is out for this years
conference. Look at http://www.sqlpass.org/
Chris Wood
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||Solid Quality Learning will be holding a Summit in Reston, VA in August. It
will be much smaller than PASS with much deeper, more focussed technical
content. The sessions will build on each other to present a solid
educational experience.
http://www.solidqualitylearning.com...eston2005Summit
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||OHH!! If Kalen says it's good and Solid Quality Learning is behind it, that
would be my recommendation! They are a class act.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23u770OmLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> Solid Quality Learning will be holding a Summit in Reston, VA in August.
> It will be much smaller than PASS with much deeper, more focussed
> technical content. The sessions will build on each other to present a
> solid educational experience.
> http://www.solidqualitylearning.com...eston2005Summit
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Bill" <bill@.nodomain.com> wrote in message
> news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
>|||Thanks you all for the information.
Have a great day,
Bill
"Bill" <bill@.nodomain.com> wrote in message
news:#A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>|||If you don't want to fly all the way to Las Vegas or Orlando just to brush
shoulders with other SQL developers, you could see if there is a SQL Server
users group meeting in your area. For example: http://www.atlantamdf.com
"Bill" <bill@.nodomain.com> wrote in message
news:%23A2lY$lLFHA.2824@.TK2MSFTNGP10.phx.gbl...
> All,
> I was looking for a database centric developer conference.
> Any suggestions please ?
> Thanks in advance.
> Bill
>sql

Database concurrent access issue

Dear All,

I have this .NET application that inserts lucky draw entries into SQL server. Each entry may have a range of values that the winning number will be drawn from. For example,

Entry 1: [1, 2]
Entry 2: [3, 8]
Entry 3: [9, 10]
Entry 4: [11, 11]
Entry 5: [12, 20]

The winning number will be picked from [1, 20]. Given this scenario, what is the best design that can handle the concurrency issue? If two entries are input at the same time, how to make sure it won't have the same starting value? Anyway to lock a table when one is accessing, disallowing other to run select query?

Thanks.You'll have to explain that better.|||For example, Entry 3: [9, 10] means Entry 3 has the number range starting from 9 and ending at 10.

The winning number will be drawn from the number range.

You'll have to explain that better.|||Clear as mud.

If you want to ensure two entries do not share the same starting value, then make the starting value the primary key or a unique index.|||blindman: qxz wants to validate new entries to ensure that it does not conflict with any existing entry and wants to enforce this validation in case of multiple users updating the Db same time...

qxz: a table lock is needed to ensure proper insert. remember explicit locks can have negative effect on performance

create procedure CheckIt (@.StVal int, @.EndVal int)
as

BEGIN TRANSACTION
declare @.CheckFailed char(1)
set @.CheckFailed = 'N'
if exists (select * from MyTable with (tablockx) where @.StVal between StartVal and EndVal)
set @.CheckFailed = 'Y'
if exists (select * from MyTable where @.EndVal between StartVal and EndVal)
set @.CheckFailed = 'Y'

if @.CheckFailed = 'Y'
begin
ROLLBACK TRANSACTION
return 0
end
else
begin
insert into MyTable .....
COMMIT TRANSACTION
return 1
end

Database concurrency

I'm wondering whether the following code would work if users are RAPIDLY registering (assumption) WITH the same username.
public bool UsernamExists(string username){string sql ="SELECT true FROM [users] WEHRE username = @.username;";return Convert.ToBoolean(comm.ExecuteScalar());}public bool Signup(User user){bool usernameExists = UsernameExists(user.Username);if( usernameExists )return false;//update or insert sql for user etc blah blah}

If two users try to signup AT THE VERY SAME TIME (DOWN TO THE NANOSECOND), would this technique work? Do I have to wrap it in a transaction, stored procedure??


Thanks.

no that does not guarantee unique usernames.

You should add a unique constraint to your username column in the database to guarantee that duplicates cannot exist.

Then, you can still do your usernameexists check it you want, but you would also want to add an error handler (try/catch) to catch the exception that would occur in the unlikely event that two users simultaneously submitted the same usernames.

|||I know about unique column BUT would the technique I mentioned above work IN TERMS OF CODING? Like 2 users submitting AT THE VERY SAME TIME.|||

Yes the code would run, but...

if you dont have a unique constraint in your db, then you could end up with 2 records with the same username.

|||

Your code will not work because you have error in it

"SELECT true FROM [users]WHERE username = @.username;";

you have no comm object defined ad no parameter added to command. But if you update it you will have no guaranty that you will not have two user with the same name in your database. But you can modify you code to do something like this with transaction (safer) or not:

BEGIN TRAN

IF not exist(SELECT * FROM [users]WHERE username = @.username)
BEGIN
INSERT into [users](username)
Values (@.username)
SELECT 'True' [Result]
END
ELSE
SELECT 'False' [RESULT]

COMMIT TRAN

In this way you will save one round trip to SQL server an everything will be done in one shot and very fast.

Thanks


|||

I know you have to use the comm object, excluded it out for the simplicity.

I thought about wrapping my sql syntax in a transaction with row locking, but I'm not to keen on writing that much sql syntax. I like to keep it minimal.

Is there a way the comm object could "perform" the transaction automatically? Can you show me a simple example?

|||

Hi vze1r2ht

There is no way to make the comm object start a transaction automatically. You will need to start a transaction by explicitly calling SqlConnection.BeginTransaction() and assign the returned SqlTransaction object to a SqlCommand.

You can also perform this in a stored procedure by using BEGIN TRAN.

|||

Kevin Yu - MSFT:

Hi vze1r2ht

There is no way to make the comm object start a transaction automatically. You will need to start a transaction by explicitly calling SqlConnection.BeginTransaction() and assign the returned SqlTransaction object to a SqlCommand.

You can also perform this in a stored procedure by using BEGIN TRAN.

Thank you. Is there any major performance hit when using the SqlConnection.BeginTransaction() technique vs SQL's BEGIN Tran? Because of the massive amounts of transactions I will need to write for my classes, it will alll be inline if it was SQL and NOT stored procedures (hard to maintain).

|||

Hi,

As far as I can see, they are the same. Not much differences.

Database concurrency

we are developing an ASP.NET application with SqlServer at backend..
there are an supplier and about 3000 customer, and each customer has about
3-4 users. they are selling mobile phone counters.
while a sale occurs, we are selecting customers stock amount, if it is
bigger then sale amount, we are updating its stock, and we increment
suppliers stock. The query is like that :
DECLARE @.StockAmount int
SELECT @.StockAmount = Amont FROM Stocks WHERE CustomerId = @.BuyerCustomerId
IF @.StockAmount > @.SaleAmount
UPDATE Stocks SET amount = @.StockAmount - @.SaleAmount WHERE CustomerId =
@.BuyerCustomerId
SELECT @.SuppliersStockAmount = Amont FROM Stocks WHERE CustomerId =
@.SellerCustomerId
UPDATE Stocks SET amount = @.StockAmount + @.SaleAmount WHERE CustomerId =
@.SellerCustomerId
i know, each customer has got not so many users and a concurrency problem
seems to be not a big possibility. but there is just a 1 supplier record and
i think conlicts are possible. how can i alter this problem. after a
research, i found
SELECT @.SuppliersStockAmount = Amont FROM Stocks WITH (XLOCK ROWLOCK) WHERE
CustomerId = @.SellerCustomerId
seems to work fine for us, but it will block the row untill the transaction
finishes. any approaches are appreciated. thanks.Try
SELECT @.SuppliersStockAmount = Amont FROM Stocks WITH (UPDLOCK) WHERE
CustomerId = @.SellerCustomerId
Some amount of blocks is unavoidable.
This lock hint won't block others for reading. It will assure that the data
has not changed since you last read it
"The Crow" <q> wrote in message
news:ODUI3bVVFHA.2984@.tk2msftngp13.phx.gbl...
> we are developing an ASP.NET application with SqlServer at backend..
> there are an supplier and about 3000 customer, and each customer has about
> 3-4 users. they are selling mobile phone counters.
> while a sale occurs, we are selecting customers stock amount, if it is
> bigger then sale amount, we are updating its stock, and we increment
> suppliers stock. The query is like that :
> DECLARE @.StockAmount int
> SELECT @.StockAmount = Amont FROM Stocks WHERE CustomerId =
@.BuyerCustomerId
> IF @.StockAmount > @.SaleAmount
> UPDATE Stocks SET amount = @.StockAmount - @.SaleAmount WHERE CustomerId =
> @.BuyerCustomerId
> SELECT @.SuppliersStockAmount = Amont FROM Stocks WHERE CustomerId =
> @.SellerCustomerId
> UPDATE Stocks SET amount = @.StockAmount + @.SaleAmount WHERE CustomerId =
> @.SellerCustomerId
> i know, each customer has got not so many users and a concurrency problem
> seems to be not a big possibility. but there is just a 1 supplier record
and
> i think conlicts are possible. how can i alter this problem. after a
> research, i found
> SELECT @.SuppliersStockAmount = Amont FROM Stocks WITH (XLOCK ROWLOCK)
WHERE
> CustomerId = @.SellerCustomerId
> seems to work fine for us, but it will block the row untill the
transaction
> finishes. any approaches are appreciated. thanks.
>|||You can use locking hint "UPDLOCK" or you can modify the statement and use
something like:
UPDATE Stocks
SET amount = amount - @.SaleAmount
WHERE CustomerId = @.BuyerCustomerId and amount > @.SaleAmount
...
AMB
"The Crow" wrote:

> we are developing an ASP.NET application with SqlServer at backend..
> there are an supplier and about 3000 customer, and each customer has about
> 3-4 users. they are selling mobile phone counters.
> while a sale occurs, we are selecting customers stock amount, if it is
> bigger then sale amount, we are updating its stock, and we increment
> suppliers stock. The query is like that :
> DECLARE @.StockAmount int
> SELECT @.StockAmount = Amont FROM Stocks WHERE CustomerId = @.BuyerCustomerI
d
> IF @.StockAmount > @.SaleAmount
> UPDATE Stocks SET amount = @.StockAmount - @.SaleAmount WHERE CustomerId =
> @.BuyerCustomerId
> SELECT @.SuppliersStockAmount = Amont FROM Stocks WHERE CustomerId =
> @.SellerCustomerId
> UPDATE Stocks SET amount = @.StockAmount + @.SaleAmount WHERE CustomerId =
> @.SellerCustomerId
> i know, each customer has got not so many users and a concurrency problem
> seems to be not a big possibility. but there is just a 1 supplier record a
nd
> i think conlicts are possible. how can i alter this problem. after a
> research, i found
> SELECT @.SuppliersStockAmount = Amont FROM Stocks WITH (XLOCK ROWLOCK) WHE
RE
> CustomerId = @.SellerCustomerId
> seems to work fine for us, but it will block the row untill the transactio
n
> finishes. any approaches are appreciated. thanks.
>
>|||This is the SQL Server Books Online explanations :
UPDATE LOCK :
Used on resources that can be updated. Prevents a common form of deadlock
that occurs when multiple sessions are reading, locking, and potentially
updating resources later.
UPDLOCK :
Takes update locks instead of shared locks. Cannot be used with NOLOCK or
XLOCK.
so, shared lock as u may know doesnt prevent reading data but modyfying,
which is not the case.|||UPDATE Stocks
SET amount = amount - @.SaleAmount
WHERE CustomerId = @.BuyerCustomerId and amount > @.SaleAmount
this statement "SELECT"s the suitable row aquiring update lock which behaves
same as shared lock, and then converts it exclusive lock prior to doing
actual update. isnt it?

Database compromise - need help

Hello,
Our db has been compromised. A column in the table has been changed to
something unwarranted for. I need suggestions on how to track this or at
least give me some clues on how these bastard made into our database.
Besides looking at the event logs on windows (security & system) and sql
logs in SQL Enterprise Manager, what/where else can I look at? At this point
what can i do to prevent this from happening again?
We are on sql 2000 sp4.
Also, one of our collegues went ahead and remove that column so it won't
display it in the website.
Besides restoring the whole database, can I restore the database from backup
to a different name. Then from the current database import that column in?
I remember doing this a while ago.
Thanks in advance.
tntSounds like SQL injection. Look through the web server logs and you might be
able to see the attacks. Google it and you will get alot of info. Yes, you
can restore to a diferrent name and then update.
Jason Massie
www: http://statisticsio.com
rss: http://statisticsio.com/Home/tabid/36/rssid/1/Default.aspx
"tnt" <tnt@.discussions.microsoft.com> wrote in message
news:0624B538-B0D5-47AA-BF4F-55F13E290031@.microsoft.com...
> Hello,
> Our db has been compromised. A column in the table has been changed to
> something unwarranted for. I need suggestions on how to track this or at
> least give me some clues on how these bastard made into our database.
> Besides looking at the event logs on windows (security & system) and sql
> logs in SQL Enterprise Manager, what/where else can I look at? At this
> point
> what can i do to prevent this from happening again?
> We are on sql 2000 sp4.
> Also, one of our collegues went ahead and remove that column so it won't
> display it in the website.
> Besides restoring the whole database, can I restore the database from
> backup
> to a different name. Then from the current database import that column
> in?
> I remember doing this a while ago.
> Thanks in advance.
> tnt|||Hi,
As you are having a web application you are most likely been hit by
SQL injection.
This is very common attack technique. If you are running your web
application with a high privileged windows or sql server account (like
sa). Always use a low privileged sql-account for your web
applications. Remember that 'sa' can run commands from dos-prompt
through your web application.
In addition to windows and SQL server logs, go also through your IIS-
logs. If you have an IDS/IPS/Firewall see if you can find anything in
their logs as well. If you have some kind of logging in your web
application see if there is anything there. My experience is that
trying to track down the attacker can be very very difficult. Use your
logs to understand the how the attacker attacked your application.
If your application has poor input validation routines on input from
users you are most probably vulnerable.
The absolute best way (and probably the only way which really works)
is to use prepared statements (or parameterized statements in .net).
Remember that SQL-injection, although very dangerous, is only one of
many attack-vectors to web applications.
Hope this helps.
Best regards,
Eirik
tnt skrev:
> Hello,
> Our db has been compromised. A column in the table has been changed to
> something unwarranted for. I need suggestions on how to track this or at
> least give me some clues on how these bastard made into our database.
> Besides looking at the event logs on windows (security & system) and sql
> logs in SQL Enterprise Manager, what/where else can I look at? At this point
> what can i do to prevent this from happening again?
> We are on sql 2000 sp4.
> Also, one of our collegues went ahead and remove that column so it won't
> display it in the website.
> Besides restoring the whole database, can I restore the database from backup
> to a different name. Then from the current database import that column in?
> I remember doing this a while ago.
> Thanks in advance.
> tnt|||Thanks guys. I talked to the programmer over the phone and he had modified
the program codes.
Any inputs or instructions on how to restore a column to a database without
restoring the whole database?
Tony
"Eiriken" wrote:
> Hi,
> As you are having a web application you are most likely been hit by
> SQL injection.
> This is very common attack technique. If you are running your web
> application with a high privileged windows or sql server account (like
> sa). Always use a low privileged sql-account for your web
> applications. Remember that 'sa' can run commands from dos-prompt
> through your web application.
> In addition to windows and SQL server logs, go also through your IIS-
> logs. If you have an IDS/IPS/Firewall see if you can find anything in
> their logs as well. If you have some kind of logging in your web
> application see if there is anything there. My experience is that
> trying to track down the attacker can be very very difficult. Use your
> logs to understand the how the attacker attacked your application.
>
> If your application has poor input validation routines on input from
> users you are most probably vulnerable.
> The absolute best way (and probably the only way which really works)
> is to use prepared statements (or parameterized statements in .net).
> Remember that SQL-injection, although very dangerous, is only one of
> many attack-vectors to web applications.
> Hope this helps.
> Best regards,
> Eirik
>
> tnt skrev:
> > Hello,
> >
> > Our db has been compromised. A column in the table has been changed to
> > something unwarranted for. I need suggestions on how to track this or at
> > least give me some clues on how these bastard made into our database.
> >
> > Besides looking at the event logs on windows (security & system) and sql
> > logs in SQL Enterprise Manager, what/where else can I look at? At this point
> > what can i do to prevent this from happening again?
> >
> > We are on sql 2000 sp4.
> >
> > Also, one of our collegues went ahead and remove that column so it won't
> > display it in the website.
> >
> > Besides restoring the whole database, can I restore the database from backup
> > to a different name. Then from the current database import that column in?
> > I remember doing this a while ago.
> >
> > Thanks in advance.
> > tnt
>

Database compromise - need help

Hello,
Our db has been compromised. A column in the table has been changed to
something unwarranted for. I need suggestions on how to track this or at
least give me some clues on how these bastard made into our database.
Besides looking at the event logs on windows (security & system) and sql
logs in SQL Enterprise Manager, what/where else can I look at? At this point
what can i do to prevent this from happening again?
We are on sql 2000 sp4.
Also, one of our collegues went ahead and remove that column so it won't
display it in the website.
Besides restoring the whole database, can I restore the database from backup
to a different name. Then from the current database import that column in?
I remember doing this a while ago.
Thanks in advance.
tnt
Sounds like SQL injection. Look through the web server logs and you might be
able to see the attacks. Google it and you will get alot of info. Yes, you
can restore to a diferrent name and then update.
Jason Massie
www: http://statisticsio.com
rss: http://statisticsio.com/Home/tabid/36/rssid/1/Default.aspx
"tnt" <tnt@.discussions.microsoft.com> wrote in message
news:0624B538-B0D5-47AA-BF4F-55F13E290031@.microsoft.com...
> Hello,
> Our db has been compromised. A column in the table has been changed to
> something unwarranted for. I need suggestions on how to track this or at
> least give me some clues on how these bastard made into our database.
> Besides looking at the event logs on windows (security & system) and sql
> logs in SQL Enterprise Manager, what/where else can I look at? At this
> point
> what can i do to prevent this from happening again?
> We are on sql 2000 sp4.
> Also, one of our collegues went ahead and remove that column so it won't
> display it in the website.
> Besides restoring the whole database, can I restore the database from
> backup
> to a different name. Then from the current database import that column
> in?
> I remember doing this a while ago.
> Thanks in advance.
> tnt
|||Hi,
As you are having a web application you are most likely been hit by
SQL injection.
This is very common attack technique. If you are running your web
application with a high privileged windows or sql server account (like
sa). Always use a low privileged sql-account for your web
applications. Remember that 'sa' can run commands from dos-prompt
through your web application.
In addition to windows and SQL server logs, go also through your IIS-
logs. If you have an IDS/IPS/Firewall see if you can find anything in
their logs as well. If you have some kind of logging in your web
application see if there is anything there. My experience is that
trying to track down the attacker can be very very difficult. Use your
logs to understand the how the attacker attacked your application.
If your application has poor input validation routines on input from
users you are most probably vulnerable.
The absolute best way (and probably the only way which really works)
is to use prepared statements (or parameterized statements in .net).
Remember that SQL-injection, although very dangerous, is only one of
many attack-vectors to web applications.
Hope this helps.
Best regards,
Eirik
tnt skrev:
> Hello,
> Our db has been compromised. A column in the table has been changed to
> something unwarranted for. I need suggestions on how to track this or at
> least give me some clues on how these bastard made into our database.
> Besides looking at the event logs on windows (security & system) and sql
> logs in SQL Enterprise Manager, what/where else can I look at? At this point
> what can i do to prevent this from happening again?
> We are on sql 2000 sp4.
> Also, one of our collegues went ahead and remove that column so it won't
> display it in the website.
> Besides restoring the whole database, can I restore the database from backup
> to a different name. Then from the current database import that column in?
> I remember doing this a while ago.
> Thanks in advance.
> tnt
|||Thanks guys. I talked to the programmer over the phone and he had modified
the program codes.
Any inputs or instructions on how to restore a column to a database without
restoring the whole database?
Tony
"Eiriken" wrote:

> Hi,
> As you are having a web application you are most likely been hit by
> SQL injection.
> This is very common attack technique. If you are running your web
> application with a high privileged windows or sql server account (like
> sa). Always use a low privileged sql-account for your web
> applications. Remember that 'sa' can run commands from dos-prompt
> through your web application.
> In addition to windows and SQL server logs, go also through your IIS-
> logs. If you have an IDS/IPS/Firewall see if you can find anything in
> their logs as well. If you have some kind of logging in your web
> application see if there is anything there. My experience is that
> trying to track down the attacker can be very very difficult. Use your
> logs to understand the how the attacker attacked your application.
>
> If your application has poor input validation routines on input from
> users you are most probably vulnerable.
> The absolute best way (and probably the only way which really works)
> is to use prepared statements (or parameterized statements in .net).
> Remember that SQL-injection, although very dangerous, is only one of
> many attack-vectors to web applications.
> Hope this helps.
> Best regards,
> Eirik
>
> tnt skrev:
>
sql

Database compromise - need help

Hello,
Our db has been compromised. A column in the table has been changed to
something unwarranted for. I need suggestions on how to track this or at
least give me some clues on how these bastard made into our database.
Besides looking at the event logs on windows (security & system) and sql
logs in SQL Enterprise Manager, what/where else can I look at? At this poin
t
what can i do to prevent this from happening again?
We are on sql 2000 sp4.
Also, one of our collegues went ahead and remove that column so it won't
display it in the website.
Besides restoring the whole database, can I restore the database from backup
to a different name. Then from the current database import that column in?
I remember doing this a while ago.
Thanks in advance.
tntSounds like SQL injection. Look through the web server logs and you might be
able to see the attacks. Google it and you will get alot of info. Yes, you
can restore to a diferrent name and then update.
Jason Massie
www: http://statisticsio.com
rss: http://statisticsio.com/Home/tabid/.../1/Default.aspx
"tnt" <tnt@.discussions.microsoft.com> wrote in message
news:0624B538-B0D5-47AA-BF4F-55F13E290031@.microsoft.com...
> Hello,
> Our db has been compromised. A column in the table has been changed to
> something unwarranted for. I need suggestions on how to track this or at
> least give me some clues on how these bastard made into our database.
> Besides looking at the event logs on windows (security & system) and sql
> logs in SQL Enterprise Manager, what/where else can I look at? At this
> point
> what can i do to prevent this from happening again?
> We are on sql 2000 sp4.
> Also, one of our collegues went ahead and remove that column so it won't
> display it in the website.
> Besides restoring the whole database, can I restore the database from
> backup
> to a different name. Then from the current database import that column
> in?
> I remember doing this a while ago.
> Thanks in advance.
> tnt|||Hi,
As you are having a web application you are most likely been hit by
SQL injection.
This is very common attack technique. If you are running your web
application with a high privileged windows or sql server account (like
sa). Always use a low privileged sql-account for your web
applications. Remember that 'sa' can run commands from dos-prompt
through your web application.
In addition to windows and SQL server logs, go also through your IIS-
logs. If you have an IDS/IPS/Firewall see if you can find anything in
their logs as well. If you have some kind of logging in your web
application see if there is anything there. My experience is that
trying to track down the attacker can be very very difficult. Use your
logs to understand the how the attacker attacked your application.
If your application has poor input validation routines on input from
users you are most probably vulnerable.
The absolute best way (and probably the only way which really works)
is to use prepared statements (or parameterized statements in .net).
Remember that SQL-injection, although very dangerous, is only one of
many attack-vectors to web applications.
Hope this helps.
Best regards,
Eirik
tnt skrev:
> Hello,
> Our db has been compromised. A column in the table has been changed to
> something unwarranted for. I need suggestions on how to track this or at
> least give me some clues on how these bastard made into our database.
> Besides looking at the event logs on windows (security & system) and sql
> logs in SQL Enterprise Manager, what/where else can I look at? At this po
int
> what can i do to prevent this from happening again?
> We are on sql 2000 sp4.
> Also, one of our collegues went ahead and remove that column so it won't
> display it in the website.
> Besides restoring the whole database, can I restore the database from back
up
> to a different name. Then from the current database import that column in
?
> I remember doing this a while ago.
> Thanks in advance.
> tnt|||Thanks guys. I talked to the programmer over the phone and he had modified
the program codes.
Any inputs or instructions on how to restore a column to a database without
restoring the whole database?
Tony
"Eiriken" wrote:

> Hi,
> As you are having a web application you are most likely been hit by
> SQL injection.
> This is very common attack technique. If you are running your web
> application with a high privileged windows or sql server account (like
> sa). Always use a low privileged sql-account for your web
> applications. Remember that 'sa' can run commands from dos-prompt
> through your web application.
> In addition to windows and SQL server logs, go also through your IIS-
> logs. If you have an IDS/IPS/Firewall see if you can find anything in
> their logs as well. If you have some kind of logging in your web
> application see if there is anything there. My experience is that
> trying to track down the attacker can be very very difficult. Use your
> logs to understand the how the attacker attacked your application.
>
> If your application has poor input validation routines on input from
> users you are most probably vulnerable.
> The absolute best way (and probably the only way which really works)
> is to use prepared statements (or parameterized statements in .net).
> Remember that SQL-injection, although very dangerous, is only one of
> many attack-vectors to web applications.
> Hope this helps.
> Best regards,
> Eirik
>
> tnt skrev:
>

Database Compatibilty with ASP.net

Hi:

If I will export my SQL express based database to SQL 2000 database - would I will be facing any compatibiltiy issues with my application. Do I just need to change the connection string in my config file and everything will work?

Danka

No, it won't just "work". It is possible for it to work though. You will need to ensure that your SQL Compatibility level on your express database is set to 80. Even then, I am not sure about express. It may not be possible at all.

Database Compatibility Mode - when to change??

I have been migrating Databases from a SQL Server 7.0 Instance to a 2000 Instance. Basically the method I use is as follows:

a)Create a new Database on the Destination Server (same name as the Source) When I create the new Database on my destination server, the compatibility mode is '80' and the source is always '70'

b) do a 'revlogin' on the Source Server and use the output from that query to recreate the logins on the destination server

c) make sure that the default DB for the newly creates logins are correct and change them if necessary

d) Backup the DB on the Source Server and Restore it to the Destination Server.

e) Check login permissions and fix any orphaned users - usually I don't find any that need to be fixed, but I always check.

I've read BOL on Changing the compatibility mode on the Database... but I'm still unsure when I would have to do this and why?????? SHOULD I be changing the compatiblity mode from 80 to 70 when migrating Databases from 7.0 to 2000?? Any advice on moving DBs in this manner would be appreciated.sounds like you're doing it correctly. I always changed the compatability mode as the very last step...I know I've had an issue when I didn't change it - at one point, but it happened a very long time ago, and I can't remember the specifics - I think it had something to do with Quoted Identifiers...if you have procs that use double quotes instead of single quotes to identify text fields...it was pretty bizarre.|||Thanks much for the reply!

Database Compatibility Level

Hi,
I don't know if anyone can help but I'm trying to understand exactly how
setting database compatibility works. Has anyone seen a good explanation of
this (I've spent ages using google/msdn etc trying to find a detailed
description)?
I want to attach a couple of SQK 2K databases to a SQL Server 2005 cluster.
These databases are not supported by third parties on 2005. Would setting the
database compatibility to 80 (S2K) make sure they are run as a 2K database on
2005?
This would save me maintaining two installation of SQl server (2K and 2005).
I'm not sure I totally understand this functionality.
Thanks,
Jason.
> I want to attach a couple of SQK 2K databases to a SQL Server 2005
> cluster.
> These databases are not supported by third parties on 2005. Would setting
> the
> database compatibility to 80 (S2K) make sure they are run as a 2K database
> on
> 2005?
That is a legal question that you should ask of your 3rd party. Even when
emulating a prior version, there is no guarantee that a particular query
will return the same results in the same way using the enhancements /
changes in the database engine. The compatibility setting will not affect
the system stored procedures - on which your 3rd party system may depend.
Even MS carefully constrains the compability claims. InBOL, MS says, "Sets
certain database behaviors to be compatible with the specified earlier
version of Microsoft SQL ServerT. "
|||Hi Jason
All databases available through a SQL 2005 server are SQL 2005 databases.
Setting a compatibility level just makes the database more compatible with
earlier versions, but they are still SQL 2005 databases.
The differences allows with the compatibility level are mainly how certain
keywords are used, and what object names are allowed. The architecture of
the database is a SQL 2005 architecture and is a 3rd party can't deal with
the architectural changes in SQL 2005, they won't be able to deal with a SQL
2005 database in a lower compatibility level.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"JayMG" <JayMG@.discussions.microsoft.com> wrote in message
news:E2D65A62-9F3D-454F-90CE-75A9C3E21F1B@.microsoft.com...
> Hi,
> I don't know if anyone can help but I'm trying to understand exactly how
> setting database compatibility works. Has anyone seen a good explanation
> of
> this (I've spent ages using google/msdn etc trying to find a detailed
> description)?
> I want to attach a couple of SQK 2K databases to a SQL Server 2005
> cluster.
> These databases are not supported by third parties on 2005. Would setting
> the
> database compatibility to 80 (S2K) make sure they are run as a 2K database
> on
> 2005?
> This would save me maintaining two installation of SQl server (2K and
> 2005).
> I'm not sure I totally understand this functionality.
> Thanks,
> Jason.
>

Database Compatibility Level

Hi,
I don't know if anyone can help but I'm trying to understand exactly how
setting database compatibility works. Has anyone seen a good explanation of
this (I've spent ages using google/msdn etc trying to find a detailed
description)?
I want to attach a couple of SQK 2K databases to a SQL Server 2005 cluster.
These databases are not supported by third parties on 2005. Would setting th
e
database compatibility to 80 (S2K) make sure they are run as a 2K database o
n
2005?
This would save me maintaining two installation of SQl server (2K and 2005).
I'm not sure I totally understand this functionality.
Thanks,
Jason.> I want to attach a couple of SQK 2K databases to a SQL Server 2005
> cluster.
> These databases are not supported by third parties on 2005. Would setting
> the
> database compatibility to 80 (S2K) make sure they are run as a 2K database
> on
> 2005?
That is a legal question that you should ask of your 3rd party. Even when
emulating a prior version, there is no guarantee that a particular query
will return the same results in the same way using the enhancements /
changes in the database engine. The compatibility setting will not affect
the system stored procedures - on which your 3rd party system may depend.
Even MS carefully constrains the compability claims. InBOL, MS says, "Sets
certain database behaviors to be compatible with the specified earlier
version of Microsoft SQL ServerT. "|||Hi Jason
All databases available through a SQL 2005 server are SQL 2005 databases.
Setting a compatibility level just makes the database more compatible with
earlier versions, but they are still SQL 2005 databases.
The differences allows with the compatibility level are mainly how certain
keywords are used, and what object names are allowed. The architecture of
the database is a SQL 2005 architecture and is a 3rd party can't deal with
the architectural changes in SQL 2005, they won't be able to deal with a SQL
2005 database in a lower compatibility level.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"JayMG" <JayMG@.discussions.microsoft.com> wrote in message
news:E2D65A62-9F3D-454F-90CE-75A9C3E21F1B@.microsoft.com...
> Hi,
> I don't know if anyone can help but I'm trying to understand exactly how
> setting database compatibility works. Has anyone seen a good explanation
> of
> this (I've spent ages using google/msdn etc trying to find a detailed
> description)?
> I want to attach a couple of SQK 2K databases to a SQL Server 2005
> cluster.
> These databases are not supported by third parties on 2005. Would setting
> the
> database compatibility to 80 (S2K) make sure they are run as a 2K database
> on
> 2005?
> This would save me maintaining two installation of SQl server (2K and
> 2005).
> I'm not sure I totally understand this functionality.
> Thanks,
> Jason.
>sql

database compatibility level

A couple of weeks ago we had upgraded our SQL Server 6.5
to ver. 7.0. We've just observed that for all of our
databases, the database compatibility level remains at 65.
My concern here is... can we change this compatibility
level to 70 on the fly? Would this incur an outage of any
sort? Are there any precautions that I should be aware of
before set the database compatibility level to 70?
Thanks in advance for your help and suggestions.You can certainly change on the fly, but there will be some semantic =changes to the SQL that may catch out your application. BOL has a =summary of the differences, but it is things like:
SELECT 'a' + '' + 'b' -- Nothe there is no space between the middle pair =of single quotes -
At 65 will give 'a b' - ie the zerolength string is interpreted as a =single space.
At 7 will give 'ab' - which I would say is right.
Others such as =3D NULL behaving non-standard at 65 but fixed at 7 can =catch you if the app uses it.
BOL has a description of all the differences.
Mike John
"Rob" <rhchin@.hotmail.com> wrote in message =news:01fc01c3425c$c76bc8a0$a301280a@.phx.gbl...
> A couple of weeks ago we had upgraded our SQL Server 6.5 > to ver. 7.0. We've just observed that for all of our > databases, the database compatibility level remains at 65.
> > My concern here is... can we change this compatibility > level to 70 on the fly? Would this incur an outage of any > sort? Are there any precautions that I should be aware of > before set the database compatibility level to 70?
> > Thanks in advance for your help and suggestions.

Database Compatibility Level

Hi,
I don't know if anyone can help but I'm trying to understand exactly how
setting database compatibility works. Has anyone seen a good explanation of
this (I've spent ages using google/msdn etc trying to find a detailed
description)?
I want to attach a couple of SQK 2K databases to a SQL Server 2005 cluster.
These databases are not supported by third parties on 2005. Would setting the
database compatibility to 80 (S2K) make sure they are run as a 2K database on
2005?
This would save me maintaining two installation of SQl server (2K and 2005).
I'm not sure I totally understand this functionality.
Thanks,
Jason.> I want to attach a couple of SQK 2K databases to a SQL Server 2005
> cluster.
> These databases are not supported by third parties on 2005. Would setting
> the
> database compatibility to 80 (S2K) make sure they are run as a 2K database
> on
> 2005?
That is a legal question that you should ask of your 3rd party. Even when
emulating a prior version, there is no guarantee that a particular query
will return the same results in the same way using the enhancements /
changes in the database engine. The compatibility setting will not affect
the system stored procedures - on which your 3rd party system may depend.
Even MS carefully constrains the compability claims. InBOL, MS says, "Sets
certain database behaviors to be compatible with the specified earlier
version of Microsoft® SQL ServerT. "|||Hi Jason
All databases available through a SQL 2005 server are SQL 2005 databases.
Setting a compatibility level just makes the database more compatible with
earlier versions, but they are still SQL 2005 databases.
The differences allows with the compatibility level are mainly how certain
keywords are used, and what object names are allowed. The architecture of
the database is a SQL 2005 architecture and is a 3rd party can't deal with
the architectural changes in SQL 2005, they won't be able to deal with a SQL
2005 database in a lower compatibility level.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"JayMG" <JayMG@.discussions.microsoft.com> wrote in message
news:E2D65A62-9F3D-454F-90CE-75A9C3E21F1B@.microsoft.com...
> Hi,
> I don't know if anyone can help but I'm trying to understand exactly how
> setting database compatibility works. Has anyone seen a good explanation
> of
> this (I've spent ages using google/msdn etc trying to find a detailed
> description)?
> I want to attach a couple of SQK 2K databases to a SQL Server 2005
> cluster.
> These databases are not supported by third parties on 2005. Would setting
> the
> database compatibility to 80 (S2K) make sure they are run as a 2K database
> on
> 2005?
> This would save me maintaining two installation of SQl server (2K and
> 2005).
> I'm not sure I totally understand this functionality.
> Thanks,
> Jason.
>

database compatibility between sql 2005 standard v/s sql 2005 64 bit

I am a newbie developing a web site. My local machine has sql 2005 standard edition on it. The host that I am trying to use only has sql 2005 64 bit version.

would I be able to do the use the same database between the two ( i.e. once my site is running at host, would I be able to download the database on my local machine, make changes to my site and then upload again on the hose without any glitches?). In addition, how about sql express doing the same with sql 2005 64 bit.

Thanks a lot for taking time to read the post.

get a new host lol...come to my employeer, www.hosting.com. we offer express & std 32BIT lol who only offers 64bit.