Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

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

Thursday, March 22, 2012

ConnectionString without Password

Hello!

I am working at a ASP.NET Project with has a sign-in area. All users (the aspnet_Membership and so on) are on an external SQL Server stored.

The ConnectionString in the web.config looks like this:

<add name="hspWerbung" connectionString="Persist Security Info=False;User ID=XXXXX;Password=XXXXX;Initial Catalog=HSPWERBUNG01;Data Source=SERVER_SQL_02\STOCKHOLM"
providerName="System.Data.SqlClient" /
Is there any way to create a ConnectionString without the User ID and without the password?

When i want to reach my site on the web (not with http://localhost/...) , i can't do it with "Integrated Security=True", because there will be no user, or?

hi, some where we have to store the user name and pwd. the alternative apoach is to encript them and store in the xml file using hash algorthim. when ever you are trying to connect to the DB get the string and decript it and store in the cache or session.

sqlsql

Thursday, March 8, 2012

Connection to Oracle sometimes hangs

Hi,

For a customer we have implemented a datawarehouse with a connection to
Oracle. From the beginning of the project the connection to Oracle
gives troubles. The next morning is the connection still active and
when the customer looks in the processes of SQL Server a " Wait type,
RESOURCE_SEMAPHORE." is shown. For what i know. SQL Server is waiting
for a resource, in this case Oracle but doesn't tell me anything about
what could be the problem.

The customer uses the Oracle driver instead of a microsft oracle
driver.

What could it be? and how can we tackle this problem? Are there ways to
look from Oracle point of view? Can we monitor something?

Greetz,
HennieHi

I am not sure if this will be any help, but may be worth a read!
http://support.microsoft.com/kb/280106/

John

"Hennie7863" <hdenooijer@.hotmail.com> wrote in message
news:1136279581.264058.154520@.g14g2000cwa.googlegr oups.com...
> Hi,
> For a customer we have implemented a datawarehouse with a connection to
> Oracle. From the beginning of the project the connection to Oracle
> gives troubles. The next morning is the connection still active and
> when the customer looks in the processes of SQL Server a " Wait type,
> RESOURCE_SEMAPHORE." is shown. For what i know. SQL Server is waiting
> for a resource, in this case Oracle but doesn't tell me anything about
> what could be the problem.
> The customer uses the Oracle driver instead of a microsft oracle
> driver.
> What could it be? and how can we tackle this problem? Are there ways to
> look from Oracle point of view? Can we monitor something?
> Greetz,
> Hennie|||Hi john, Thanx for your answer, but we dont use linked server. Just an
OLEDB connection (via UDL's) with Oracle. Well the customer has
investigated a bit further and told me that a value of 70 characters
is written into a field of 40 characters. When he executes the packages
by hand it will throw an error. When executed with aid of a job it will
continue running. So I think it could be a JOB problem in SQL Server
2000. Any one ideas?

Saturday, February 25, 2012

connection string using sql authentication

i'm having trouble getting my project to work on other machines using windows authentication, so as this is urgent I want to change it to sql authentication. I've enabled sql authentication and enabled the sa login, could someone please tell me how to connect to my db

my connection string is currently as follows using windows authentication:

<

connectionStrings>

<

addname="GuitarShackConnection"connectionString="Server=(local)\SqlExpress;Integrated Security=True;Database=GuitarShack;"providerName="System.Data.SqlClient"/>

<

addname="GuitarShackConnectionString"connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog=GuitarShack;Integrated Security=True"providerName="System.Data.SqlClient"/>

<

addname="CustomerNameDS"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/>

</

connectionStrings><add name="ConnectionString" connectionString="Server=.\SQLEXPRESS;Database=xxxxxxxxxx;User ID=xxxxxxx;Password=xxxxxxx;Trusted_Connection=False"
providerName="System.Data.SqlClient" />|||

i've enabled sa and restarted the sql service but when i go to modify the connection in the database explorer and enter the credentials it returns an error when i test the connection:

the user sa is not associated with a trusted sql connection

any ideas what would cause this?

|||The full ins and outs of Sql Server permissions are beyond me, because I find it difficult to remember what user can do what. So I administer my servers using Windows Authentication on the local machine, set the Server up to operate in Mixed Mode, then create application users. I give these users the absolute minimum permissions possible, which is only actuallyExecute on the stored procedures I create for the app. They have no SELECT, DELETE, UPDATE or INSERT permissions. I know that you must NEVER use the sa account to connect to SQL Server from your ASP.NET app. That user has every privilege going.|||

Hi, the follow steps may be helpful to you.

To change security authentication mode
1. In SQL Server Management Studio Object Explorer, right-click your server, and then click Properties.
2. On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
3. In the SQL Server Management Studio dialog box, click OK, to acknowledge the need to restart SQL Server.


To restart SQL Server from SQL Server Management Studio
1. In Object Explorer, right-click your server, and then click Restart. If running, SQL Server Agent must also be restarted.


To enable the sa login
1. Execute the following statements to enable the sa password and assign a password.
ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = '<password>' ;
GO

Thanks.

Friday, February 24, 2012

Connection string problem

Hi people,
I have my web application running on my machine and it works on the current machine where I have created the project when I type localhost on the web browser. I tried running the application from another machine within the same network by typing the IP address of the machine where my asp.net project is located, the application works, but SQL Server wouldn't allow connection to be made when I start calling data from the database. I have set Impersonate="true" in the web.config file. Am I doing something wrong here?
Here's the configuration on the web.config file

<identityimpersonate="true"/>

<appSettings>

<addkey="Connection"

value="Server=SQLOLEDB.1;Data Source=SQLServer;Initial Catalog=myDatabase;Trusted_Connection=True;"/>

</appSettings>


Please help....
Kero

When you do that you impersonate IUSR_COMPUTERNAME; so, in that scenario that account must have rights to the database.
I think you may have to use Sql Server authentication and pass a userid/pwd pair in your conn string.
|||Thanks ChicoUser,
I have sort out my impersonate problem by following one of the tutorials from microsoft website. I have set up a Customer user instead using Aspnet account on the machine and given appropriate permissions to access the files. In the Web.config file I have added impersonate =true and provided username and password which allows the created account to get access to my SQL SERVER. It's working now.
kero :)

Connection String Options ...Urgent .. plz reply

Hi

In my project , we are using Dsn and DSN less connection, for certain functionality

we are providing users to select tables and views .

we don't want that all system tables and views are listed for selecting , how can we achieve this functionality?

Is there any options in the connection string for restricting system tables and views?

Any help is much appriciated

Thanks

Saurabh

Book mark the following site;

http://www.connectionstrings.com/

Connection string for the Ms-SQl Server using ASP.net

Hello,

I am doing the web based project for the final year of my couse
in Information Technology using Asp.net and ms-sql server.But to start
with that I need to connect my web pages to the database.
So Can anyone tell me how to connect my page web to the ms-sql
server using Asp.net(Connection String)?.It will be better if someone
give me the code for the connection string along with the explaination
so that I don't have problem understanding it.

Any kind of help will be appreciated.

Thank You.

Suchen Chodankar.Hi
Check out

http://msdn.microsoft.com/library/d.../SecNetHT03.asp
http://msdn.microsoft.com/library/d.../SecNetch12.asp
http://msdn.microsoft.com/library/d...ml/secmod83.asp
http://www.connectionstrings.com/

John

"Suchen Chodankar" <suchen.chodankar@.gmail.com> wrote in message
news:295fd3c8.0503112318.57e54ca3@.posting.google.c om...
> Hello,
> I am doing the web based project for the final year of my couse
> in Information Technology using Asp.net and ms-sql server.But to start
> with that I need to connect my web pages to the database.
> So Can anyone tell me how to connect my page web to the ms-sql
> server using Asp.net(Connection String)?.It will be better if someone
> give me the code for the connection string along with the explaination
> so that I don't have problem understanding it.
> Any kind of help will be appreciated.
> Thank You.
> Suchen Chodankar.

Sunday, February 19, 2012

connection string does not work for a different server

Hi all,
I currently have an ASP .Net project running locally,
and accessing a local SQL server 2000 database. The
project runs fine since it is able to open the connection to the database,
and perform operations on it locally using
a connection dtata string pointing to the local data source.
However, when I wanted to point to a different server
using the same definitions, the connection did not work.
The only changes have been the name of the data source.
From (local) to SQL9, and the catalog from openhouse to srm. A user with the
same ID, and password was defined
in the target SQl server using the same permissions, and the authentication
is windows and SQL server.
I am able to ping to the server, and access the tables of this database
using enterprise manager using the user
that was defined. At this point I do not know what to
do. Any suggestion is greatly appreciated.
Thanks,
Carlos.
Can you post the error/exception you get?
Vikram Vamshi
Eclipsys Corporation
"Carlos" <chsanin@.earthlink.net> wrote in message
news:u52OyjIGFHA.3824@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I currently have an ASP .Net project running locally,
> and accessing a local SQL server 2000 database. The
> project runs fine since it is able to open the connection to the database,
> and perform operations on it locally using
> a connection dtata string pointing to the local data source.
> However, when I wanted to point to a different server
> using the same definitions, the connection did not work.
> The only changes have been the name of the data source.
> From (local) to SQL9, and the catalog from openhouse to srm. A user with
> the
> same ID, and password was defined
> in the target SQl server using the same permissions, and the
> authentication
> is windows and SQL server.
> I am able to ping to the server, and access the tables of this database
> using enterprise manager using the user
> that was defined. At this point I do not know what to
> do. Any suggestion is greatly appreciated.
> Thanks,
> Carlos.
>

connection string does not work for a different server

Hi all,
I currently have an ASP .Net project running locally,
and accessing a local SQL server 2000 database. The
project runs fine since it is able to open the connection to the database,
and perform operations on it locally using
a connection dtata string pointing to the local data source.
However, when I wanted to point to a different server
using the same definitions, the connection did not work.
The only changes have been the name of the data source.
From (local) to SQL9, and the catalog from openhouse to srm. A user with the
same ID, and password was defined
in the target SQl server using the same permissions, and the authentication
is windows and SQL server.
I am able to ping to the server, and access the tables of this database
using enterprise manager using the user
that was defined. At this point I do not know what to
do. Any suggestion is greatly appreciated.
Thanks,
Carlos.Can you post the error/exception you get?
Vikram Vamshi
Eclipsys Corporation
"Carlos" <chsanin@.earthlink.net> wrote in message
news:u52OyjIGFHA.3824@.TK2MSFTNGP10.phx.gbl...
> Hi all,
> I currently have an ASP .Net project running locally,
> and accessing a local SQL server 2000 database. The
> project runs fine since it is able to open the connection to the database,
> and perform operations on it locally using
> a connection dtata string pointing to the local data source.
> However, when I wanted to point to a different server
> using the same definitions, the connection did not work.
> The only changes have been the name of the data source.
> From (local) to SQL9, and the catalog from openhouse to srm. A user with
> the
> same ID, and password was defined
> in the target SQl server using the same permissions, and the
> authentication
> is windows and SQL server.
> I am able to ping to the server, and access the tables of this database
> using enterprise manager using the user
> that was defined. At this point I do not know what to
> do. Any suggestion is greatly appreciated.
> Thanks,
> Carlos.
>

Tuesday, February 14, 2012

connection string

hi, i was just wondering what's wrong with my code. i have class library to handle all the classes of my asp.net project. when im compiling a class, i am getting an error "Error 1 The name 'ConfigurationManager' does not exist in the current context " . i have this code for that error message:

string connStr = ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString;
im not sure about this because im new in asp.net. am i missing a reference here?if yes, what namespace should i include? by the way, i tested this directly in my asp.net age and it is working fine. when i use visual c#.net, that's where the error prompts me, and i cant build that class library.

Make sure this is referenced in the cs file:

using System.Configuration;

|||

Add this at the top of your pageusing System.Configuration;