Delay Between CREATE DATABASE And Ability To Connect To That Database

Oct 9, 2006

I have an application that creates a new database during installation,
and I've noticed some strange behavior. Once I've created the
database, I am able to immediately create tables and populate lookup
data, provided I remain connected to the server. If, however, I
disconnect and attempt to reconnect immediately, I'll get an error
saying that my login is invalid for the new database.

I can get around this by having my code simply wait 5 seconds before
attempting to reconnect, but I'm curious to see if anybody here can
give an explaination for why this is happening. Here is a bit of
pseudo code to explain what I'm seeing:

open new connection
create database
create tables
populate tables
close connection

// open new connection /* can't do this yet, as it would break */

for (int a=0; a<5; a++)
{
Thread.Sleep(2000)
try
{
open new connection
break;
}
catch
{
Debug("still waiting...");
}
}


Running my version of this code, I'll see that "still waiting..."
message go past 2-3 times before SQL Server wakes up and realizes that
I'm allowed to connect to it. Anybody know why?

Thanks,


Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

---
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/

View 1 Replies


ADVERTISEMENT

How To Connect To SQL Database, Create Tables

Jan 2, 2006

Hi All, 1st of all happy New Year to all asp.net forum members
    I am new at asp.net. I want to design a website
using asp.net as frontend and sql database as backend. I am able to
connect and add,update as well delete records when I use MsAcess and
Asp.net using the following connection strings...
**********
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("/database/northwind.mdb"))
dbconn.Open()
sql="SELECT * FROM customers where city LIKE 'Berlin' order by city ASC"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
customers.DataSource=dbread
customers.DataBind()
dbread.Close()
dbconn.Close()
end sub
**********

But when I try to connect to sql database using the following connection strings I am unable to do so...

**************
SqlConnection myConnection = new SqlConnection("server=PLATINUMVSdotNET;database=pubs;Trusted_Connection=yes");
        SqlDataAdapter myCommand = new SqlDataAdapter(" * from Authors", myConnection);

        DataSet ds = new DataSet();
        myCommand.Fill(ds, "Authors");

        MyDataGrid.DataSource=ds.Tables["Authors"].DefaultView;
        MyDataGrid.DataBind();

**************
I have written the servername as "PLATINUMVSdotNET" because when I
installed SQL SERVER 2000 I found a tray icon where the server name was
displaying the same (my computer name is PLATINUM).
When I used webmatrix I enterd the same server name and  windows
authentication I was able to create a database but How to create
table...

Please help me out
Thanks in advance...

View 4 Replies View Related

Can't Create And Connect To A New Database (.mdf File)

Jun 28, 2006

