Newbie Here With A Newbie Error - Getting Database ... Already Exists.

Feb 24, 2007

Hi there

I sorry if I have placed this query in the wrong place.

I'm getting to grips with ASP.net 2, slowly but surely! 

When i try to access my site which uses a Sql Server 2005 express DB i am receiving the following error:



Server Error in '/jarebu/site1' Application.


Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.
Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.

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: Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.
Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.

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): Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.
Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735075
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.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360





Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

 

 This is the connection string that I am using:

 <connectionStrings>

<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;Initial Catalog=ASPNETDB;User Instance=True" providerName="System.Data.SqlClient"/>

</connectionStrings>

 

The database is definitly in the folder that the error message relates to.

What I'm finding confusing is that the connection string seems to be finding "aranga"s database.

Is it something daft?

 

Many thanks.

James 

View 1 Replies


ADVERTISEMENT

Newbie Error

Apr 13, 2004

Hi guys,
Your help please.
First off, I have searched the Forum for answers using the keywords and tried those clues first but with no luck. This one for example: http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254

I had a copy of MSDE installed on my machine about 12 month ago but never used it so I uninstalled it. Then I downloaded and installed SQL Server 120-day Evaluation edition a few days ago. When I tried to run SQL Server I get
An error 1069 – (The service did not start due to logon failure)…

I’m using Windows XP.

How can I find out what the password is or how can I reset it so the SQL Server logon works?

Any ideas?

Thanks Guys


FB

View 3 Replies View Related

Function Error (newbie)

Jun 16, 2007

eh guys ma kind of newbie n tis ... k like wrote a function like

CREATE FUNCTION [dbo].[GetDetailText]
{
@PackingID int,
@PackingType int
}
RETURNS varchar(100)


AS

BEGIN

DECLARE @DetailText varchar(100)

IF (@PackingType = 1)
BEGIN


SET @DetailText = (SELECT
'Tickness' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.thickness) + '' + CONVERT(varchar, KF_Unit_3.Symbol)
+ ',' + 'Width' + ': ' + CONVERT(varchar, dbo.KF_PackMaterial.width) + '' + CONVERT(varchar, KF_Unit_1.Symbol)
+ ',' + 'InnerDia' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.india) + '' + CONVERT(varchar, KF_Unit_5.Symbol)
+ ',' + 'OuterDia' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.outdia) + '' + CONVERT(varchar, KF_Unit_6.Symbol)
+ ',' + 'Recycle' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.recycle) + ', ' + 'Shade' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.shade)
+ ',' + 'Weight' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.weight) + '' + CONVERT(varchar, KF_Unit_4.Symbol)
+ ',' + 'Perforation' + ':' + CONVERT(varchar, dbo.KF_PackMaterial.perforation) + ' (' + CONVERT(varchar, dbo.KF_PackingMaterial.PackingTypeName)
+ ')'
FROM dbo.KF_CartonImageList RIGHT OUTER JOIN
dbo.KF_PackMaterial INNER JOIN
dbo.KF_PackType ON dbo.KF_PackMaterial.type = dbo.KF_PackType.PackID INNER JOIN
dbo.KF_Unit KF_Unit_1 ON dbo.KF_PackMaterial.widthunit = KF_Unit_1.UnitID INNER JOIN
dbo.KF_PackingMaterial ON dbo.KF_PackMaterial.packmaterialid = dbo.KF_PackingMaterial.Packingid LEFT OUTER JOIN
dbo.KF_Color ON dbo.KF_PackMaterial.ColorId = dbo.KF_Color.ColorId LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_6 ON dbo.KF_PackMaterial.outdiaunit = KF_Unit_6.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_5 ON dbo.KF_PackMaterial.indiaunit = KF_Unit_5.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_4 ON dbo.KF_PackMaterial.weightunit = KF_Unit_4.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_3 ON dbo.KF_PackMaterial.thicknessunit = KF_Unit_3.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_2 ON dbo.KF_PackMaterial.lengthunit = KF_Unit_2.UnitID LEFT OUTER JOIN
dbo.KF_Unit KF_Unit_7 ON dbo.KF_PackMaterial.heightunit = KF_Unit_7.UnitID ON
dbo.KF_CartonImageList.CDImageId = dbo.KF_PackMaterial.CDImageId
WHERE (dbo.KF_PackMaterial.id=@PackingID AND dbo.KF_PackMaterial.packmaterialid=@PackingType))
END

