Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Connection String Help


  hello all

i use (RDB Relational Data Base)

and i need the correct connection string to use it in my asp project  Page_load

  i dont want to us dsn to connect to my database

 

this is my DSN info




View Complete Forum Thread with Replies

Related Forum Messages:
Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object
I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View Replies !
The Connection Name 'LocalSqlServer' Was Not Found In The Applications Configuration Or The Connection String Is Empty.
Hi,
I'm having a BIG problem, this is my 3rd day looking for answer !I'm trying to create a custom membership provider with MS SQL database 2005 but not the default ASPNETDB. I've changed the web.config to be as following:<connectionStrings><add name="sqlConn" connectionString="Data Source=.;Integrated Security=True;Initial Catalog=ASPNETDB;"providerName="System.Data.SqlClient" /></connectionStrings> <system.web><trace enabled="true" /><roleManager enabled="true" /><authentication mode="Forms" />
<membership defaultProvider="MySqlProvider"><providers><remove name="AspNetSqlProvider"/><add name="MySqlProvider" connectionStringName="SqlConn" type="System.Web.Security.SqlMembershipProvider" applicationName="/" /></providers></membership>
But when I try to login to the site using the login control the following error occurs:
Server Error in '/etest' Application.


Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.Source Error:



Line 149: <roleManager>
Line 150: <providers>
Line 151: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 152: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 153: </providers>Source File: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Configmachine.config    Line: 151


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213
 It is clear that this is a prblem with my Machine.Config file - since I've "worked!" on this file for a while. But when I've checked the Machine.config file I've found the LocalSqlServer connection it is talking about! .
I'm lost and I dunno what to do, can anyone help?
Here is the mahine.config in case if you need it:<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>
<system.data><DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></DbProviderFactories>
</system.data><system.web>
<processModel autoConfig="true" /><httpHandlers />
<membership><providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /></providers>
</membership><profile>
<providers><add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></profile>
<roleManager><providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></roleManager>
</system.web>

View Replies !
The Connection Name 'name' Was Not Found In The Applications Configuration Or The Connection String Is Empty
 

I have seen another thread with this same problem, but the problem seemed to be a typo.  I am getting an error when I try to access the web site ..
 

The connection name 'USASH-AS0013' was not found in the applications configuration or the connection string is empty.
 
However, in my web.config file I do have a connection named USASH-AS0013.  Here is my web.config file (with my user/pwd hidden).  Any help would be greatly appreciated.
 


<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration>
 <appSettings/>
 <connectionStrings>
  <add name="USASH-AS0013" connectionString="Provider=SQLOLEDB;Data Source=USASH-AS0013;User ID=****;Password=*****;Initial Catalog=&quot;Smart Factory&quot;"
   providerName="System.Data.OleDb" />
 </connectionStrings>
 <system.web>
  <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions
            where data loss can occur.
            Set explicit="true" to force declaration of all variables.
        -->
    <compilation debug="true" strict="false" explicit="true"/>
    <pages theme="MySkin" >
   <namespaces>
    <clear/>
    <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add namespace="System.Web.UI.WebControls"/>
    <add namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
   </namespaces>
  </pages>
  <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
  <authentication mode="Windows"/>
  <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
 </system.web>
</configuration>

View Replies !
The Connection Name 'name' Was Not Found In The Applications Configuration Or The Connection String Is Empty
I have been trying to host my website on Go Daddy for about 3 weeks and I have cleared several problems but this one remains. I can get into the ASPNETDB database for doing logins , etc but I cant access my database called "PINEmgt".
To try to understand where the problem is located,I built a very simple application without login controls and put on  it one Detailform accessing a single line table "Signin". I continually get the error message I got with my real app :"The connection name 'PINEMgtConnectionString2' was not found in the applications configuration or the connection string is empty. " There is only one connection string in my app -'PINEMgtConnectionString2'. When I run the app locally on my machine it works. After I move everything to Go Daddy, I get the error message and the following dump"
 




Line 24: </Fields>
Line 25: </aspetailsView>
Line 26: <aspqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStringsINEMgtConnectionString2 %>"
Line 27: InsertCommand="INSERT INTO Signup(first_name, last_name, email, customer_id) VALUES (,,,)"
Line 28: SelectCommand="SELECT * FROM [Signup]"></aspqlDataSource>

This is indeed the code from my single page app.
 
The dump is:




[InvalidOperationException: The connection name 'PINEMgtConnectionString2' was not found in the applications configuration or the connection string is empty.]
System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) +3039085
ASP.default_aspx.__BuildControlSqlDataSource1() in d:hostinguck7scoutDefault.aspx:26
ASP.default_aspx.__BuildControlform1() in d:hostinguck7scoutDefault.aspx:10
ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in d:hostinguck7scoutDefault.aspx:1
ASP.default_aspx.FrameworkInitialize() in d:hostinguck7scoutDefault.aspx.vb:912306
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


After Googleing, asking Go Daddy for info (which they dont give) , etc for three weeks, I need serious mental help
in the form of a solution of this problem. Your help with the problem or the name of a good mental health professional in eastern N.C. (maybe both) would be appreciated.

View Replies !
Cannot Set Connection String For Bulk Insert Source Connection
I came across something strange today. I was wondering I was doing something wrong.

View Replies !
Edit Connection Manager Connection String At Runtime With C#
This is the first time I have used SSIS, so please bear with the ignorance.

 

I have a super simple package that inserts x000's of rows into a temporary table. The data source is a file that the user will upload. I need to be able to tell the package what file to upload. I'm thinking the simplest thing would be to edit the connectionString property of the SourceConnectionFlatFile at runtime. Is this possible? What form should the file path be in (UNC, other)? And, are there any other considerations I should be aware of?

 

Thanks!

View Replies !
Variable Connection String For OLE DB Connection
Good Morning,

 

I hope that I am just missing a step in the process somewhere.  I have established a string variable called DatabaseServer and another called DatabaseName.  In the OLE DB connectionstring expression I have the following:




Code Snippet

"Data Source=" +   @[User::DatabaseServer] + ";Initial Catalog=" +  @[User::DatabaseName] + ";Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"

 

My understanding is that changing the variable from SERVERA to SERVERB should repoint the connection.  (Test to pre-production to production in my current promotion environment.)  This should also take effect in any dataflow task using the database connection above right?  When I try to repoint the server variable (and only the server variable) I am either a.)throwing errors saying the original connection cannot be found in the data flow task, or b.)the job appears to be processing fine, but the repoint did not take place and data is still flowing to the original server.

 

Can anyone offer suggestions as to what I am missing?

 

The properties values in the DB connection:

ConnectionManagerType is OLEDB

DataSourceID is blank

DelayValidation is False (Setting to true changes nothing in my test)

Expression for ConnectionString is (see above)

RetainSameConnection is False

SupportsDTCTTransactions is True (and appears to be unchangeable.)

 

View Replies !
Connection String
how can I use server.mappath in an aspx page inside a sqldatasource tag
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("users.mdb")
this works in aspx.vb page but not works in the aspx page
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("users.mdb")   this line causes error
ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM [track]">
</asp:SqlDataSource>

View Replies !
Connection String Help
Hello all,
Please help me as i am not able to connect to my database
i have my databse in datab directory
and this is my connection string
<add name="Connstrmy" connectionString="my server ; AttachDbFilename=&quot;datadirectory est.mdf&quot;;uid=username; pwd=passowrd;"
providerName="System.Data.SqlClient" />
 
hosting people have said that you are using uid and password for databse and not of server
i have to add user id and password for server also
how do i do that?
is user id=uid
pwd=password?
please help me

View Replies !
Connection String In J#?
 hi all...i need the code for providing connection string in visual J#....am declaring the connection string globally in webconfig file using the key 'SqlCon' am integrate the connection in all my pages..in C# am using like this             string Strconnection1 = System.Configuration.ConfigurationSettings.AppSettings["SqlCon"];            SqlConnection Sql_con1 = new SqlConnection(Strconnection1);            Sql_con1.Open();  but in J# i dont know how to implement the connection....if anybody have an idea let me know quickly....thanks in advance.... 

View Replies !
Help With Connection String
Could someone help me with my connection string and how I should create it?
I have a Windows 2003 server running MS Sql 2005.  This is a separate server, meaning I'm developing my ASPX code on my laptop and FTP the code over to the server.   I'm not sure how to write my connection string.   Should My current connection string point to my locally hosted DB.  Now that I have my own server should I replace my current 'localhost' entry with the server's IP address?  Do I need to create a DNS on the server?  Sorry, I'm very new to all this and I'm lost.  Any help would be greatly appricated. 
 

