Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Tuesday, March 27, 2012

Considerations when delete records from table.

Hello, I'm developing application which monitors network packets. The monitoring data are saved into table. Monitoring table maintains the data for fixed quantum time,for example during one 1 hour. So, every minute before or after insert new data, I delete the time-expired data. I doubt that the endless delete operation would results in some problems(increasing index,etc..).

Is this mechanism safe to the dbms?

Aren't there round-robin(?) style table?

thats wat OLTP is for.... just keep the update statistics to auto (its default) , if ur using indexes.....also there may be fragmentation issues ...but thats a DBA activity/Db maintainance...

Sunday, March 25, 2012

connectivity sql ce

hi friends,

i am developing a dictionary for pocket device

i am using sql ce database .

i have included and copied that file in the project but every time exception occurs saying check the directory . file can not be found.....

may be this a little one but help me......

its urgent..........

What code are you using to open the database?|||

Public Function search(ByVal s As String)

Dim conn As SqlCeConnection = Nothing

Try

conn = New SqlCeConnection("Database='Dictionary.sdf';password='<pwd>';")

conn.Open() '<here it stops saying that file not found

Catch

Finally

conn.Close()

End Try

conn.Close()

Return 0

End Function

|||

On device, there is no relative path concept. So, please use full/absolute path!

Thanks,

Laxmi

|||

ok that part is done

using path as data source='program files/projectfolder/database'

now i have to connect a application on pda to a sql ce database on desktop

is it feasible if yes please

provide me the syntax

connectivity sql ce

hi friends,

i am developing a dictionary for pocket device

i am using sql ce database .

i have included and copied that file in the project but every time exception occurs saying check the directory . file can not be found.....

may be this a little one but help me......

its urgent..........

What code are you using to open the database?|||

Public Function search(ByVal s As String)

Dim conn As SqlCeConnection = Nothing

Try

conn = New SqlCeConnection("Database='Dictionary.sdf';password='<pwd>';")

conn.Open() '<here it stops saying that file not found

Catch

Finally

conn.Close()

End Try

conn.Close()

Return 0

End Function

|||

On device, there is no relative path concept. So, please use full/absolute path!

Thanks,

Laxmi

|||

ok that part is done

using path as data source='program files/projectfolder/database'

now i have to connect a application on pda to a sql ce database on desktop

is it feasible if yes please

provide me the syntax

Tuesday, March 20, 2012

Connections to SQL Server

I have been developing an Intranet for the past few months, and now that I
have developed about 4 apps, I am questioning my connection string. We have
a Windows 2000 Server with SQL Server 2000 and are using Integrated Auth. so
that people don't have to login to the sql server.
Here is my current connection string,
MM_CliCore_STRING = "Provider=SQLOLEDB.1;Trusted_Connection=Yes;Data
Source=swvtc06;Initial Catalog=CliCore;"
As you can see I am using Trusted Connection, which is the only way that I
could get this connection to work. If I remove the trusted connection info,
it doesn't work at all.
How should I go about setting this up? Why is using trusted connection such
a bad idea? It seems to work, if someone doesn't have permission, it
doesn't let them into the db. And, what are the other ways of doing this?
Thanks,
Drew LaingHi Drew,
Your connection should read as follows:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False
I use this string in a delphi ado connection component to set up a trusted c
onnection to my database server.
Regards,
Ruud Aalders
quote:
Originally posted by Drew
I have been developing an Intranet for the past few months, and now that I
have developed about 4 apps, I am questioning my connection string. We have
a Windows 2000 Server with SQL Server 2000 and are using Integrated Auth. so
that people don't have to login to the sql server.
Here is my current connection string,
MM_CliCore_STRING = "Provider=SQLOLEDB.1;Trusted_Connection=Yes;Data
Source=swvtc06;Initial Catalog=CliCore;"
As you can see I am using Trusted Connection, which is the only way that I
could get this connection to work. If I remove the trusted connection info,
it doesn't work at all.
How should I go about setting this up? Why is using trusted connection such
a bad idea? It seems to work, if someone doesn't have permission, it
doesn't let them into the db. And, what are the other ways of doing this?
Thanks,
Drew Laing