return @DetailText
END


buts its throwing syntax error like
"[Microsoft][ODBC SQL Server Driver]Syntax error or access violation
"

... ne idea ????????

View 3 Replies View Related

Newbie Error? Crosstable Query

Mar 30, 2005

I'm struggling with the problem which feels like it shouldn't be taking me this long! Any help would be gratefully received. Simply, there are two tables: Users: userid | username Links: sourceUserId | destUserId sourceUserId and destUserId are both in the users table. I'm trying to write a SP which will output the names of the linked users. eg: Bob | Alice Alice | Geoffrey Peter | Bob Any help gratefully received! Thanks in advance -- Chris

View 2 Replies View Related

Newbie Help: SQL Server Does Not Exist Error

Nov 23, 2004

I've seen this question asked when I searched, but I didn't see an answer that looked like it applied to me, so I'll ask again.....

Making the transition from VB 6 to VB.NET and decided to take a stab at database programming while I'm at it. I bought "Database Programming with Visual Basic.NET and ADO.NET" by Sams Publishing and ran into problems in the first chapter. I've posted some questions on the microsoft.public.vb.database newsgroup and got some help, but it's still not working.

I'll skip some of the boring stuff and dive right in with what I've found out so far:

From MSSQL$VSDOTNETLOGERRORLOG

2004-11-19 02:29:34.71 spid3 SQL global counter collection task is created.
2004-11-19 02:29:34.76 spid3 Warning: override, autoexec procedures skipped.
2004-11-19 02:29:58.87 spid51 Error: 15457, Severity: 0, State: 1
2004-11-19 02:29:58.87 spid51 Configuration option 'allow updates' changed from 0 to 1. Run the RECONFIGURE statement to install..
2004-11-19 02:29:59.01 spid51 Error: 15457, Severity: 0, State: 1
2004-11-19 02:29:59.01 spid51 Configuration option 'allow updates' changed from 1 to 0. Run the RECONFIGURE statement to install..
2004-11-19 02:29:59.46 spid3 SQL Server is terminating due to 'stop' request from Service Control Manager.

The last suggestion was to uninstall and reinstall. I uninstalled VS and SQL and reinstalled getting the same error message in the log, but the message box said that installation was complete.

On the Server Explorer of the IDE, it shows my computers name (programmer) under Servers. When I expand that and expand SQL Servers, I see PROGRAMMERVSDOTNET. When I try to expand that, I get the SQL Server Login window with Server textbox disabled saying PROGRAMMERVSDOTNET and the Database blank. Under the Login it has James (my sign in name) and asks for a password. When I did the MS-DOS CLI installation, I used "password" as the SAPWD. I tried using password, and tried using the password to log on as James, and get the same error message: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Any help would be appreciated, as long as you remember that I am a COMPLETE newbie at this. I'm fairly computer literate, but I don't know the first thing about databases.....

Thanks again,

James

View 3 Replies View Related

Newbie: Error-message Question

May 16, 2006

I got the error message: "The metadata of the following output columns does not match the metadata of the external columns with which the output columns are associated". What does that mean and how am I supposed to fix the problem?



TIA,

Barker

P.S. The SSIS UI seems extremely slow and sluggish (opening, creating connections). Any performance tweaks known? (I have 9GB of RAM on my box and plenty of HD space so I don't think that is it. I also have sql 2005, sp1 installed.)



View 2 Replies View Related

Newbie - Sa Password Error After ACT! Install - Need Pro's Help!!!

Aug 16, 2006

Hello,
I am admittedly new to this, especially sql server and am in need of a pro's assistance.. I installed Microsoft Small Business accounting, which in turn installed and configured a sql server. When I installed ACT! 2005 (v7.0) and tried to create a database, it states that it cannot find the master file.... so I tried to install sql server from Microsofts site - downloaded all the packages, unzipped them and ran them... the error I get is that the sql server needs to have an sa password and to use some switch to change it... for the life of me I am lost here. I can't use ACT! at this point and I have not ideas of how to remove, reinstall or repair the sql server.... Any help you can provide would be greatly appreicated!

View 9 Replies View Related

Newbie Question: Error 9002

May 4, 2007

I'm getting the following msg.



Server: Msg 9002, Level 17, State 2, Procedure spPFW_Get_Financial_Data, Line 145
[Microsoft][ODBC SQL Server Driver][SQL Server]The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space.



When I use the tools/backup database it will not let me select backup transaction log or fails the bacup of the tempdb database with a msg saying : 'Backup and restore operations are not allowed on database tempdb'



What should I do?

View 5 Replies View Related

Newbie To SQL. Error Connecting To Server

Sep 27, 2007

hy.
i am a newbie to SQL

i downloaded and installed SQL SERVER 2005 EXPRESS.
i tried to convert an "ACCESS" database to sql and got the next error:

: "AN ERROR OCCURED
WHILE ESTABLIDHING A CONNECTION TO THE SERVER. WHEN CONNECTING TO SQL 2005,
THIS FALIURE MAY BE COUSED BY THE FACT THAT UNDER THE DEFAULT SETTINGS SQL
SERVER DOES NOT ALLOW REMOTE CONNECTIONS. PROVIDOR NAMED PIPES ERROR 40 -
COULD NOT OPEN A CONNECTION TO SQL SERVER".

any help apreaciated.

View 1 Replies View Related

Newbie : Dump The Log On Distribution Database ?

Apr 12, 2001

Hi there,

I'm a newbie. I've installed a replication between 2 NT4 servers, with SQL 6.5. My logreader tasks has crashed "Can't allocate space for objects 'syslogs' in database 'distribution' etc...". With a DBCC SQLPERF(LOGSPACE) I can see that the log is 100% full, but I can't dump it : when I use DUMP TRAN DISTRIBUTION WITH NO_LOG, my distribution log is still 100% full. So how can I do to dump it and what can I do to prevent it from filling up ? Do I need to dump it like I do for my database but how could it work if a DUMP TRAN doesn't work ?

Thanks in advance.

Sorry for the English, it's not my native language.

View 2 Replies View Related

Newbie Trying To Input Data Into Database

Feb 8, 2007

Hello everyone, I am new to mssql so please excuse all my silly questions.

I can create databases and tables. This is fairly easy, now I am having trouble with inputting data into the database using the data entry browser (or whatever it is called to enter data directly into a table).

I usually get an error when trying to submit the entry, firstly I have a "id" field which I think I have set to auto increase (Identity is ticked, seed and increment is set to 1).

when I go to add data all fields have "Null" in them and from what I understand it allows the fields to be empty, except the primary key which is the id field in this case and I expect that to be filled in automatically like with mysql but isn’t.

Can some kind person instruct or direct me somewhere on how to enter data into a table without it failing.

Thanks in advanced for any information provided.

Stealth549

View 2 Replies View Related

Newbie Q Regarding Opening A Connection To A Database

Jan 2, 2005

Hello, Im new with databases.

I know that opening a connection to a DB is expensive. Usually I write a method that opens a connection to the DB then I execute a query and then close the connection. Pretty standard.

OK, so how do I handle opening connections to the database when I need to run multiple queries. For example, i have a webpage that need to query the database to see if the user has moderator privledges, then depending on that query I have to query the DB again for moderator specific information or non-modertaor information.

So in this case how do i handle opening connections to the DB. Is it ok to generally have to open a connection to a DB multiple times on a page load?

The obvious solution is to keep the connection open. That is, open a connection, query the Db, keep the connection open, do the conditional statment ( if is_Moderator) then query the DB again for the info that I need, and then close the connection. But, from all the books that Ive been reading this is not a good practice because business logic should not been in the dataAccess layer.

Any help would be much appreciated.

View 2 Replies View Related

Newbie: Copy Database But Not Tables

Oct 1, 2007

Hi,

I am using SQL 2000. I have two DB's one is live and the other is developement.

I need to copy the live DB over the developement DB but I can't overide certain tables.

How do I go about? Do I need to this using transact?

View 3 Replies View Related

Newbie Trying To Get Specific Data From An SSE Database

May 28, 2006

It was suggested to me to try and post this here in the sql express forum.



I am trying to query a specific field from my sse database based on two different variables. And use this information to fill a textbox with an integer.

The first variable is a combobox that is filled with data in one of the other tables in the sse database. This table has a PKcolumn that is an integer and the identity of the column. The only other column is a nvarchar(30) string (which is the actual data in the combobox)

The second variable is a numeric up down that isn't actualy using info from the database but will be a reference. It has a max value written in to the code:

if NumericUpDown1.Value > 20 Then

MessageBox.Show("This form only supports characters up to level 20")

NumericUpDown1.Value = 20

The texbox value will be found in a table that has several columns, the first column is an identity column (also the PK) then it has a column that holds an integer value (the filter criteria for the numeric up down) the next column has the value that will fill the text box, then several other columns that are irrelevant for this, and then the final column is a foreign key that is linked to the primary key of information found in the table that feeds the combo box.

I will post a picture of the database diagram to show all of this information for a better understanding of this post.



I am not looking for someone to write the code for me, but I am totally stumped as to what I need to do, If someone can help me out with this I would greatly appreciate it, thanks in advanced.



http://static.flickr.com/75/154867997_a55d3b0b9e.jpg - this is the table diagram

View 4 Replies View Related

Newbie With An Easy Compilation Error Question.

Dec 30, 2003

I've been looking over this and can't see anything wrong. Can anyone shed some light on this for me?
------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0117: 'System.Data.SqlClient.SqlConnection' does not contain a definition for 'ExecuteReader'

Source Error:



Line 16: SqlCommand myComm = new SqlCommand("SELECT users, password FROM users WHERE username='" + username + "' AND password='" + password + "'", myConn);
Line 17: myConn.Open();
Line 18: SqlDataReader myReader = myConn.ExecuteReader();
Line 19: do
Line 20: {


Source File: D:Inetpubhoteladvisor estLogin.aspx Line: 18


void Login(string username, string password)
{
SqlConnection myConn = new SqlConnection ("server = client1; uid = dbadmin; pwd = dbadmin; database = hotels");
SqlCommand myComm = new SqlCommand("SELECT users, password FROM users WHERE username='" + username + "' AND password='" + password + "'", myConn);
myConn.Open();
SqlDataReader myReader = myConn.ExecuteReader();
do
{
while (reader.Read())
{
if (username == myReader.GetString(1) && password == myReader.GetString(2))
{
messages.Text = "Your login was successful!";
}
else
{
messages.Text = " Your login was unsuccessful!";
}
}
}
while (reader.NextResult());
myReader.Close();
myConn.Close();
}
void Submit_Click(Object sender, EventArgs e)
{
Login(username.Text, password.Text);
}


Edit by moderator - NetProfit: Added < code>< /code> tags.

View 7 Replies View Related

Newbie Question: Referencing A Database Field...

Sep 26, 2006

Hi all, I am still in the process of learning ASP.NET. The simple goal I am trying to accomplish is to set a string equal to a field in my SQL Database using ASP.NET.I am just not sure what the correct syntax is to do so. It may be work noting that I am programming in VB.NET. I have my SQL Data Source setup correctly and inserted into my form with an ID of "PDCalculations".The field that I want to reference is "Percentage" which is an integer field.The reason I want to put the amount into a string is so I can use it in some calculations that are happening on my form.Thanks in advance.

View 1 Replies View Related

SQL Newbie - Maintaining An Off-site Database Copy

May 24, 2007

Hi,



I am very new to SQL Server and am just starting to look into replication as a possible solution to a problem I have. I have a local database which will be running on either MSDE or SQL Express 2005. I have a database on a webserver running SQL Server 2005 Standard which I wish to keep as an exact copy of the MSDE/Express one. If data is changed in the local db then I want the webserver db to be updated with this data, preferably as the change occurs, but it could be on an hourly schedule if required.



If data in the webserver db is altered then I do not wish for it to update the local db, but I would like it to be assumed that the change is erroneous and reset the item to whatever exists in the local db. In other words, should a table be erroneously dropped or something from the webserver db then the table would be recreated when it syncs with the local db (rather than propogating the change back to the local db and thus losing local data).



Basically I want the web db to be an exact mirror of the local db as often as possible. Given that the webserver is running SQL Server 2005 Standard and the local machine will be running either MSDE or SQL EXPRESS, is this achievable and what would be the best way of achieving it? Should I use merge replication or database mirroring? I have succeeded in getting 1-directional merge replication working by setting the webserver up as a publisher and distributor and setting up a push merge subscription on the local machine with an ExchangeType of 1. However, this won't correct the data in the web db if it is compromised until it is altered locally.



It crossed my mind that I could write a small application to utilise tablediff to compare each table in the DBs and get it to correct the web db if required on a regular basis. Would this be a silly approach?



I would appreciate expert advice!



Max

View 1 Replies View Related

Connecting To Server But Not To Database-Newbie Question

Aug 3, 2006

Hi everyone,



I created a database in SSMS,but I can't connect to it using VB Express code.When I delete the database name from the server I can connect to server,but when I mention the name of the database or initial catalog,I receive a login failure error for the mentioned database...



My connection string is:

Dim conn1 As SqlConnection = New SqlConnection("Data Source=.SQLEXPRESS;initial catalog=TEST1;" _

& "Integrated Security=True;" & "user instance=true;")

Everything is Local,I am using express version of SQL server and VB.How I am not be able to connect the database I created under the server in SSMS...I am really confused...

Thanks in advance!!!!



Can

View 8 Replies View Related

Newbie Need Help. Export Error, Null Value Error.

Sep 24, 2004

Hey all,

I'm currently using a shopping cart software called .netCart, which is in ASP.NET and VB. I have been trying to import my local "fully working" database to my remote server using Enterprise Manager via the DTS Export/Import Wizard, but then the exported remote database is not working with the software. Unfortunately, I have no prior experiences in MS SQL database at all, nor do I know anything about the scripts they used with the software I purchased.

Error message when attempting to run part of the software (website) with the exported database -

"Cannot insert the value NULL into column 'CustomerID', table 'tablename.dbo.Customers'; column does not allow nulls. INSERT fails. The statement has been terminated. [Customer Table]"

I simply used the DTS wizard to export the database. All settings are left "default" because I don't know what I should do about them....

1) At Specify Table Copy or Quert, "Copy table(s) and view(s) from the source database is selected.
2) Selected all tables. At the "Column Mappings and Transformations" window for all tables, "Create detination table" is SELECTED and "Enable identify insert" is UNCHECKED.
3) At one of the error table (i.e. Customers), the CustomerID int is NOT NULL.