View Replies !
Connection String Help
here is sample conenction string i want o use for my web site 
<add name="myconstr" connectionString="data source=//SQLEXPRESS; AttachDbFilename=&quot;data est.mdf&quot;;Trusted_connection=yes; uid=&quot;username&quot;; pwd=&quot;password&quot;; Integrated security=true;Connect Timeout=30;User Instance=True"
providerName="System.data.sqlclient" />
now i am getting this error
 
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
please tell is my connection string wrong?
i have sahred hosting they say its coding problem.
and i guess
its may be becasue
 datasource as SQLEXPRESS
Please help me where I am wrong?
username and passowrd its the one provided by them
data folder i have created under wwwroot
wwwroot s my websites root folder
please help at your earliest as i am new and have no other source of help.
 
 
 

View Replies !
Connection String??
    Hi ,I m using this Connection string Data Source=Dev30/SQLExpress;Server=Dev30;Initial Catalog=Fran;Integrated Security=sspi; i get an error 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 i set the Surface area connection to TCP/IP browser satred..!! Still get this error !!Regards,Francis P.                

View Replies !
Connection String In VB
I have the following code:
' Dim connStr As String = System.Configuration.ConfigurationManager.AppSettings("AppDoc")
Rather than use the AppSettings within Configuration Manager, I just want to use the connection string.  I've seen examples of this in CS but none in VB.  Can someone point me in the right direction?
I thought it would be something like this but it doesn't work:
Dim connStr As SqlDataSource = New SqlDataSource(ConfigurationManager.ConnectionStrings["AppDoc"].ConnectionStrings)

