|
That all sounds great dude, do you know of an actual working VB.net demo I can view that details how that all works?
If it helps, I have a radeditor. Initial it loads with generic info, that everyone sees. Each user is allowed to edit and tailer the content in that rad editor, including uploading/inserting images, to their heart's content. They then click to view another page they may want to edit. I need all the changes/image inserts from that prior page to hang somewhere, but not the database, until the very end.
So, do you know of any VB.net demo online illustrating this?
TYVM
|
|
|
|
|
New to ADO .NET (& C#), please help..
I have multiple questions on connecting to SQLServer 2005. I'm doing the following in my code:
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
builder["Server"] = cmboBoxServerName.Text;
builder["Data Source"] = cmboBoxServerName.Text;
builder["Initial Catalog"] = cmboBoxDBName.Text;
builder["integrated Security"] = true;
builder["Trusted_Connection"] = true;
strConnectStr = builder.ConnectionString;
IDbConnection connection = New SqlConnection();
connection.ConnectionString = strConnectStr;
connection.Open();
This is working fine if I have SQL Native Client installed on my machine.
When I deploy this on a machine witout SQLNativeClient I get the error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'my domain\ my username'.
My questions:
1. Is 'SQL Native Client' required to connect (through my C# App using ADO.NET) to a remote SQL Server ?
2. When is SQL Native client required and when is not? What is the purpose of having a SQL Client for ADO.NET Apps?
3. What is the difference between builder["Server"] and builder["Data Source"]?
4. What is the difference between builder["integrated Security"] and builder["Trusted_Connection"]?
5. What is the minimum number of SQL Client licenses per Server?
6. What is SQL Express and can I use it with ADO .NET? Can I use it as an alternative if don't have enough licenses? Again, should I install it on every machine as well even if I ought to connect to a centralized remote database?
Looks like I have multiple issues and I'm getting confused with my limited knowledge.. I just want to clear out one by one..
Please direct me to any tutorial that handles case by case set up scenarios..
from local server to remote server to cross platform..
Thanks a lot!
-ap
|
|
|
|
|
wrong section, you should ask it in C#
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
1. Is 'SQL Native Client' required to connect (through my C# App using ADO.NET) to a remote SQL Server ?
No, not if you're using Managed API (Data.SQLClient)
2. When is SQL Native client required and when is not? What is the purpose of having a SQL Client for ADO.NET Apps?
If your application uses ADO or OLEDB or ODBC or other API's to access SQL Server
3. What is the difference between builder["Server"] and builder["Data Source"]?
Both refer to the same thing.
4. What is the difference between builder["integrated Security"] and builder["Trusted_Connection"]?
Both refer to the same thing. Both this and the question above is
probably because you can use multiple interchangeable keywords in the SQLConnection ConnectionString property.
Refer to <a href="http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx">this</a>[<a href="http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx" target="_blank" title="New Window">^</a>] article for details.
5. What is the minimum number of SQL Client licenses per Server?
Depends on what kind of license you've bought for your server. There are per CPU licenses
and per connection licenses. IIRC you'll get atleast 5 connetions if you opt for the per
connection license.
6. What is SQL Express and can I use it with ADO .NET?
Yes. Definitely
Can I use it as an alternative if don't have enough licenses?
Yes again
Again, should I install it on every machine as well even if I ought to connect to a centralized remote database?
If you're using a centralized server, you don't have to use the Express Edition. Express
edition is meant to be a standalone database on every system and is not looked
at for multiple users.
Read <a href="http://www.microsoft.com/sql/howtobuy/faq.mspx">this</a>[<a href="http://www.microsoft.com/sql/howtobuy/faq.mspx" target="_blank" title="New Window">^</a>]
and <a href="http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx">this</a>[<a href="http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx" target="_blank" title="New Window">^</a>] for further clarifications.
SG
Cause is effect concealed. Effect is cause revealed.
|
|
|
|
|
Thanks a lot!
.. lot of things cleared!
I can now start off from here..
Thanks Again!
-ap
|
|
|
|
|
I am creating application using asp.net and c# and Oracle 10G as database. I am using Nhibernate
When I execeute from query from my page query first time it works fine and also do its job but in the same session if i try to run the same query it is giving me an exception which is
“From Keyword exception”.
The query is written on Command button using a Command button.
I have debugged the code and from the command object I pick up the query and run into SQL developer its running fine.
I also assure as Nhibernate session is also closed.
I also try Global.asax to close the Nhibernate Session.
To start with it looks like session problem which i tried to knock out by closing session, reader, object and also disposing command object.
Any suggestion to resolve this .
Thanks
Waqas
Waqas
|
|
|
|
|
You're going to have to supply us with more information. What is the query you are running? What code are you running to execute the query? What is the exact wording of the error you are getting?
|
|
|
|
|
hi all
can anyone tell me how to count the number of records(rows)in a table without using "COUNT" aggregate function.
thanx in advance.
pintoo
|
|
|
|
|
chithra.r wrote: without using "COUNT"
What is that you are trying to do? If you are writing a proc, you may use @@RowCount[^]
Pl: Read through the documentation listed in the above URL, to know the scenarios where it can be applied.
Give a man a fish, he'll eat for a day. Teach a man how to fish, he'll eat for lifetime.
Pradeep Joe
|
|
|
|
|
@@Rowcount is only gives you the number of rows affected by the last query, for example
select count(*) from table1
will give an @@RowCount of 1
The best way I know of without using select count(*) is
EXEC sp_spaceused 'tablename'
which gives you
name rows reserved data index_size unused
If you only want an approximate count
select max(rows)<br />
from sysindexes <br />
where indid < 2<br />
and id = object_id('TableName')
(this is not 100% accurate as rows sysindexes is not always updated)
Bob
Ashfield Consultants Ltd
|
|
|
|
|
What's wrong with COUNT()?
|
|
|
|
|
I wonder if you are misunderstanding what you can do with COUNT
Try this query and see if the results it gives you are what you want:
select 'Rows in table:'+cast((select count(*) from tablename)as varchar(20))
You always pass failure on the way to success.
|
|
|
|
|
This might work instead
Select MAX(rowid)-MIN(rowid) from table
|
|
|
|
|
I want to calculate the percentile. I need any function or procedure to calcuate percentile. Thanks in advance....
Do good and have good.
|
|
|
|
|
Google[^]
Give a man a fish, he'll eat for a day. Teach a man how to fish, he'll eat for lifetime.
Pradeep Joe
|
|
|
|
|
Be a bit more elaborate about your question...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
hi,
in my app , i expect; when user write Record Number a textbox then click delete button i want to be deleted that record.
Code ;
OleDbCommand delCmd = new OleDbCommand("DELETE FROM FAALIYET WHERE KNO =" + txtKayitNo, Rapor);
Rapor.Open();
delCmd.ExecuteNonQuery();
Getting Error ; 'KNO =System.Windows.Forms.TextBox, Text: 6' syntax error in the query.
whats the problem?
|
|
|
|
|
try changing code to:
OleDbCommand delCmd = new OleDbCommand("DELETE FROM FAALIYET WHERE KNO =" + txtKayitNo.Text, Rapor);
it's much better and safer to use parameterized queries.
|
|
|
|
|
lol this is so funny mistake i forget put .text in front of the txtKayitNo. Thanx mann
|
|
|
|
|
hello,
i've a question that is there any way by which i can store a string direct to database instead of table ? something like settings in C#
because i dont want to make a table only for that string
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
A database is made up of tables. That's how it works. You need to define a table to have a place to store your data. Perhaps the DB is the wrong place for what you want to store, or you need to define a table of key/value pairs to let you store unique values ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
nono, i just want to store a string with every database, something like a tag property with every control in C#
it will be strange that if someone make a table only for a string
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: it will be strange that if someone make a table only for a string
Maybe, but this is the right way
|
|
|
|
|
Extended properties can be used for storing metadata. As people have said though - if this information is part of your domain it should be in the model - even if it is Config ( Key, Value)
|
|
|
|