Connections to SQL Server

I have been developing an Intranet for the past few months, and now that I
have developed about 4 apps, I am questioning my connection string. We have
a Windows 2000 Server with SQL Server 2000 and are using Integrated Auth. so
that people don't have to login to the sql server.
Here is my current connection string,
MM_CliCore_STRING = "Provider=SQLOLEDB.1;Trusted_Connection=Yes;Data
Source=swvtc06;Initial Catalog=CliCore;"
As you can see I am using Trusted Connection, which is the only way that I
could get this connection to work. If I remove the trusted connection info,
it doesn't work at all.
How should I go about setting this up? Why is using trusted connection such
a bad idea? It seems to work, if someone doesn't have permission, it
doesn't let them into the db. And, what are the other ways of doing this?
Thanks,
Drew LaingHi Drew,
Your connection should read as follows:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Securit
Info=False
I use this string in a delphi ado connection component to set up
trusted connection to my database server.
Regards,
Ruud Aalders
Drew wrote:
> *I have been developing an Intranet for the past few months, and no
> that I
> have developed about 4 apps, I am questioning my connection string.
> We have
> a Windows 2000 Server with SQL Server 2000 and are using Integrate
> Auth. so
> that people don't have to login to the sql server.
> Here is my current connection string,
> MM_CliCore_STRING = "Provider=SQLOLEDB.1;Trusted_Connection=Yes;Data
> Source=swvtc06;Initial Catalog=CliCore;"
> As you can see I am using Trusted Connection, which is the only wa
> that I
> could get this connection to work. If I remove the truste
> connection info,
> it doesn't work at all.
> How should I go about setting this up? Why is using truste
> connection such
> a bad idea? It seems to work, if someone doesn't have permission
> it
> doesn't let them into the db. And, what are the other ways of doin
> this?
> Thanks,
> Drew Laing
-
Ruud Aalder
----
Posted via http://www.webservertalk.co
----
View this thread: http://www.webservertalk.com/message462636.htm

Connections to SQL Server

I have been developing an Intranet for the past few months, and now that I
have developed about 4 apps, I am questioning my connection string. We have
a Windows 2000 Server with SQL Server 2000 and are using Integrated Auth. so
that people don't have to login to the sql server.
Here is my current connection string,
MM_CliCore_STRING = "Provider=SQLOLEDB.1;Trusted_Connection=Yes;Da ta
Source=swvtc06;Initial Catalog=CliCore;"
As you can see I am using Trusted Connection, which is the only way that I
could get this connection to work. If I remove the trusted connection info,
it doesn't work at all.
How should I go about setting this up? Why is using trusted connection such
a bad idea? It seems to work, if someone doesn't have permission, it
doesn't let them into the db. And, what are the other ways of doing this?
Thanks,
Drew Laing
Hi Drew,
Your connection should read as follows:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False
I use this string in a delphi ado connection component to set up a
trusted connection to my database server.
Regards,
Ruud Aalders
Drew wrote:
> *I have been developing an Intranet for the past few months, and now
> that I
> have developed about 4 apps, I am questioning my connection string.
> We have
> a Windows 2000 Server with SQL Server 2000 and are using Integrated
> Auth. so
> that people don't have to login to the sql server.
> Here is my current connection string,
> MM_CliCore_STRING = "Provider=SQLOLEDB.1;Trusted_Connection=Yes;Da ta
> Source=swvtc06;Initial Catalog=CliCore;"
> As you can see I am using Trusted Connection, which is the only way
> that I
> could get this connection to work. If I remove the trusted
> connection info,
> it doesn't work at all.
> How should I go about setting this up? Why is using trusted
> connection such
> a bad idea? It seems to work, if someone doesn't have permission,
> it
> doesn't let them into the db. And, what are the other ways of doing
> this?
> Thanks,
> Drew Laing *
Ruud Aalders
Posted via http://www.webservertalk.com
View this thread: http://www.webservertalk.com/message462636.html
sqlsql