View Replies !
Connection String
Hi , I've been searching for this answer for a few hours now but unfortunately I still can not sort it.
I'm attempting to make a "Database Driven Hierarchical Menu" from this tutorial http://aspalliance.com/822
It explains in the tutorial that you must change the connection string to point to your database and add user name and password. (i dont have a user name or password for my local server, or atleast I dont think I do!)
Below is my connection string:DataSet ds = new DataSet();
string connStr = "server=localhost;Trusted_Connection=true;database=Product.mdf";using (SqlConnection conn = new SqlConnection(connStr))
{string sql = "Select MenuID, Text, Description, ParentID from Menu";SqlDataAdapter da = new SqlDataAdapter(sql, conn);
da.Fill(ds);
da.Dispose();
 
Every time I try to run the page I get this error.
Cannot open database requested in login 'Product.mdf'. Login fails.Login failed for user '*****'
Can anyone see where I'm going wrong?  I'm quite new to all this so I apologies if this seems a bit stupid.
Many Thanks

View Replies !
Connection String
Can VWD generate it by itself? I have a MDF file and I need to get the connection string.

View Replies !
Connection String Help Please
I am using Dreamweaver 8 on Windows XP. I am trying to connect to SQL Server 2005. My connection string isn't right. I ran the OBDC test and it works so I know its the connection string. My webpages give me the error that the server does not exist or access denied. When I use anything else like SQLNCLI.1 for the provider it gives me the error that the provider is not found. What should the connection string consist of and what should I use for Provider?
MYCONN_Conn ="Provider= SQLOLEDB;Data Source=sql2005.loc.mss.edu;Integrated Security=SSPI;Initial Catalog=OPENAssessment;"
Thanks in advance.

View Replies !
SQL Dev And IIS Connection String
hi,
ok im not sure if this is in the right forum, so sorry if its not.
 basicly,
before i optained a licence for SQL Server 2005 Dev i was using SQL Server 2005 Express.
now in IIS iv found the following entery in Connect Strings
data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
basicly, what i want to know is do i need this entery, and if so, do i need to edit it?
 thanks

View Replies !
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.

View Replies !
CONNECTION STRING
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
ive got this error and i think its about connection string, help please, can somebody show me how to fix this, obviously im a newbie and this my first time to use .net. thanks!
 

View Replies !
Connection String
my web site is in a host. my mssql db is in other host. how I write the connection string. Please help.

View Replies !
Connection String With Dsn
I want's to use following connection string
"dsn=MyDsn;uid=MyUser;pwd=MyPassword"
Can some how I use it with sqlconnection
I want's to get rid of odbconnection e.t.c
What will be the connection string for sql provider for above dsn information.
If anybody can explain the please help me ?

View Replies !
CONNECTION STRING
any1 know how to find/create a connection string to an SQL database ????

View Replies !
Connection String
I have made an app (the first one) and im trying to find the right connection string to the database. Im using sqlexpress on my local computer, and my host uses MSSQL, can anyone tell me what the connection string could

View Replies !
Connection String In ASP.NEt
Hi
 
I'm using  VB.NET in ASP.NET . 
 
Windows 2000
 
Visual Studio 2005
 
and SQLServer 2005.
 
I'm new to VS 2005
I'm using the following code for connection
<add key="dsnstring" value="persist Security info=False; User ID=; password=;Initial Catalog=TransMate1; Data Source=Localhost trusted_connection=yes" />
it is giving the error as 'Cann't do the connection since user id cann't be null
It is not exact words of the error message.
following code is working fine with the SQL Server 2003 but not with SQL Server 2005.
<add key="dsnstring" value="persist Security info=False; User ID=sa; password=dreams;Initial Catalog=TransMate; Data Source=Localhost" />
 
Kindly help me
 
Thanks in advance
 
Regards.
 

View Replies !
Please Help Me With The Connection String In Asp.net
Hi,
I need your help!!!!!!!!!!
Ii'm running the application using the sql SDK version , i'm having trouble openning the connection. my connection string is:
strConnect="data source=DEFAULT_WINXP\VSDOTNET;initial catalog=try1;integrated security=SSPI;persist security info=True;workstation id=DEFAULT_WINXP;packet size=4096";
and i get an exception: Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'DEFAULT_WINXPASPNET'.
this is my code:
 
string strConnect;
SqlConnection objConnect;
SqlCommand objCommand;
SqlDataAdapter objDatatAdapter;
DataSet objDataSet;
strConnect="data source=DEFAULT_WINXP\VSDOTNET;initial catalog=try1;integrated security=SSPI;persist security info=True;workstation id=DEFAULT_WINXP;packet size=4096";
objConnect = new SqlConnection(strConnect);
objCommand=new SqlCommand();
objDatatAdapter = new SqlDataAdapter();
objDataSet=new DataSet();
objConnect.Open();
objCommand.Connection = objConnect;
objCommand.CommandType = CommandType.Text;
objDatatAdapter.SelectCommand = objCommand;
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'DEFAULT_WINXPASPNET'.Source Error:



Line 166:objDatatAdapter = new SqlDataAdapter();
Line 167:objDataSet=new DataSet();
Line 168:objConnect.Open();
Line 169:objCommand.Connection = objConnect;
Line 170:objCommand

View Replies !
My Connection String
I have a key added in my web.config for my project as the following:
workstation id=DW1DT011;packetsize=4096;user id=performance;data source=DWESR004;persist security info=True;initial catalog=Performance;password=nippert;Max Pool Size= 300;Connection Lifetime = 5"How did I set up the user id and password for the DB? I totally cannot figure it out b/c I thought I drug a connection from server explorere and copied but I guess I didn't.  Below is my string I got now, how can I tell if there is a user id and password for the DB also?The only thing I can find is the users node in the enterprise manager but it has nothing about a password.workstation id=DW1DT011;packet size=4096;integrated security=SSPI;data source=DWESR004;persist security info=False;initial catalog=VacationRequest

View Replies !
Connection String In Vb.net
Hi guys,
I'm a newbie with .net and web development. I'm trying to create a web application using vb.net. I have SQL Server 2000 on my machine. And i connect to it without any username and password. When i tried to insert data into the database using the web application i had to first create a conenction string. So, my connection string is.......
Dim strConnection As String = _
"Data Source=localhost;Initial Catalog=Northwind;" _
& "Integrated Security=true;"
And i get the error.......
Login falied for the user.
Could someone tell me what i did wrong?? I need to get this done by tomorrow and any help would be greatly appreciated.
Thanks,Vasantha.

View Replies !
Connection String
Hi,

I am trying again and again to creat a connection string and can't access the DB.

I get different errors and this is the last one:

System.ArgumentException: Keyword not supported: 'provider'.

Line 9: Dim connString as string ="Provider=SQLOLEDB; Data Source=localhost; Initial Catalog=AdultBiggest; User ID=Erez; Password=erezlevi;"
Line 10: Dim myConnection As New SqlConnection(connString)


The full test code is very simple and as the following:

<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="system.Data" %>
<%@ import Namespace="system.Data.sqlClient" %>

<Script runat="server">
sub Page_Load(Sender as object, e as eventArgs)


Dim connString as string ="Provider=SQLOLEDB; Data Source=localhost; Initial Catalog=AdultBiggest; User ID=Erez; Password=xxxxxx;"
Dim myConnection As New SqlConnection(connString)
myConnection.Open()
myConnection.close()

end sub
</Script>

<HTML><BODY>

</HTML></BODY>

what do I do wrong???

Thanks for your help!!

View Replies !
Connection String
I am a web database Developer not server Admin
my company use SQL server2000 I use vb.net2003
Last week My web on intranet worked but
Today we have a new server and move the data to another server
my old connection string is "user id=sa;password=;datasource=server1;initail catalog=table1;"
Now I have changed only datasource to "user id=sa;password=;datasource=server2;initail catalog=table1;"
I am not sure about the user id(that the admin told me) because when I test my web it show error message like this
******************
Login failed for user 'sa'.

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.Data.SqlClient.SqlException: Login failed for user 'sa'.
*******************
(and I have tried user ID= blank too)

How can I know the user id of the server (SQL server 2000)?
Thanks for helping me
Have a nice day

View Replies !
Connection String Help
Could someone please tell me where do I find out my "user" and "password" for my Sql Connection String. Also could someone tell me I'm using the right server name. I know the name of my server on my network. But I see different names in the SQL Server Enterprise Manager.

View Replies !
ASP.net Connection String
Hi I am new to asp.net and I am having problems connecting to a SQL Server database. My code is;

Dim myConnection As New SqlConnection("server='localhost'; user id='sa'; password='ExamResults'; Database='ExamResults'")
Dim myCommand As New SqlDataAdapter("select * from tblStudents", myConnection)

Dim rstStudents As New DataSet()
myCommand.Fill(rstStudents, "tblStudents")



I'm not too sure if this should be placed in the <script runat="server"> or just after declaring the namespaces.

Also, how do you reference the select statement in the code, currently I have;

<ASP: response.write rstStudents.fields("Surname") Response.write ("test")/>

Any help would be greatly appreciated

View Replies !
SQL Connection String And Asp.net
hi. im new to this forum and programming.
pardon for my description of the problem, it confused me as well.
i have a question regarding connection string value in asp.net.
i have installed MMSQL 2000 and relevant sp3. a local server, Named "(local)" was created by default under one of the SQL server group, using window Authentication.
under the server i created a database, named as "project".
after a table was created, i tried to establish a connetion between asp.net and sql.
below is what i have in my connection string. it dosent work.

lobjCn.ConnectionString = "Provider=DBNETLIB;Data Source=(local);Initial Catalog=project;user id=sa;password=12345678"

my questions are base on my database settings, what value should i put into?
and if im using Windows Authentication mode, what the user id and password?it it the same as the one i use to log into this comupter? i have tried and it doesnt work.

the user id and password i use in the connection string is what i used to login to query analyzer.

:confused:
im newbie. any answer wld be greatly appriciate

thanx.

View Replies !
Sql Connection String
I want to let C# code to create a database, so

* I set up an asp.net server on local machine.
(plus I create "web" under the "wwwroot", I want all my code & database
there)

* Set up sql connection by string:
"Server=theNameOfMyComputer;
Database=theNameOfDatabase;
Trusted_Connection=True;"

Q:
* sever == name of local computer?
* If I specify the database here, can I
create a new database?

* some c# code & sql statement to create a new database.

figo2476

View Replies !
Connection String
Can someone please tell me why my connection below is not working?

using System.Data.OleDb;


OleDbConnection conn = new OleDbConnection("Provider=SqlOleDb;Data Source=BLOOD;Initial Catalog=Test;");
//Tried Above as ...;Initial Catalog= Test")
conn.Open();

View Replies !
SQL Connection String
Hello,
I am using ASP and JScript to connect to my MS ACCESS database.

Here is the DSNless connection string.

dbConnStr="DBQ=C:Databasesmydatabase.mdb;driver= {Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;";

How do I convert this connection string to use MS SQL server?

Thank's
Edward York

View Replies !
Connection String With/Without DSN
Can anyone help?
I'm using ADO with VB6 to allow a user to connect to an SQL Server 7 database with or without a DSN.
Here's what I'm using but I'm getting DSN Not Found errors:

The connect string using a DSN:
"ODBC;DATABASE=dbname;UID=username;PWD=password;DS N=DSNname"
The connect string by accessing the server directly
"ODBC;DRIVER={SQL SERVER};SERVER=servername;DATABASE=databasename;
UID=username;PWD=password;DSN=;"


Thanks
John

View Replies !
Connection String....
I have been asked the following question from a developer, but i'm not sure what he is on about. Does this make sense to anyone?:

"The <APPNAME> app use a connect string retrieved from the registry. Because <SERVERNAME> uses trusted my connect string only required my user name. Would this be the same from any PC?? Even if some one else was logged inunder their own name but used my connect string would they still be allowed in ??"

Can anyone advise?

Cheers

Derek

View Replies !
Connection String
 

hi. I have trying to load packages from SQL server using "load from SQL comman" and then programmatically changing the connection manager's certain properties(as this property has to be changed in run time.

It works fine when these packages are running from same database but when programmatically I am changing its initial catalogue to some other database, then this is not reflecting even after changing the initial catalogue. Its referring  to database which these are created upon. If anyone has some idea please reply back

 

View Replies !
OLE DB Connection String For FTP?
Does there exist an OLE DB Connection string for FTP? If so what is the format? I'm trying to build a custom connection manager and I'm not sure what the supplied connection string will look like for FTP. Thanks in advance.

View Replies !
Connection String From Outside
Hi there!!

I want to make a package and pass connection string from outside say through .ini file, so that I can put package on any system and use some external source to pass connection string.

How do we do this in SSIS?

Rahul Kumar, Software Engineer, India

 

View Replies !
FTP Connection String
Hi,
 
I'm having issues with an FTP connection in my SSIS package.  If I run the package in BIDS it runs ok.  If I schedule the package as a job in SQL Server it fails with the following error message:
 
Message
Executed as user: . ...ion 9.00.3042.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  08:51:27  Error: 2008-04-01 08:51:27.69     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTSroperty" with error 0x80070002 "The system cannot find the file specified.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2008-04-01 08:51:28.99     Code: 0xC001602A     Source: SSIS_FTP_web@vinci_7 Connection manager "FTP Connection Manager"     Description: An error occurred in the requested FTP operation. Detailed error description: The password was not allowed  .  End Error  Error: 2008-04-01 08:51:29.00     Code: 0xC002918F     Source: FTP Task FTP Task     Description: Unable to connect to FTP server using "FTP Connection Manager".  End Error  DTExec: The pack...  The package execution fa...  The step failed.

 
If I kick off the job manually the job runs fine.  It only seems to fail when the job runs at the normally scheduled time.  It looks like the password is not being picked up by the job.  I'm not sure why the error even happens...
 
I attempted to modify the FTP connection string within the job but that didn't seem to work.  I'm not sure if the connection string I'm using is in the correct format.  The format is below...
 
IP ADDRESSORT.@user.@password
 
Any help would be greatly appreciated!!!
 
Thank you,

Kevin

View Replies !
Connection String
hi friends,

in my ASP application I am using the following connection string to connect to a remotely located sql server database in our web server.

 



Code Snippet
set cnNet = server.createobject("adodb.connection")
cnNet.open "provider=SQLOLEDB.1;user id=xxx;password=yyy;Initial Catalog=dbName;data source=<IPAddress>"
 
 


 

when I am running this from my system using Dial-Up connection it works file. But when I had changed my dial-up to CCProxy I am getting the following Error.

Microsoft OLEDB Provider for SQL Server

[DBNETLIB][Connection Open (connect()).]SQL Server does not exist or Access Denied.

What is wrong with my connection string. When I am conecting using CCProxy what is to be Done ?

Thank u all,

View Replies !
SQL Connection String
I have an asp page that shows only one record from a table. The idea is that if there is more then one record using the same ID number then the page should show all records with that number. So far even when that is the case I can only see one record in my browser. I will provide the entire ASP code below. My question is how can I get the asp page to display all records with (Example: ...asp?ID=9734) in my browser? What changes do I need to make to the code?

[CODE]

<%
 set con = Server.CreateObject("ADODB.Connection")
 con.Open "File Name=E:webserviceCompanyCompany.UDL"
 set recProgram = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT *, T_ProgramGuests.ProgramID AS Expr1 FROM T_ProgramGuests INNER JOIN T_Programs ON T_ProgramGuests.ProgramID = T_Programs.ID WHERE T_ProgramGuests.ProgramID = " & Request("ID")

recProgram.Open strSQL,con
%>


    <body>
    <TABLE BORDER="1" CELLPADDING="2" CELLSPACING="1" WIDTH="100%">

<p><b>Guest Name and Description:</b></p>
  <tr>
    <th width="15%" align="left">Program ID</th>
        <th width="35%" align="left">Guest Name</th>
        <th width="55%" align="left">Guest Description</th>
    <tr>
        <TD headers="t1"><%=recProgram.Fields("ProgramID")%></TD>
        <TD headers="t2"><%=recProgram.Fields("GuestName")%></TD>
      <TD headers="t3"><%=recProgram.Fields("GuestDescription")%></TD>
  </tr>
</table>

<%
recProgram.Close
con.Close
set recProgram = nothing
set con = nothing
%>

  </body>
</html>

[/CODE]

The ASP page when viewed shows a table entitled Guest Name and Description. Just below that is the table with data. Currently only showing one row. Reading from left to right...

First column titled (Program ID)
Second column (Guest Name)
Third column (Guest Description)

Data shown:
9726      Joan Didion      author of five novels and seven previous nonfiction books

If I append to the end of the URL ?ID=9734 it should be showing three entries from the table but it wont. Why?

View Replies !
Sql Connection String
hello,

im trying to prepare vb8 apps but i cant make a connection from different computers on network to database file location.

i am using this connection string, is the ADO connection on dbfile name different from SQL?

Data Source=.SQLEXPRESS;AttachDbFilename=\serverdatabaseinventory.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True


and i got these error message

The file "\serverdatabaseinventory.mdf" is on a network path that is not supported for database files.
An
attempt to attach an auto-named database for file
\serverdatabaseinventory.mdf failed. A database with the same name
exists, or specified file cannot be opened, or it is located on UNC
share.

View Replies !
Connection String
    public class Class1

    {

        public string sConType = System.Configuration.ConfigurationManager.AppSettings["conType"].ToString();

        public string server = System.Configuration.ConfigurationManager.AppSettings["server"].ToString();

        public string UID = System.Configuration.ConfigurationManager.AppSettings["UID"].ToString();

        public string PWD = System.Configuration.ConfigurationManager.AppSettings["PWD"].ToString();

        public string db = System.Configuration.ConfigurationManager.AppSettings["DB"].ToString();



        private string sConStr;

.....





        public Class1()

        {

            try

            {

                this.sConStr = "Server=" + this.server + ";Database=" + this.db + ";UID=" + this.UID + ";PWD=" + this.PWD + ";";

            }

            catch

            { }

        }

.....



public void OpenConnection()

        {

            Class1 gr = new Class1();

            conn = gr.CreateConnection();

            conn.Open(); //ERROR

 

i'm getting the connection string from web.config file.i checked it with breakpoints.but it isnt working.The error message is "The ConnectionString property has not been initialized."

Where's my mistake?

View Replies !
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 FilesDeviceSampleApp. 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 FilesDeviceSampleAppTest123.sdf") and the Test123.sdf correctly gets deployed to this folder Program FilesDeviceSampleApp which also has the EXE. Still it gives error that it cannot find the database Test123.sdf in the path Program FilesDeviceSampleApp but I checked and it is there. What could be the issue?

Regards,
MI

 

View Replies !
Connection String
 

Hello all,

Please help me as i am not able to connect to my database

i have my databse in datab directory

and this is my connection string

<add name="Connstrmy" connectionString="my server ; AttachDbFilename=&quot;datadirectory est.mdf&quot;;uid=username; pwd=passowrd;"

providerName="System.Data.SqlClient" />

 

hosting people have said that you are using uid and password for databse and not of server

i have to add user id and password for server also

how do i do that?

View Replies !
Connection String
I have a sql 2005 database on a server and all the settings for users and tcp/ip protocol are configured.
I tried to connect to my database with Sql Manager Studio and it is working on all the computers connected to my server.
I am working in C# and I am trying to connect to my server using a connection string:
connectionString=@"Server=192.168.0.1SQLEXPRESS; Initial Catalog=C:database.mdf; User ID=user; Password=pass;"
but isn€™t working, I have tried  to connect with other connection strings but is not working.
http://articles.techrepublic.com.com/5100-3513-6084879.html
Can someone help me with a valid connection string?

View Replies !
I Need Help With The Connection String
I Need Help With The Connection String   cuz that i need to connect with the database for Mobile Application and i have sqlexpress

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved