How To Stop Excel From Connecting To My SQL Database

May 8, 2008



We used windows authentication and we have our domain users set up to perform certian tasks like input time on their time sheet. Then I found out thru excel you can connect to the database and select any table that you have read access on. Then you can download all of the data to an excel workbook.

What is the best way to stop this?

View 3 Replies


ADVERTISEMENT

Reporting Services :: Connecting To Two Different Data-sources (Excel And Database) In SSRS?

Sep 22, 2015

I have a requirement where we have to connect to two different data-sources one is Database Table and another one is Excel Source. I know we can do this by creating a SSIS package and loading the excel data into database table and then based on some relationship between the tables we can create the data-set in SSRS. But I am looking for some other approach where I can do this without creating the SSIS package.

View 4 Replies View Related

Integration Services :: How To Stop At A Blank Row In Excel

Oct 9, 2015

I am importing a .xlsx into at SQL Server 2014 table.  I would like to import each row with an ID and stop at the notes that are listed at the bottom.  Please see attached image. How do I tell my SSIS Data Task to stop importing at the first blank row?I never know how many rows of data I may have so I can not use a fixed row number to stop at.

View 4 Replies View Related

Master Data Services :: How To Stop Excel Addin From Being Disabled

Apr 3, 2012

We are using Office 2010 on Citrix with the RCO Master Data Excel addin. I am getting many calls from users that the Addin has disappeared from the Excel menu. Can re-enable it by going to files->Options->Addins and manage COM addins. Have not been able to work out why it becomes disabled. Any registry setting that I can use to stop it from being disabled?

View 4 Replies View Related

Connecting To A Cube Using Excel?

Dec 18, 2004

Hi

I have Excel 2003 and need a little guidance regarding how to make a connection to my cube.

I tried the Pivot Wizard but do not see any option which allows me to connect to my cube.

Kindly assist. Many TIA.

View 9 Replies View Related

My Database Will Be Stop ????

Oct 31, 2007



Hello,

i'm desperate! I have a application in my SQL Express and only one database for it. But right now it have 3,97gb, without log file.
i'm already buying a SQL Enterprise to upgrade this, take some days, but my question is: when this size came to 4,00gb my application will be stop working ? my business stop ???

Thanks

View 1 Replies View Related

Newbie - Connecting Excel To MS SQL Server 7

Apr 9, 2001

Hi!

Does anybody could show me how to connect my Excel 97 to MS SQL Server 7 using ODBC? What are the MS Office Components needed for the connection and the necesary MS SQL server component, server and client, needed?

Thanks a lot.

View 1 Replies View Related

Excel : Connecting To SQL Server 2005

May 19, 2008

I had been using Excel to connect to SQL server. This worked merrily for about 6 months then I had reason to reinstall Visual Studio.

Now I've reinstalled that, my connection between Excel ans SQL Server won't work. I thought the ADO code I had put in my VBA macro would be sufficient to connect, but obviously I need to do something else, but what? Please help!

Do I need to create an ODBC connection in Control Panel? Or something else?

The code is unchanged from before and the VBA project does reference the ADO object Library.

(OS : Windows Vista Ultimate)

View 4 Replies View Related

Analysis :: Excel Not Connecting To SSAS

Sep 21, 2015

I have created SSAS package successfully.

When I try to connect from excel , to SSAS Getting error message like

A Connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond.

If I connect to SSIS , I'm able to connect correctly.

Why I'm getting this error and how to overcome this?

View 4 Replies View Related

Stop One Sql Server Database

Jan 16, 2007

We have a web applicaiton backend database uses sql server. Now we stop using this web application. I would like to stop this sql server database. What do you usually do? I can backup this database and delete this database. Or if i want to keep this database. What should i do?
Thanks for you help.

View 7 Replies View Related

Stop Execution Of Shrink Database

Mar 22, 2006

Hello guys,

I need help, because i'm executing a shrink database file (file with 189 GBytes of size), and i need to stop before it finish. If I stop the shrink process exist any possible that data corruption occurred.

Thanks.

Best regards,
Fernando Costa

View 4 Replies View Related

Stop Inserting 2 Same Words In One Database Field

Jun 30, 2007