Unfortunately I was sent to this product by my Hosting Site since all I was trying to do was Create and Manage a User Login with authentication to my subsites in MS Frontpage. (rant: Why doesn't Frontpage support this technology???)

Anyway, I have now spent (wasted?) 8 hours downloading, installing, and tyring to configure SQL Express along with MS Visual Web Developer Express for ASP.NET 2.0 ... For the life of me I can't find detailed configuration informatin and setup information to build a SIMPLE database to connect to the VW product. Folk: this HAS to be simpler to do than what you present in the product! This is way too difficult to deal with compare with frontpage.

Is there a simple "how to" link someplace that is specific enough to preclude me from uninstalling this entire suite ????

View 1 Replies View Related

Sql Server Express Loses Ability To Write To Database

Jun 17, 2006

After a period of use (typically 1-2 hours), an application using SQL Server Express stops writing to the database, whilst still continuing to read from it. As far as I can tell, no error message is generated by any operation. The application is written in VB Express and is executed on several machines, with SQL Server Express on a central machine. Re-starting the application on the affected machine restores normal operation.

The problem on one machine does not cause a similar problem elsewhere at the same time (hence it appears to be an issue with the relationship between the application and SQL Server)

This does not appear to relate to the response to Q asked by sgcook on 9 may as we are not using user instances, but only a bare minimum connection string.

View 15 Replies View Related

Cant Create New Database / CREATE DATABASE Permission Denied In Database Master (error 262)

Oct 2, 2007

 
 I am using SQL express and Visual web developer on windows Vista.
When I try to create a new database the following message appears.
 
CREATE DATABASE permission denied in database master (error 262)
I log on to my computer as an administrator.
Help appreciated
 Prontonet
 
 
 

View 4 Replies View Related

Setup And Upgrade :: LocalDB - Create And Connect To Database Programmatically

Jul 10, 2012

I need to be able to create & connect to temporary databases programmatically, and NOT using the command-line, within a C# program. How would one go about doing this?

View 7 Replies View Related

Is There A Delay Writing To An SQL Database

Apr 16, 2007

Can someone advise if there is a delay in data being written to the database following a tableadapter.update(datatable) command?

I save transactions which are subjected to the above and then a listview is updated to reflect them.

As I work through all is OK and the transactions appear in view.

I then run a backup through my app using a backup object to do this and this reports all OK

I then close the app and re-open and as as I am in debug the database is empty.

I perform a restore through my app using a restore object and selecting the backup file I created previoulsy which reports all OK

The retore procedure calls application.restart to allow the app to initialise to the restored data.

The problem is quite a bit of my data in missing from the restore as if the last block I did prior to backup never actaully made it to the database?

I also rememeber noting that at times when the update method is performed the actual timestamp on the physical databse is not updated....until I close the app and return to the designer?

So does this mean then prior to performing a backup I have to somehow force the app to ensure it has written all changes to the databse?

Thanks

View 3 Replies View Related

Reporting Services :: SSRS Loses Ability To Delegate User Credentials To Database Time To Time?

Apr 30, 2015

we have problems with our SQL Reporting Service 2012 (SSRS) server . We have setup Kerberos delegation between SSRS and the database server (SQL Server Always-on cluster) so users are authenticated down to the database. The issue occurs from time to time that SSRS loses the ability to delegate the user credentials to the database. At this point in time the Report Server logs contain rejected database connections because of ANONYMOUS logon. After restarting SSRS the problem is gone.

View 2 Replies View Related

Create A Delay Between FTP Tasks, Or?

Mar 30, 2007

Hi,



I have a package that will be using an FTP task to send a file (file1) to an ftp site.



Once the file (file1) is received at the ftp site, a corresponding file (file2) will be placed in the ftp directory, and then I will need to ftp the corresponding file (file2) back.



However, there will be a time delay between the time that file1 is received and file2 is put in the ftp directory. Maybe 5 to 30 minutes.



What is the best way to handle this scenario? I want to ftp file2 back as soon as it's available. However, I don't know when that is, and so I was wondering if there is a way to dynamically check for the availability of the file, so that I don't have to "hard code" a wait time into my process.



Thanks!



View 5 Replies View Related

Can Connect To Database, But How Do I Insert Values Into SQL Database?

Jun 14, 2006

I was able to connect to the SQL Database Pension with table clients with table values: ID, State, Name.'Create(connection)Dim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)'open connectionconn.Open()However, I'm not sure how to insert a new row with an incremental ID number and a new State and Name.Sorry, I'm really new with VWD.

View 1 Replies View Related

Adventure Works Database, I Can't Connect To The Database

Jul 16, 2006

Database not found !

My web.config file has this bit of code:

<connectionStrings>

<add name="AppConnectionString1" connectionString="Data Source=&quot;.SQLEXPRESS&quot;;AttachDbFilename=&quot;C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAdventureWorks_Data.mdf&quot;;Integrated Security=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

But........................... the is no "AdventureWorks_Data.mdf" in that folder ?

And the database is installed in the right place !

help !

View 6 Replies View Related

Database Create ODBC Connections To Access Database Directly And Update Data?

Sep 10, 2012

We have a SQL database that uses Active Directory with Windows Authentication. Can users that are members of the Active Directory group that has read/write access to the SQL database create ODBC connections to access the database directly and update the data? They dont have individual logins on the server. They are only members of the Active Directory group that has a login?

View 1 Replies View Related

SQL Security :: How To Create Database Specifications On Newly Created Database Automatically For Audit

Jul 15, 2015

I am setting up SQL audit on sql servers in my environment based on requirement. I want to create database specifications ASAP database created. I tried DDL trigger but Audit doesn't support triggers. So I created audit specifications on model database. the only problem with this is every specification created on new database with same name.database specification name includes newly created database name or other methods to create database specifications on newly created databases.

View 6 Replies View Related

How To Create A New Database From An Existing Database Saved To An External Hard Disk?

Feb 20, 2007

Hi, My server went dead(problems with the hard disk), but I have a copy of the whole sql server directory including the database in a external hard disk. I have a new server now and I would like to copy this database (with the reports from reporting services too) from the external hard disk to my new server. can anybody help me please? Thanks.

Note : I have a plain copy of all the sql server directory with all the files including the database not a SQLServer backup done with the wizards.

View 1 Replies View Related

Create Database Permision Denied In Database ' Master' (MS SQL SERVER, ERROR 262

Feb 17, 2007

Cn not do anything with my sql server, everything i trt to do i get this message, user does not have permision, etc, ,

I am running windows Vista Business, SQL SERVER 2005

so what going on here

View 23 Replies View Related

CREATE DATABASE Permission Denied In Database 'master'. Error

Feb 1, 2007

got rid of my error about user login rights, it was all working yesterday. but for some reason i now get this error  CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
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: CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
  i have this in my web.config file     <connectionStrings>        <add name="ConnectionStringTest" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=C:InetpubwwwrootsqlSiteApp_DatasiteDB.mdf;Integrated Security=SSPI;Connect Timeout=30;User Instance=False"            providerName="System.Data.SqlClient" />    </connectionStrings>    <appSettings />         <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.        -->      <compilation debug="true" />      <identity impersonate="true"/>  and my asp connection string is         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringTest %>"            SelectCommand="SELECT [entryID], [compID], [emailAddy], [answer] FROM [entry]"></asp:SqlDataSource>  if i set user instance to true i get a user permission error.  it says on sql server management that i have dbo rights on my database, but it wont let me put datareader or write on this login. any ideas? its driving me insane 

View 4 Replies View Related

SQL Security :: CREATE DATABASE Permission Denied In Database (Master)

Oct 26, 2015

I have installed new SQLServer2012 instance and my domain user have sysadmin privileges on this instance. I have a restore procedure and it will execute WITH EXECUTE AS 'domainmy username', for all the developers have exec permissions to this procedure. But newly installed server this procedure was failing with the following message. But the same procedure executing fine on other servers.

Msg 262, Level 14, State 1, Line 1
CREATE DATABASE permission denied in database 'master'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

View 7 Replies View Related

How To Enable The Option Of Create New SQL Server Database From Database Explorer

Nov 10, 2006

Hi there

I am working on Visual Web Developer Express Edition 2005. When I right click on database explorer to create an SQL server database then I always find the option " Create New SQL Server database " Disabled.

Can any one tell me how to enable that option please ?

View 4 Replies View Related

Create A Database In Visual Studio 2005 (was Database)

Oct 11, 2006

Cann someone pls tell me how to create a database in visual studio 2005. :o

View 6 Replies View Related

CREATE DATABASE Permission Denied In Database 'master'

Dec 20, 2006

Hi,

I'm using Visual Studio 2005 Pro and SQLExpress that comes with it.

I have my program running fine in XP Pro OS using a window user "Glen" (Computer administrator) with Administrator rights. This means that I installed VS 2005 using this window user "Glen"

I created another windows user "TestUser" (Limited account) in the same physical PC.

I tried to run the program and on the part that I need to access SQL table, I got the error [CREATE DATABASE permission denied in database 'master']

At the same time while using "TestUser" and running sqlcmd (to check if I can connect to SQL), I also got error HResult 0x2, Level 16, State 1.

I read alot on MSDN discussions and related links but it seems that I can't get the solution that I need.

SO HERE ARE MY QUESTIONS :

1. Am I allowed to run my program using user "TestUser" since SQL is installed using "Glen" windows user?

2. Do I need to add access rights to "TestUser" to allow the user to have CREATE rights? (Note : for security reason, I can add other access rights except Administrator)

Thanks in advance for all you help.







View 19 Replies View Related

After I Create A Database Using Database Diagram In SQL Server7,there&#39;s Nothing To See In &#39;d

Jun 10, 2001

I am a beginner in learning SQLServer 7.And I learn it by using its own help file.
The only problem troubles me is that after I do some options in database diagram,there's nothing happen.And then no matter what I do,database diagram panel is always blank.

View 2 Replies View Related

How Do I Create A Database Wizard To Install My Database Anywhere

Nov 9, 1999

Hi.. i have created a project which uses SQL 7 as a database and have finished it. MY supervisor wants me
to create a wizard that will be able to install the database on any NT 4.0 machine. How do i start and go about doing
it

Please help
thanks

View 1 Replies View Related

Create Database And Alter Database In One SQL Script

Aug 25, 2000

I am using SQL 6.5. Can I create a database and Alter the same
database in one SQL Script?
Thanks in advance.

View 1 Replies View Related

CREATE DATABASE Permission Denied In Database ‘mas

Jul 2, 2007

I installed IIS Manager to my Vista PC and then SQL Server 2005 Express and SQL Server Management Studio Express using Windows Authentication. I could successfully connect to SQL Server. However, when I tried to create a new database, I got the error:

CREATE DATABASE permission denied in database ‘master’

I searched mant forums thru web about this error but could not find a resolution. I have BUILTINUsers and sa in the Logins under Security. But BUILTINUsers is not in any Server Roles. I tried to add it to public or dbcreator but was not allowed to do so, while sa is only in sysadmin.

Anybody could help me solve this program? Thanks.

View 1 Replies View Related

CREATE DATABASE Permission Denied In Database ‘mas

Jul 2, 2007

I installed IIS Manager to my Vista PC and then SQL Server 2005 Express and SQL Server Management Studio Express using Windows Authentication. I could successfully connect to SQL Server. However, when I tried to create a new database, I got the error:

CREATE DATABASE permission denied in database ‘master’

I searched mant forums thru web about this error but could not find a resolution. I have BUILTINUsers and sa in the Logins under Security. But BUILTINUsers is not in any Server Roles. I tried to add it to public or dbcreator but was not allowed to do so, while sa is only in sysadmin.

Anybody could help me solve this program? Thanks.

View 1 Replies View Related

How Can I Create A Database Synonym For The Actual Database Name

Jul 10, 2007

how can I create a database synonym for the actual database name?

View 3 Replies View Related

Boolean: {[If [table With This Name] Already Exists In [this Sql Database] Then [ Don't Create Another One] Else [create It And Populate It With These Values]}

May 20, 2008

the subject pretty much says it all, I want to be able to do the following in in VB.net code):
 
{[If [table with this name] already exists [in this sql database] then [ don't create another one] else [create it and populate it with these values]}
 
How would I do this?

View 3 Replies View Related

Dynamic Create Table, Create Index Based Upon A Given Database

Jul 20, 2005

Can I dynamically (from a stored procedure) generatea create table script of all tables in a given database (with defaults etc)a create view script of all viewsa create function script of all functionsa create index script of all indexes.(The result will be 4 scripts)Arno de Jong,The Netherlands.

View 1 Replies View Related

Can CREATE DATABASE Or CREATE TABLE Be Wrapped In Transactions?

Jul 20, 2005

I have some code that dynamically creates a database (name is @FullName) andthen creates a table within that database. Is it possible to wrap thesethings into a transaction such that if any one of the following fails, thedatabase "creation" is rolledback. Otherwise, I would try deleting on errordetection, but it could get messy.IF @Error = 0BEGINSET @ExecString = 'CREATE DATABASE ' + @FullNameEXEC sp_executesql @ExecStringSET @Error = @@ErrorENDIF @Error = 0BEGINSET @ExecString = 'CREATE TABLE ' + @FullName + '.[dbo].[Image] ( [ID][int] IDENTITY (1, 1) NOT NULL, [Blob] [image] NULL , [DateAdded] [datetime]NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]'EXEC sp_executesql @ExecStringSET @Error = @@ErrorENDIF @Error = 0BEGINSET @ExecString = 'ALTER TABLE ' + @FullName + '.[dbo].[Image] WITHNOCHECK ADD CONSTRAINT [PK_Image] PRIMARY KEY CLUSTERED ( [ID] ) ON[PRIMARY]'EXEC sp_executesql @ExecStringSET @Error = @@ErrorEND

View 2 Replies View Related

Create Script To Create/Refresh Identical Database

Mar 26, 2008



I'm new to using SSIS and have been reading and learning slowly how to use it. I'm trying to create an identical copy of our database for reporting. I've used the Import/Export wizard, but have had some issues with foreign keys and with sql_variant columns.

I've tried searching for anything but haven't had any luck as of yet. I guess I don't even know where to start or what to look for.

Any help would be appreciated. Thanks!

View 9 Replies View Related

Can Not Connect To Database

Aug 10, 2006

I am new to windows apps in .net 2.0. I am trying to create a windows service that will connect to a database and email info out to people that have had status changes.
Right now, I can not connect to the database. Here is the connection string:
Private cnn As New SqlClient.SqlConnection("Data Source=IPAddress;Initial Catalog=TheServer;Persist Security Info=True;User ID=userid;Password=password provider=SQLOLEDB.1;connect timeout=3600")
This is how I am trying to connect:
cnn.Open()
myCMD.CommandTimeout = 0
dr = myCMD.ExecuteReader
 
I keep getting an error message that I can not be logged on. I know that the credentials are correct because I use them for the web app. Something has to be wrong with my connection string, but what?
Thanks,
enak

View 2 Replies View Related

Cannot Connect To Sql Database

Sep 1, 2006

 I'm using Visual Web Developer and SQL 2005...It Guives me this 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I'm tired of guetin and search solution for this errorI've tried everything that i searched over the "net"...made all the configurations possible in sql server 2005 and nothing...Is this right? Or do i need to put some more code in this line or in server is it "localhost:****...: ...connection = New SqlConnection("Server=servernameWebSite1uid=sa;pwd=1234;database=cdcollection")connection.Open()...... Don't know why in sql server i have two object explorer connections when i start the sql server...one is  "servername"...two is "servernamesqlexpress" (but when trying to connect with "servernamesqlexpress" it won't let me, only with "servername")...i use the windows authentication......when i had the VB.NET 2003 and SQL Server 2000, it was much easy to do this... In ASP.NET config i still have the C:inetpubwwwroot path but the files don't go there...now they go to my documentsVisual studio 2005 by default of Visual Web Developer prog. Do i need to change the location? Please help...i'm really desperate...with this... 

View 2 Replies View Related

Can't Connect To Database

Nov 1, 2006

I am developing my first website for my boss.  I am trying to connect to an access database which I have created a DSN for on the server.  I am using the following code sample.... //Connection String 1string dsn_name = "access_WALLINVEN.dsn";string sDSNDir = Server.MapPath("_dsn");string connectstr = ("Data Source="+ (sDSNDir + ("\" + dsn_name)));//Connection String 2string connectstr = "Data Source=/jwallpaint/_dsn/access_WALLINVEN.dsn;Uid=jwallpaint;Pwd=J2512wall;";string commandString = "Select * from Inventory";//Pass strings to sqlDataAdapter constructorSqlDataAdapter dataAdapter = new SqlDataAdapter(commandString, connectstr);//Create a datasetDataSet dataSet = new DataSet();//fill the dataset objectdataAdapter.Fill(dataSet, "Inventory");//Get the table from the datasetDataTable dataTable = dataSet.Tables["Inventory"];//Bind to the gridviewGridView1.DataSource = dataTable;GridView1.DataBind();For Connection String 1 I get the error of...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) For Connection String 2 I get the error of...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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) I am not sure which connection string to use either....It is strange to me that I get this error talking about SQL Server when I am trying to reach my Access database......Any Help??  Thanks....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved