|
Example:
exec SP_storedProcedure 2,2,@outParameter out
|
|
|
|
|
THANKS FOR YOUR ANSWER
prasannaarumugam
|
|
|
|
|
Hi.
Any idea what happens if multiple instances of an application try to insert records into the same table of a database at the same time?
Will all of them succeed? Will only the first one to come be allowed to do it?
Is there any chance to screw up the database?
PS: I am using Access at the moment, but the question is also for SQL Server and MySql.
Thank.
|
|
|
|
|
blackjack2150 wrote: Any idea what happens if multiple instances of an application try to insert records into the same table of a database at the same time?
Will all of them succeed? Will only the first one to come be allowed to do it?
Is there any chance to screw up the database?
In answer to your questions:
Yes.
Maybe
Maybe
Yes
If multiple inserts are performed at the same time the first will lock the table and the others will wait for access.
If the update is quick enough all will succeed. If the update operation takes too long some INSERTs may fail becuase they timed out.
And there is the opportunity to screw up the database. If you update the same bits of data in different ways only the last update will persist as it overwrites the previous updates. This may not be what you want.
|
|
|
|
|
I was affraid so.
Thanks!
|
|
|
|
|
plz I need to know in sql 2005 which data type is case sensitive.
BiG RaLpH
|
|
|
|
|
It depends on the collation that has been set up.
|
|
|
|
|
I have to input data into 2 fields that are primary keys and some of the only difference between the data is the case. one is uppercase the other is lower case. I tried the nchar the nvarchar and the char. it works if I use the binary but how can I display these if they r in binary.
BiG RaLpH
|
|
|
|
|
go to Modify for table and set collation for field case sensitive any for language
Rami Abdalhalim
|
|
|
|
|
Thx rami it worked
BiG RaLpH
|
|
|
|
|
Big Ralph wrote: it works if I use the binary but how can I display these if they r in binary.
Where did I say anything about binary?
|
|
|
|
|
You may not have said binary, but we can read between the lines.;P It's what you really meant - admit it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
OK - forum rules. Don't start new threads when you have the same one actively on the go.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I'm not finding the sql DATA type that is case sensitive Please Help.
BiG RaLpH
|
|
|
|
|
|
Actually I'm not trying to find anything in case sensitive mode all I want is to set the primary key to be case sensitive coz it's been a dbf database Now I'm migrating it from dbf to sql 2005 (mdf). thx for ur reply and plz if you have an answer plz let me know.
BiG RaLpH
|
|
|
|
|
hi all.
I have problem, In my program I export xls file in SQL, one column in this file is datatime and this time must write by user. Sow I have problem
user can use one of this time format:
1) DD.MM.YY
2) YY.MM.DD
3) DD/MM/YY
4) YY/MM/DD
5) DD.MM.YYYY
6) YYYY.MM.DD
......
......
and I must covert it to standard YYYY-MM-DD.
if you can tell me how I can convert
this strings to standard YYYY-MM-DD format.
|
|
|
|
|
convert(datetime,'02/03/2004',102)
convert(datetime,'02/03/2004',101)
Rami Abdalhalim
|
|
|
|
|
use validation controls
alternatively you can use 3 different comboboxs(for year,for month and for days)for getting user input date.
|
|
|
|
|
hi
there are no of ways to conver the datetime to in to standard format.
here are some of the formats hope this is useful to you
100---Jun 30 200
101---06/30/2006
102---2006.06.30
103---30/06/2006
104---30.06.2006
105---30-06-2006
106---30 Jun 200
107---Jun 30, 20
108---11:54:59
109---Jun 30 200
110---06-30-2006
111---2006/06/30
112---20060630
113---30 Jun 200
114---11:54:59
select convert(varchar(10),getdate(),101)
get back for any qureries.
|
|
|
|
|
This code below connected to a Access Database. I want to make it connect to a SQL Server 2005(As u can see, I have a server connection string)..Are there any changes that I need to make to the methods of the OleDb Class or any other class because its not working.
private void btnLogin_Click(object sender, System.EventArgs e) <br />
{ <br />
string ConString = "Data Source=porky;Initial Catalog=IS3_sysdev;Integrated Security=True"; <br />
OleDbConnection DBCon = new OleDbConnection(ConString); <br />
GlobalVariables.g_login = this.textBox1.Text; <br />
<br />
string strPassword = this.textBox2.Text;<br />
<br />
if (GlobalVariables.g_login == "" || strPassword == "")<br />
{ <br />
MessageBox.Show("You are missing information. Please make sure that both the username and password fields are filled out.", "Missing Info"); <br />
this.textBox1.Focus(); <br />
return; <br />
} <br />
string strsql = "SELECT [UserID], [Password] FROM Users WHERE [UserID]='" + GlobalVariables.g_login + "' "; <br />
<br />
OleDbCommand cm = new OleDbCommand(strsql, DBCon); <br />
OleDbDataReader dr; <br />
bool valid = false; <br />
bool HasRows = false; <br />
try { <br />
DBCon.Open();<br />
dr = cm.ExecuteReader(); <br />
if (dr.HasRows) { <br />
while (dr.Read()) { <br />
if (strPassword == dr.GetString(1)) { <br />
valid = true; <br />
} <br />
} <br />
HasRows = true; <br />
} <br />
dr.Close(); <br />
} <br />
catch (OleDbException exO) { <br />
MessageBox.Show(exO.Message); <br />
} <br />
catch (Exception ex) { <br />
MessageBox.Show(ex.Message); <br />
} <br />
<br />
iCount = iCount + 1; <br />
if (valid == true) {<br />
Form n = new Form4();<br />
n.Show();<br />
this.Hide();<br />
} <br />
else if (iCount == 3) { <br />
MessageBox.Show("Contact Developers!", "Invalid Info"); <br />
this.Close(); <br />
} <br />
else if (HasRows == false) { <br />
MessageBox.Show("Invalid user name, try again!", "Invalid Info"); <br />
this.textBox1.Focus(); <br />
this.textBox1.Text = ""; <br />
this.textBox2.Text = ""; <br />
} <br />
else { <br />
MessageBox.Show("Invalid password, try again!", "Invalid Info"); <br />
this.textBox2.Focus(); <br />
this.textBox2.Text = ""; <br />
} <br />
<br />
}
Thanks in Advance....
I bis th bit
|
|
|
|
|
What's the error message?
OleDb should allow you to connect to SQL Server also if you provide the proper connection string. However, in the area of SQL parameters Access and SQL Server use different notations.
|
|
|
|
|
Your connection string is wrong. It is missing a provider designation. The string you are using is correct for an SqlConnection (System.Data.SqlClient), but not for an OledbConnection. See a correct example here[^]
|
|
|
|
|
plz help me
shell
|
|
|
|
|
Any of: open it with SQL Server Management Studio (you will need to have installed the client tools), or pass it as an argument to sqlcmd (preferred) or osql .
If you have SQL Server Management Studio installed it should be the program associated with the .sql filename extension. You can open the file simply by double-clicking it in Explorer. It will then prompt for connection information.
|
|
|
|