See my code below... it nicely insert in database data...

but I wish: if user of program in field "txtPozicija" try insert in
database same data detail like is in "Pozicija" field in database that
he be stopped and informed by message: you can not insert TWO SAME data
in the "Pozicija" table.

any advice here?


I AM TRY SOLVE THIS LIKE BELOW, NO ERROR BUT NOT WORK
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class adminpanel_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblHR.Text = txtPozicija.Text;
        lblEN.Text = txtLinkZaViseoMjestu.Text;
        lblIT.Text = ddRegija.Text;

    }

    // On dropbox in the html added OnDataBound="MyDataBound" Occurs after the server control binds to a data source.

    protected void myDataBound(Object sender, EventArgs e)
    {
        ddRegija.Items.Insert(0, "--- Selektiraj ---");
    }


    void SaveDataDB()
    {
        string ConnStr = ConfigurationManager.ConnectionStrings["croestate_dbConnectionString"].ConnectionString;
        SqlConnection Conn = new SqlConnection(ConnStr);

        try
        {
            Conn.Open();


            String sqlQuery = "INSERT INTO PozicijaObjekta VALUES(@Pozicija, @LinkzaViseoMjestu, @Regija)";
            SqlCommand cmd = new SqlCommand(sqlQuery, Conn);
            cmd.Parameters.AddWithValue("@Pozicija", txtPozicija.Text);
            cmd.Parameters.AddWithValue("@LinkzaViseoMjestu", txtLinkZaViseoMjestu.Text);
            cmd.Parameters.AddWithValue("@Regija", ddRegija.SelectedValue);

            cmd.ExecuteNonQuery();
        }
        catch (Exception ex)
        {
            Conn.Close();
            Response.Write(ex.Message);
            Wizard1.ActiveStepIndex = 0;
        }

    }
   
   
   

    protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
    {
        if (e.CurrentStepIndex == 0)
        {
            SaveDataDB();
        }

        if (e.CurrentStepIndex == 1)
        {
            //Register user into the database not hear because wizard have one step only
            // SaveDataDB();
        }
    }
    protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
    {
        if (ddRegija.SelectedIndex == 0)
            args.IsValid = false;
    }
    protected void CustomValidatorPozicija_ServerValidate(object source, ServerValidateEventArgs args)
    {
        string ConnStr = ConfigurationManager.ConnectionStrings["croestate_dbConnectionString"].ConnectionString;
        SqlConnection Conn = new SqlConnection(ConnStr);

        try
        {
            Conn.Open();


            String sqlQuery = "SELECT Pozicija FROM PozicijaObjekta WHERE Pozicija='" + txtPozicija.TemplateControl + "'";
            SqlCommand cmd = new SqlCommand(sqlQuery, Conn);
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.Read() == true)
                args.IsValid = false;

        }
        catch (Exception ex)
        {
            Conn.Close();
            Response.Write(ex.Message);
            Wizard1.ActiveStepIndex = 0;
        }
    }
}
 

View 10 Replies View Related

How To Stop The Connect To Database Engine Dialog

Feb 16, 2008



I am working (or trying to work) in Management Studio. I have one database that I use on my one and only machine. ( I am not using any of the default databases.) I have several queries saved as files, which I open as needed. Every time I open a file I get that VERY ANOYING Connect to Database Engine dialog box. OK, it's no big thing. I don't use Server Authentication so all I have to do is hit enter and I get connected. But why should I even have to hit enter once after I'm already connected?

How can I MAKE IT STOP?

Thanks,

Gregory

View 3 Replies View Related

When I Try To Restore A Database A Message Comes Up Saying That It Is Being Used By Another Program, How Do I Stop This?

Mar 17, 2008

I am reading a guide telling how to create a private server and it says I need to restore the database. So I go to File->Open->File->My Computer->Local Disk->Program Files->Microsoft SQL Server->MSSQL.1->MSSQL->Data->GunzDB. Then the following message comes up: "The file cannot be opened because it is being used by another process. Please close all applications that might access this file and try again."

The question is, how do I get past this? I need the answer as soon as possible, I am a newb with this program so I don't entirely know what I am doing. I have tried searching for the answer, but I cannot find anything.

Thank you.

View 3 Replies View Related

SQL Security :: How To Stop System Database Access

Jun 2, 2015

We created one SA login [login name: test_db] and give the Db_owner permission for particular user db, but this test_db login able to access the all system database except model database.Here problem is I am giving the only one particular user database but that login why able to access the system database.Here how to stop the system database access…

View 8 Replies View Related

Power Pivot :: Connecting To A Tabular Model - Combining With Excel Calculations

Jun 16, 2015

how to combine measures and fields coming from an analytical model (tabular) along with some Excel calculations. Basically I want to provide users with a simple report (to be displayed in SharePoint Excel services) containing charts and slicers. The data comes from a tabular model, and most of the calculations are in the model as well.However there is some little tweaking that must be done. For example I might need additional calculated columns, but I don't feel the need to modify the tabular model for that. I was wondering if I could do this within Excel as well -- but without having to bring all the data through a pivot table, then manipulate it and then show it on the report. So to be clear I do not want any pivot tables lying around, even if on a hidden sheet.

I noticed that when selecting a pivot chart in Excel, at the ribbon menu under "PIVOTCHART TOOLS"/"ANALYSE" there is a group of buttons named "Calculations". One of them is named OLAP Tools.Is it fair to assume that these options will allow me to create new measures at the Excel side, without affecting my tabular model?

View 2 Replies View Related

HELP: How To Avoid Ridiculous System Resource Issues When Connecting To A Huge Excel File

Sep 20, 2007

Hi all,

I have a 400MB Excel file that I consume from another automated process (don't ask). I copy this file down locally to my server, and I am attempting to create an SSIS package that points to this file via a connection manager. My computer starts gobbling up massive amounts of memory (devenv.exe gets up to about 800MB or so, then drops back down to 100MB) even when I attempt to rename the connection in the connection managers tab.

I have set all BypassPrepare to TRUE and ValidateExternalMetadata properties to FALSE, and still it can take up to 3 to 6 minutes for BI Dev Studio to respond. My specs:

Intel Centrino Duo 2.00 GHz
2GB RAM
XP Pro SP2

There MUST be a way for me to work effectively on a file of this size. Please help! Thanks much for any assistance.

Sincerely,

Brian Pulliam

View 4 Replies View Related

DB Engine :: Impact On Database If Stop A Long Running Rebuild Index Job?

Apr 26, 2015

We have 3 maintenance jobs configured in this particular DB instance:

Daily backup of system database - SubPlan1 (Check Database Integrity Task --> Rebuild Index Task-->Backup Database Task)Daily backup of user databases - Five subplans for each task : (Check DB integrity --> Rebuild Index -->Backup User Database, Backup Log -->Cleanup History)Weekly maintenance - SubPlan1 (Check Database integrity job (system+user DB) + rebuild index job (system+user DB) )

PROBLEM: I just noticed that the User DB Rebuild Index task has been running since the 03/04 and the Weekly maintenance plan - subplan1 since the 12/04.

Which job is "safe" to stop without impacting the database?

View 14 Replies View Related

SqlDbType.Int, 4 - Does Specifying The Parameter Datatype Size Eventually Stop Auto Increment In The Database

Jun 17, 2008

Hi, I'm specify the size of the interger dataypes in my code behind files; e.g.
commad.Parameters.Add("@SomeID", SqlDbType.Int, 4)
I know it may seem silly, but I have to ask:
Will specifying ths size (i.e. 4) eventually stop the auto-icnrement of the underlying primary key SomeID in the SQL Server 2005 database?
What restriction, if any, does this place if the next SomeID value is 10000, which is 5 digits? or 999999, which is 6 digits?
Thank you
 

View 2 Replies View Related

Right Code Statements Of SqlConnection && ConnectionString For Connecting A Database In Database Explorer Of VB 2005 Express?

Feb 14, 2008

Hi all,

In the VB 2005 Express, I can get the SqlConnection and ConnectionString of a Database "shcDB" in the Object Explorer of SQL Server Management Studio Express (SSMSE) by the following set of code:
///--CallshcSpAdoNetVB2005.vb--////

Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Public Class Form1

Public Sub InsertNewFriend()

Dim connectionString As String = "Data Source=.SQLEXPRESS;Initial Catalog=shcDB;Integrated Security=SSPI;"

Dim connection As SqlConnection = New SqlConnection(connectionString)

Try

connection.Open()

Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)