Saturday, February 25, 2012

Connection string to SQL Server database

I am a java programmer and currently developing a web application that is suposed to keep records of all Computers that are purchased or written off. I have my database sitting at MSSQL server express ed. 2005 and so far i only know to connect to Access DB. Can someone help me with the syntax to connect to MSSQL server.

reply to [email removed]

Quote:

Originally Posted by Java25

I am a java programmer and currently developing a web application that is suposed to keep records of all Computers that are purchased or written off. I have my database sitting at MSSQL server express ed. 2005 and so far i only know to connect to Access DB. Can someone help me with the syntax to connect to MSSQL server.

reply to Me


Check this site .. and you ll find the connections to all the existing databases in the world ;-) .. it really worked for me and I am using this for the past 4 yrs.

http://www.connectionstrings.com/

HTH..

Sunday, February 19, 2012

Connection string for PDA

Hello,

I am using VS 2005 and developing PDA device application to run on SQL CE. The PDA has Windows CE 5.0 OS.

Now I am using the following code for connection to database: I got this code from some website on Internet but do not remember which one:

Try
Dim FullAppName As String = [Assembly].GetCallingAssembly().GetName.CodeBase
Dim FullAppPath As String = Path.GetDirectoryName(FullAppName)
MessageBox.Show(FullAppPath)

Dim FullFileName As String = Path.Combine(FullAppPath, "Test123.sdf")
Dim cn As New SqlCeConnection(String.Format("Data Source={0}", FullFileName))
MessageBox.Show(FullFileName)
cn.Open()
MessageBox.Show("Connection Success")

Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Here the problem is that
1. FullAppPath returns \Windows. But the database is in application folder i.e. \Program Files\DeviceSampleApp. Then why does it return \Windows.

2. So I copied the test123.sdf file in \Windows folder. But cn.Open goes to catch block. This means there is some error but surprisingly ex.ToString displays blank messagebox. What could be the issue?


3. I also changed the connection string as:
Dim cn As New SqlCeConnection("Data Source = \Program Files\DeviceSampleApp\Test123.sdf") and the Test123.sdf correctly gets deployed to this folder \Program Files\DeviceSampleApp\ which also has the EXE. Still it gives error that it cannot find the database Test123.sdf in the path \Program Files\DeviceSampleApp\ but I checked and it is there. What could be the issue?

Regards,
MI

For proper SQL CE error handling, see http://msdn2.microsoft.com/en-us/library/ms174079.aspx

For how to determine "App.Path" in .NET CF, see this: http://msdn2.microsoft.com/en-us/library/aa457089.aspx

|||

GetCallingAssembly() would work if this code is in the DLL which is called from your EXE. If this code is in the EXE itself use GetExecutingAssemly() instead.

Friday, February 10, 2012

Connection Problem

I am developing a web app using VB.NET and SQL server 2000. My database server is on a different machine. I have no problems connecting to the server from my local machine but when i deploy the application on to the server where my database is running, I get all sorts of wierd messages. This is happening when I try to connect to the database.
My development machine is XP pro and my server is running win 2k server.

My connection string looks like
server=ip address\database server name; database=name;user id="test";pwd="test";

The exception occurs when I try to open the connection.

Please help.
Thanks in advance.I am getting the following error and I do not understand.

Expected '=' delimiter while parsing connection value pair.
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.ArgumentException: Expected '=' delimiter while parsing connection value pair.|||Check out the SQL Server connection strings athttp://www.connectionstrings.com/ and see if that helps.

Terri|||Thanks Terri. It helped. I was not using the Trusted_Connection=False statement.