Sorry, I do not know what's wrong with it, and I don't know how to explain it better technically. The software company do not support this as well.

I believe the problem is with the settings in the DTS wizard when I try to export the database. Something is not set right, but I don't know how to do it.

Can anyone please try to solve this problem for me? Thank you very much.

Temjin

View 2 Replies View Related

Connect To Database Without Server (was Stupid Newbie Question - Sorry In Advance)

Jan 19, 2005

Hi peoples...

I am a total newbie when it comes to SQL databases.

I currently work for a company developing software. We use a VB Development environment and connect to Dbase III database files using DAO... ewwwww...

We are looking to upgrade our development environment to VB.net and our database to either MSSQL or mySQL...

My question is - most of our users are on standalone machines. Our software is NOT internet based, nor do we want it that way at the moment.

Is there a way to connect to a MSSQL database (ie the .mdf file) without having a server running? Or are we better advised to stick to an MS Access database if this is the case....

Basically the reasoning behind upgrading is better speed and record locking. Any advice would be greatly appreciated.

I am sorry to sound so dumb...

Cheers,

Kev

View 8 Replies View Related

Newbie: Why Do I Have To Use OPENQUERY To A Linked Server? (ODBC To Firebird Database)

Jan 17, 2008

Hello,

pls. let me know where I could post if this is the wrong place.