command.CommandType = CommandType.StoredProcedure
.......................................
etc.
///////////////////////////////////////////////////////
If the Database "shcDB" and the Stored Procedure "sp_inertNewRecord" are in the Database Explorer of VB 2005 Express, I plan to use "Data Source=local" in the following code statements to get the SqlConnection and ConnectionString:
.........................
........................

Dim connectionString As String = "Data Source=local;Initial Catalog=shcDB;Integrated Security=SSPI;"

Dim connection As SqlConnection = New SqlConnection(connectionString)

Try

connection.Open()

Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)

command.CommandType = CommandType.StoredProcedure
........................
etc.

Is the "Data Source=local" statement right for this case? If not, what is the right code statement for my case?

Please help and advise.

Thanks,
Scott Chang

View 6 Replies View Related

Connecting To A Database Twice Fails Because Database Is Uses By An Other Process

Apr 23, 2008

 Hi all,I come up with a problem aleady discussed in some posts especially in the post http://forums.asp.net/t/1235761.aspx. but I got in not finally solved.The main problem is connecting to a database twice which causes errors. So I think this might be the right place to ask my questions.  Here ist the problem in short:I'm using VWD on XP-Professional with SQL-Server Express and Reporting Services Express. All with Windwos Integrated Security and User Instance (SQLExpress). In my web-application I had for all Datasources the connect string:Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|mydatabase.mdf;Integrated Security=True;User Instance=True This works fine so far. I also have Reports designed with the Report designer using the same connection string. I can preview the reports and I deployd thre reports successfully. I want to call these report using a report viewer web control.Now the problem:when I call the remote remote report from my web-application, the database cannot be opened because an other process is using the database (see post mentioned above). It seems that this is a problem with attaching the database twice: from the sql-server and from the report-server.So I used now a new connection string without "attaching" the database (in vwd and in report designer):Data Source=.SQLExpress;Initial Catalog=C:inetpubwwwrootmyappAPP_DATAmydatabase;Integrated Security=True Now everything works...but ... only on my machine. On the production machine this does not work. I wonder anyway, why its working on my machine, because I never "attach" the database (there is no connection string with  AttachDbFilename and I have not opend the developer and have not opened the sql management studio).On the production machine the concurrent (SQL-Server and Report-Server) connection to database does not work with either connection strings, no matter if i attach the database with sql server manager or not).This all drives me crazy for days now. All I want is to use SQL-server and Reporting- Services with its nice features and not repairing my tools. I thought I have a standard Installation, nothing special, but the standard obviously makes problems.Here finally my question:Does this environment ( web-application with remote reports) with Express edition cause normally no problems?Can I "attach" a database only once?  How should I connect with my web application that uses the sql-server connections and also  the report-server-connections (attaching twice does not work).What connection strings to use and when (AttachDbFilename or Initial Catalog).Are these problems specific to the Express Editions? I thank you in advance for any help  Dieter

View 2 Replies View Related

Connecting To SQL Database?

Sep 24, 2007

I am very new to web development using Microsoft Visual Studio.  (my primary expertise is Framemaker 2003).  I am currently going through your ASP.NET 2.0 videos and reproducing the lesson content on my development system.  I have Microsoft Visual Studio 2005 Professional Edition.  I also have Microsoft SQL Server 2005, Microsoft SQL Server 2000, Microsoft .NET Framework SDK v1.1 and Microsoft .NET Framework SDK v2.0.
I seem to be having difficulties with the SQL interface because when I try to use the Property object from Lesson04, I get System.Web.HttpExceptioon {"Unable to connect to SQL Server database."}.  When I subsequently tried to Add New Item - SQL Database from Lesson08, I get a Microsoft Visual Studio error box "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251"
Any ideas?  I know the videos are based on use of the Microsoft Visual Studio Express -- are there significant configuration differences between it and Microsoft Visual Studio Professional that would make these lessons incompatible?

View 10 Replies View Related

Connecting With Database

Sep 26, 2007

Using web dev  and sql 2005 express
I have published web app and database to my server but can,t get connection string to connect with the database.
---------------------------------------------------------------------
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
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 ''. The user is not associated with a trusted SQL Server connection.
---------------------------------------------------------------------
I have created a user in the logins   in the sql server security node and give him every permission
going.
I have also created a login  in the security node for the database..... and given him all permissions
But I still can,t get the connection string from the web app to connect to the database?
Where am I going wrong
 

View 5 Replies View Related

Connecting To The SQL Database

Nov 21, 2007

Hi all,
I am new to this field. I am trying to Connect to the database using the following code. The code does not give an error but gives an empty grid view.
Can somebody figure out the mistake?protected void Page_Load(object sender, EventArgs e)
{if (!IsPostBack)
BindGridView();
}void BindGridView()
{
 System.Data.SqlClient.SqlConnection sqlconnect = new System.Data.SqlClient.SqlConnection("");//added connection string here
String command = "SELECT * from table";System.Data.SqlClient.SqlCommand sqlcommand = new System.Data.SqlClient.SqlCommand();
sqlcommand.CommandText = command;
sqlcommand.Connection = sqlconnect;System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
da.SelectCommand = sqlcommand;DataSet ds = new DataSet();
sqlconnect.Open();
sqlcommand.ExecuteNonQuery();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
sqlconnect.Close();
}

View 8 Replies View Related

Connecting To An SQL Database

Mar 9, 2008

I have a file called upload.vb and I am having a lot of trouble figuring out how to connect to a database that I have created in my App_Data folder called myDatabase.mdf. Here is the code on for upload.vb Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.IO
Imports System.Data.SqlClient

''' <summary>
''' Upload handler for uploading files.
''' </summary>
'''

Public Class Upload
Implements IHttpHandler, IReadOnlySessionState

Public Sub New()
End Sub

#Region "IHttpHandler Members"

Public ReadOnly Property IsReusable() As Boolean Implements System.Web.IHttpHandler.IsReusable
Get
Return True
End Get
End Property

Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

If context.Request.Files.Count > 0 Then
' get the applications path
Dim tempFile As String = context.Request.PhysicalApplicationPath
' loop through all the uploaded files
Dim j As Integer = 0
While j < context.Request.Files.Count
' get the current file
Dim uploadFile As HttpPostedFile = context.Request.Files(j)
' if there was a file uploded
If uploadFile.ContentLength > 0 Then

uploadFile.SaveAs(String.Format("{0}{1}{2}", tempFile, "Uploads", uploadFile.FileName))

End If
System.Math.Max(System.Threading.Interlocked.Increment(j), j - 1)
End While
End If
' Used as a fix for a bug in mac flash player that makes the
' onComplete event not fire
HttpContext.Current.Response.Write(" ")
End Sub

#End Region

End Class Everytime I attempt to create a database connection I get all kinds Compiler errors. If anybody can help me understand how to connect to my database from this page I would greatly appreciate it. Thanks.

View 2 Replies View Related

Connecting To Database Using VB

Jun 19, 2008

I am new to the visual web development program; however, I have created many applications using Visual Studio Express in Visual Basic.  I am trying to figure out how to:1.  Define a connection string in VB2.  Open a current Connection3.  Define a SqlStatement4.  Retrieve the information5.  Display results in textboxI am basically trying to get a login system set up so that a user can type in his name and password and is then directed to a secure page.When I create a new application and want to do this I would use the following code: Dim cnUsers As New SqlClient.SqlconnectionDim cnUsersString As String = "CONNECTION STRING"Dim UserCommand As NEw SqlClient.SqlCommand = "Select chrUsers, chrPassword FROM tblUsers WHERE chrUsers = '" & txtUserName.Text & "' AND chrPassword = '" & txtPassword.Text & "'" cnUsers.ConnectionString = cbUsersStringcnUsers.Open()UserCommand.Connection = cnUserstxtResults.Text = cnUsers.ExecuteNonQuery()cnUsers.Close() That is a very rough draft of what I would code it as.  If you have any suggestions please let me know! - NUStudent- 

View 2 Replies View Related

Connecting To A Database

Nov 19, 2005

