|
I am assuming you mean Enterprise Database? The answer is the same as you open a sql or any other kind of database:
using EnterpriseDB.EDBClient;
string strConnectionString = ConfigurationSettings.AppSettings
["DB_CONN_STRING"];
EDBConnection conn = new EDBConnection(strConnectionString);
try {
conn.Open();
Response.Write("Connection opened successfully");
}
catch(EDBException exp) { exp.ToString(); }
finally {
conn.Close();
}
I have not compiled the code so expect errors
|
|
|
|
|
How can I write some text to the Event Viewer from a stored procedure?
|
|
|
|
|
|
Quoted from this[^] website;
xp_logevent {error_number, 'message'} [, 'severity']
I are troll
|
|
|
|
|
I'm fairly new to ADO .NET concepts.
I understand that the framework gives a Data.SqlClient namespace with its collection of classes. I installed SQL Server on my machine, but not the SQL Client. And connected/queried the database from C#, using these provider classes.
I deployed my application on other machines as well to connect/query the 'database on my machine'. I did not install the SQL Client that comes with SQL Server on any of the machines.
My question is - for a production envionment is there a necessity for SQL Client licensing for various users? Is mere installing SQL Server on a network server not sufficient when I'm using ADO .NET?
How does this licensing - sql client installation - server set up work?
I tried to read a number of sites but I could not get a straight answer to my question.
I greatly appreciate response.
Thanks
Ap
|
|
|
|
|
You don't need licenses on the client machines. The server needs to have a license for the appropriate version of SQL Server, unless it's SQL Express.
I are troll
|
|
|
|
|
|
There is Something that you are not Doing Right. You must always remember that SQl is not shipped with your Application.
SQL server must be Installed Separately and it has nothing to do with what you have in your Application. In your Application if you decide to use SQl , then you will use appropriate libraries and use ado.net. When you are done compiling your application , you will install the setup project on the client machine that has .net installed and your application is supposed to work, there is nothing extra that your application needs than SQl Server, so no licenses.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
how to remove all sql server 2005 componet? After i remove it from Add/Remove Program, why it still appare in Start=> Programs => Sql Managment Studio. how can i remove all of it?
|
|
|
|
|
uninstall Sql Management Studio from add/remove programs
|
|
|
|
|
Why did you vote me down? It's a separate application which isn't removed when you uninstall MSSQL, it has to be uninstalled separately...
|
|
|
|
|
because i have done as what u said so many many times as i can. even i go into registry delete some KEY in LOCAL_Machine, but i can't run it after i reinstall new SQL server 2005.
|
|
|
|
|
That is no reason to down vote someone. He gave you the correct answer. It is not his fault that your system is screwed.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ok... u and him are good .... course of my fault....
|
|
|
|
|
"Unable to access first record" this error occur while generating crystal report. i m generating crystal report using vb.
if anybody has any solution please suggest me.
thank you
|
|
|
|
|
If you really want help, you're going to have to give everyone a bit more information than that.
|
|
|
|
|
I don't know why when I use select with ExecuteQuery my result will have repeated the lastes line.
And my friend adviced me that I should use ExecuteReader now it's work
What's the different ???
here is my code !!
public void Add()
{
if (File.Exists("" + info + ".db"))
{
sql_con = new SQLiteConnection("Data Source= " + info + ".db;Version=3;New=False;Compress=True;");
sql_con.Open();
sql_cmd = sql_con.CreateCommand();
sql_cmd.CommandText = "drop table par ;";
sql_cmd.ExecuteNonQuery();
}
else
{
sql_con = new SQLiteConnection("Data Source= " + info + ".db;Version=3;New=True;Compress=True;");
sql_con.Open();
sql_cmd = sql_con.CreateCommand();
}
sql_cmd.CommandText = "create table par (Date nvarchar(20), Time nvarchar(10), Linein NVARCHAR(20), Lineout NVARCHAR(20), Number NVARCHAR(20), Status nvarchar(10),Duration int(20), Cost nvarchar(20), Detail nvarchar(10), Network nvarchar(10));";
sql_cmd.ExecuteNonQuery();
StreamReader reader = new StreamReader(inputfilename);
string line = reader.ReadLine();
while (line != null)
{
string NNDuration = line.Replace("'", "''");
string Date = line.Substring(12, 8);
if (line[11] == '=')
{
string Time = line.Substring(21, 5);
string Linein = line.Substring(27, 10);
string Lineout = line.Substring(38, 1);
if (string.Compare(Lineout, "0") >= 0 && string.Compare(Lineout, "9") <= 0)
{
string Number = line.Substring(40, 20);
string Status = line.Substring(61, 3);
string NDuration = NNDuration.Substring(65, 10);
string b = NDuration.Substring(2, 2);
string c = NDuration.Substring(6, 2);
int y = Convert.ToInt32(b);
int l = Convert.ToInt32(c);
int Duration = y + l;
string OCost = line.Substring(73, 5);
string Cost = OCost.Trim();
string Detail = line.Substring(79, 3);
string Network = line.Substring(82, 8);
sql_cmd.CommandText = "insert into par values('" + Date + "','" + Time + "','" + Linein + "','" + Lineout + "','" + Number + "','" + Status + "','" + Duration + "','" + Cost + "','" + Detail + "','" + Network + "');";
sql_cmd.ExecuteNonQuery();
textBox14.Text = textBox14.Text + "\r\n" + Date + " ";
}
else
{
textBox5.Text = textBox5.Text + "\r\n" + line;
}
}
else
{
textBox5.Text = textBox5.Text + "\r\n" + line;
}
line = reader.ReadLine();
}
}
private void LoadData()
{
string CommandText = "select * from par ";
sql_cmd.ExecuteReader();
DB = new SQLiteDataAdapter(CommandText, sql_con);
DS.Reset();
DB.Fill(DS);
DT = DS.Tables[0];
dataGridView1.DataSource = DT;
sql_con.Close();
}
|
|
|
|
|
Hi,
DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type). Reader is best fit to show the Data (where no need to work on data)
DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand, UpdateCommand, DeleteCommand, SelectCommand), It supports to the disconnected Architecture of .NET show we can populate the records to the DataSet. where as Dataadapter is best fit to work on data.
|
|
|
|
|
Use ExecuteNonQuery to use DML statements like insert, update, delete etc. Use ExecuteReader to use select statement for fast and forward only data retirveal from the database.
Either you love IT or leave IT...
|
|
|
|
|
i don know why i cannot login to sql server 2005 after create an file Access connect to sql server? it show message when login "TITLE: Connect to Server
------------------------------
Cannot connect to SOKHENG.
------------------------------
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)
------------------------------
but if i change server name from "Sokheng" to "Sokheng\SQLEXPRESS" it can login, but i found my database name in that.
do anybody kno why ? please show me some guid line .......
|
|
|
|
|
xingselex wrote: but if i change server name from "Sokheng" to "Sokheng\SQLEXPRESS" it can login,
"Sokheng" isn't the name of the server, but the name of the computer on which the server is installed. The name of the server-instance is "SQLEXPRESS". You'll need to specify both in order to connect. You can substitute the PC-name for an IP-address, if you want;
127.0.0.1\SQLEXPRESS You can specify the name of the instance during the installation of SQL Server.
Good luck
I are troll
|
|
|
|
|
hi!
Since VOIP is prohibited within some area, broadband internet ISPs block VOIP ports or drop VOIP signal and voice packets,so i want to wrapp the VoIP trffic into a package which can not be detected by ISP.
So can any one please help what should i do for wrapping?
Which technology should I use?(may be SSL Tunneling or any other?)
Please help me.
thanx in advance
Note:May be this is not the right forum,but i dont know which technology or programing lang i should use)
|
|
|
|
|
You stated that you want to try something that is prohibited. Ergo, everyone who helps, is helping you in breaking a law
I are troll
|
|
|
|
|
hello there!
I have an access DB filled with tables and I want to copy the tables along with the data in it to a sql server db table. Is that possible? Thanks in advance, Laziale
|
|
|
|
|