It looks like you selected the wrong provider when creating the connection.
Try it using that provider. You should get a correct string if you do.
Juan T. Llibre
Ven, y hablemos de ASP.NET...
"Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
news:esCnY4EeFHA.1404@TK2MSFTNGP09.phx.gbl...
>I have tried that, but the connectionstring that is created has plenty of stuff in it
>that gives me errors. For example:
>
>
>
> Server Error in '/PAPresenters' Application.
> --------------------------------------------------------------------------------
>
> Keyword not supported: 'provider'.
> 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: Keyword not supported: 'provider'.
>
> Source Error:
>
> Line 28:
> Line 29: Private Sub btnExecute_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btnExecute.Click
> Line 30: Dim myconnection As New
> System.Data.SqlClient.SqlConnection("Provider=SQLOLEDB.1;Integrated
> Security=SSPI;Persist Security Info=False;Initial Catalog=papresenters;Data
> Source=NJS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation
> ID=NJS;Use Encryption for Data=False;Tag with column collation when possible=False")
> Line 31: Dim cmdTesting As New System.Data.SqlClient.SqlCommand
> Line 32: Dim dataadapter As New System.Data.SqlClient.SqlDataAdapter
>
> Source File: c:\inetpub\wwwroot\PAPresenters\DBtest.aspx.vb Line: 30
>
> Stack Trace:
>
> [ArgumentException: Keyword not supported: 'provider'.]
> System.Data.Common.DBConnectionString.ParseInternal(Char[] connectionString,
> UdlSupport checkForUdl, NameValuePair& keychain) +1133
> System.Data.Common.DBConnectionString..ctor(String connectionString, UdlSupport
> checkForUdl) +114
> System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +13
> System.Data.SqlClient.SqlConnectionString.ParseString(String connectionString) +96
> System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +11
> System.Data.SqlClient.SqlConnection..ctor(String connectionString) +158
> PAPresenters.DBtest.btnExecute_Click(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\PAPresenters\DBtest.aspx.vb:30
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
>
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +57
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String
> eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
> System.Web.UI.Page.ProcessRequestMain() +1292
>
>
>
> --------------------------------------------------------------------------------
> Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
> Version:1.1.4322.2032
>
>
>
> Although I don't know much about connectionstrings, the little bit of experience I have
> leads me to think that the connectionstring generated by Visual Studio .NET has a lot
> more stuff in it than necessary, but either way it is not working. Why is this, and how
> can I fix it? Thanks.
> --
> Nathan Sokalski
> njsokalski@hotmail.com
>
http://www.nathansokalski.com/ >
> "Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
> news:e8E%23LaEeFHA.1136@TK2MSFTNGP12.phx.gbl...
>>
>> 1. Create at least one empty table in that database,
>> using the Server Explorer.
>>
>> 2. Use the Server Explorer's "Add Connection" wizard
>> ( right-click "Data Connections" ) to create a connection.
>>
>> 3. The connection string will be created for you.
>>
>> 4. Right-click the created connection and select Properties.
>>
>> 5. Copy the connection string from the "Properties" box.
>>
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>>
http://asp.net.do/foros/ >> Foros de ASP.NET en Español
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
>> news:e7ceEVEeFHA.3712@TK2MSFTNGP09.phx.gbl...
>>>I have Visual Studio .NET and SQL Server Desktop Engine on my computer. I
>>> have created an empty database using Visual Studio .NET's Server Explorer.
>>> However, I am having trouble connecting to the database using ASP.NET. I
>>> think the problem is somewhere in my connection string, but because I do not
>>> know much about connection strings, I am not sure what it should look like.
>>> Can someone please help me determine what my connection string should look
>>> like? I am using the version of IIS that comes with XP Pro. Thanks.
>>> --
>>> Nathan Sokalski
>>> njsokalski@hotmail.com
>>>
http://www.nathansokalski.com/ >>>
>>>
>>>
>>
>>
>
>