I have an SQL database setup but i don't know how to connect to it to set up a table.  I have a vague idea about connectionstrings and such.  I have a server name, a database name, a user id and a password.  I would like to set it up so i can just enter the SQL commands and create a table and enter data.  But first I need to connect to the database.  I

View 1 Replies View Related

Connecting To SQL Database

Nov 29, 2005

I am moving my site from a shared environment to a dedicated server and SQL is on the same box. How do I connect to my database if it's on the same box?

View 4 Replies View Related

Connecting To SQL Database

Apr 25, 2006

Hi all,
 
Please help me with the following problem because I am running around in circles.
 
I have this problem getting a forum online.
Since it is a database related problem which I have been trying to solve at the ClubSite forum I am taking the liberty to come to this forum with this problem.
 
This is the story:
I have this separate SQL database dotForum2004.mdf in App_data.
After trial and error got it working locally.
 
But when I put it online at my webserver (On a Stand-alone PC at my jobsite) I get an application error.(From the Club Site application)
 
This is the connection key which works fine locally. Is there something obvious you can point me at?
 
<add key="forumDSN" value="Provider=SQLOLEDB; Server=.SQLExpress;AttachDbFilename=|DataDirectory|dotForum2004.mdf;Trusted_Connection=Yes;" />
 
Thanks in advance,
Lex

View 5 Replies View Related

I Need Help With Connecting To A SQL Database...

May 2, 2007

For an assignment at school, I need to build an ASPX web page that looks up books in a database. This entails the use of a SQL database, and I am having issues trying to connect to the database.

here is a pic of the error I am getting:



I am using Visual WebDeveloper 2005 Express to do this in, and I can't find any options that pertain to the error above. I looked in the SQL configuration tools that I have installed, and I can't seem to find the correct options that I need.

Does anyone know how to resolve this? If you can provide direction on this, that would be great.

View 3 Replies View Related

Help Connecting To SQL Database

May 2, 2004

Hi. I'm totally new here, and I'm not an expert when it comes to SQL, so bear with me. This is my dilemma:

I use Access 2000 to connect to my Microsoft SQL Server 2000 database. Recently, our provider switched us from a shared server to a dedicated server. The site is up and running perfectly, but I can't connect to my database via Access anymore. Once I received the new location of the database, I ran odbcad32.exe and configured the database's DSN info where appropriate. I run the "Test Data Source..." function and the tests are seemingly successful. When I open my database using Access, I'm able to log in successfully, but when I click on any one of my linked tables, I get the following error:

Could not execute query; could not find linked table.

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'NAMEOFDATABASE.NAMEOFTABLE'. (#208)

The support team at my provider are not exactly geniuses, so who knows if and when they'll be getting back to me. In the meantime, does anyone have a clue what might be causing this? Since the site is working perfectly, I assume the connection strings are okay and the database is perfectly intact (I even checked to see that the most recent entries were live), so what gives? If there's any more info I can provide, let me know. Thanks in advance.

View 6 Replies View Related

Connecting To Database With C#

Jun 2, 2008

Hi, I will post this on a c# forum as well but maybe someone has an answer here.

I want to connect to my database in a program i am coding with C#.
I have 3 databases in my SQL server (DB1, DB2, DB3)(perhaps schemas is the word to use) all under a connection called TEST (as opposed to SQLEXPRESS.

My connection string in my code is as follows:
string ConnectionString = "Data Source=.\TEST;Integrated Security=True;Connect Timeout=30;User Instance=True;";

My app reports a valid connection is made. WooHoo.
But,
When i try to do a select statement eg: Select * from DB1.Customers
I get the following error.
System.Data.SqlClient.SqlException: Invalid object name 'DB1.Customers'

I have tried removing the DB1. part from the select statement and specifying Database = DB1 in my connection string but that doesnt work either.

Any help provided would be greatly appreciated.

Thanks.

View 2 Replies View Related

Connecting To Database

Sep 17, 2007

hi,

i have to give connection string in .cs file
as SQLConnection cn=new SQLConnection("")

i have to connect to local computer..please anyone provide me solution.
datbase is northwind...and i m connected it with windows authentication..
please any one provide me answer....

View 5 Replies View Related







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