I have a Firebird 1.5 application. I created a linked server from my SQL
Server 2000 to the firebird database. In SQL Server Query Analyzer I get errors from various ODBC drivers with "normal" queryies like

SELECT LVNR FROM LINKEDSRV...LVVERW

Pls. note, this all works perfectly in MS Access databases with ODBC-Links to Firebird!


From a programmer of a commercial ODBC driver I heard that this problem may be caused internally by SQL Server, there may be no solution possible in the ODBC driver. One workaround would be to use the OPENQUERY-Syntax like

SELECT * FROM OPENQUERY(LINKEDSRV, 'select LVNR from LVVERW ')

Are there any other solutions? Are there any known issues with firebird odbc-drivers and sql server? Are
there any known good drivers for the use with sql-server? What is the purpose of OPENQUERY - workaround ODBC problems? Are there any settings in SQL Server 2000 (2005 Express) that could help? Are there any settings in ODBC DSN that would help?

regards

arno


PS: Here are my favorite error messages

Error -2147217900 [OLE/DB provider returned message: Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 89
"Col1014"] (Source: Microsoft OLE DB Provider for SQL Server) (SQL State:
01000) (NativeError: 7312)Error -2147217900 OLE DB-Fehlertrace [OLE/DB
Provider 'MSDASQL' ICommandPrepare:repare returned 0x80004005: ].
(Source: Microsoft OLE DB Provider for SQL Server) (SQL State: 01000)
(NativeError: 7300)Error -2147217900 Der OLE DB-Provider 'MSDASQL' meldete
einen Fehler. (Source: Microsoft OLE DB Provider for SQL Server) (SQL
State: 42000) (NativeError: 7399)

This "tricky" query does not work:
SELECT LVNR FROM LINKEDSRV...LVVERW;

Error -2147217900 OLE DB-Fehlertrace [Non-interface error: Column
'ERHALTENABSCHLAG' (compile-time ordinal 35) of object 'LVVERW' was reported
to have a DBTYPE of 5 at compile time and 131 at run time]. (Source:
Microsoft OLE DB Provider for SQL Server) (SQL State: 01000) (NativeError:
7300)Error -2147217900 Der OLE DB-Provider 'MSDASQL' hat inkonsistente
Metadaten für eine Spalte übergeben. Die Metadateninformationen wurden zur
Ausführungszeit geändert. (Source: Microsoft OLE DB Provider for SQL
Server) (SQL State: 42000) (NativeError: 7356)

View 2 Replies View Related

SQL Newbie

Feb 6, 2006

Hopefully this is the right place to post this,  I am trying to learn ADO.Net programming using VWD Express with SQL Express... I tried to do the walk-through tutorial on ADO.Net through the asp.net tutorial.  The walk-through asked you to download and install a script (check) then it said to open a command window with sql server running (check) and then to copy all of this special script code into to bind the database to the web page (not check).  Everything pretty much went down hill after that part.  I couldn't get the Update/Cancel/Delete buttons.  After that dissapointing attempt at learning I decided to just try and make my own database.  All was going pretty well until I try to add the UPDATE/DELETE fields after adding the WHERE clause.  No go. 
So, I don't know if I'm just totally flubbing this up or if this is a common problem.  Do I need the two or three pages of custom script like the Microsoft example to make a database work? 
 
Please help!!!
Syntax Override

View 5 Replies View Related

Newbie Q&#39;s Please Help

May 8, 2001

1 Hi, I'm a complete newbie at this, and need some help I want to import a text file into a DB. I know how to set it up in the DTS, however when I check the DB each line from the text file is in a seperate row. What have I missed? I want the file just in one row, like its a memo.

2 What do I use to connect to a SQL DB on the web so i can see the DB and all the tables


3 Also if I want to add data to a DB is that done on the server, or do I change my copy of the DB and re-upload


Thanks for any help
Meltdown

View 2 Replies View Related

Sorry If This Is Newbie-ish But...

Jun 19, 2001

Is it possible to change from integrated security to standard security? Is it something easy or does it take a reinstall.

View 1 Replies View Related

Help For Newbie Pls

Aug 26, 2000

Hi,

I've imported an access .mbd table into SQL 7.0, and need to know the best way to overwrite my SQL 7.0 table with the new Updated information that is contained in the access table. I've read a little bit about update tables, but is there an easy way to overwrite an entire table without having to specify each row and column?

Thanks in advance for any help.

View 2 Replies View Related

Newbie Help

Dec 4, 2002

Ok, not sure if this is where i should post this, but here goes.

I am trying to setup a database to handle RMA stuff at work. I need to be able to access the DB from numerous systems at once. Now i know NOTHING about SQL or any other DB for the most part. Messed around with Access some, but nothing major.

Is there anyone that could help me, explain how, or at least point me in the right direction?

I have MS SQL server 2000. Any help, ideas, or suggestions would be great!!

Thanks in advance :)

View 2 Replies View Related

MS SQL Newbie

Aug 9, 2004

Hey! I',m totally new to Ms SQL Server. I'm currently trying to import a database from LINUX using SQL+ (Oracle) to MS SQL Server. Any suggestions on how this could be achieved would be most helpful

View 1 Replies View Related

Newbie Need Help

Jul 23, 2004

I need to know how to write a sql statement for VB to Microsoft Access for the following criteria.



TblEmployees only Field to be concerned with is EmployeeID -Its PK
TblEmpAttendane has these fields:
EntryID - Pk
EmployeeID - Fk
Date- A text form date validated through vb to avoid hassle
Value-A single digit value that can be alpha OR numeric

To get the Date range for the current month I use variables to store the First and last day of the month(in a CUSTOM calendar control).

I have been trying to use this Sql statement(that wont work):
SqlString = "SELECT * FROM TblEmpAttendance WHERE Date BETWEEN '" & FirstDay & "' AND '" & LastDay & "'"


I need to:
1.)using the current EmployeeID (from TblEmployees)
2.) find the same EmployeeID in TblEmpAttendance
3.)Get the date range for the current month and year(valid days currnt mo.)
-these date are supplied by the variables "FirstDay" AND "LastDay" as seen in above SqlString

4.) Find the Values associated with the dates and EmployeeID

View 8 Replies View Related

Help For Newbie!

Aug 12, 2004

I have a table with 10 records: 10, 9, 8, 7 ... and so on. I want to SELECT the top 3 records starting with the second record on the list (which in this case is 9.) So the result should be 9, 8, and 7. What would be the correct SQL statement for this?

I tried "SELECT TOP 3 * FROM tableXXX WHERE (FieldID<>(SELECT TOP 1 * FROM tableXXX ORDER BY FieldID DESC) ORDER BY FieldID DESC" but sure as heck it didn't work. Can anyone help?

View 2 Replies View Related

IIF - Newbie

Aug 17, 2004

Hi,

just for understanding a simple iif statement:
I like to set a numeric value to 0, if it is smaller than 0.
This expression shall be valid over all dimensions for a specific measure

like Iif([Measures].[Provision Ankauf]<0,0,[Measures].[Provision Ankauf] )

it's not working, Pivottable returns ##VALUE everywhere

View 8 Replies View Related

Please Help Newbie

Nov 16, 2007

Hi

I have two problems. I am currently using SQL Server express and SQL Server Management Studio Express locally. i have a DotNetNuke website running on the web with IHostASP.Net

Story:

I noticed that my SQL Server 2005 database with IHostASP.net was 350MB. It was only 22 2 months ago and I have had about 100 users sign up. I then connected to my live database via SQL Server Management Studio Express and shrunk the database. No errors and the database was reduced to 24MB - Great I thought!

I went and checked the website and all was great for about an hour then the site went down with the following error:

Error The transaction log for database 'classcampers' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

Anyone know what to do.

Anyway, I have downloaded a .bak of my database as supplied by my host. However I cant figure out to restore this file back to my live database. What are the steps involved?

Do I create a new local database from the .bak and then somhow restore this back to my live one, or do i apply this .bak file strainght to my live database using SQLMSE. Any tutorials becuase I have been trying to apply this restore all day

Thansk for any advice in advance
cheers
Albertramsbottom:eek:

View 9 Replies View Related

Newbie

Apr 24, 2008

Hi,
which is current running mostly used version of sql server and what was the previous version?
how can we track down a query bad performance in sql server(like explain plan,stats..etc..in oracle)

Thank you.

View 1 Replies View Related

Help! Newbie In Need!

Jun 3, 2008

Hi guys,

Ive been learning SQL slowly and I need help for a projet I am doing.

I currently would like to compare identical files in a 2 seperate folder. Not only would I like to compare if the files are the same name, but when they are I would like to compare the file contents.

SO basically this is what I need to do:
-Compare file names in folder A with files in folder B
-If a match is found, compare file contents
-If file contents are same, do nothing. If file contents are different, move file to folder C.

Can anyone help me!! :O

Thanks guys!

Gino

View 3 Replies View Related







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