Need Help Switching From MS Access Database To SQL Database
Sep 16, 2006
I recently created a form to MS access database web application and it worked fine on my local cpu. When I published the same web app to my hosting server the program wouldn't work but I couldn't understand. Well, after researching the matter I found out my hosting server doesn't allow ASP.NET applications that use the aspcompat page directive because of security trust levels. So, I decided to switch to a SQL database but I can't even test the web application on my local cpu because I get 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)". So, once again I researched this error on the internet and found these two websites with incite to what is causing the error.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
http://www.cryer.co.uk/brian/sqlserver/hresult_0x2%20npp_error_establishing_connection.htm
I tried all the remedies suggested except for the cmd procedure in the second lind because I don't understand how to run that command in sqlcmd from start>run. Anyway, I can't get my web application to work and I wanted to know if someone can assist me.
I use the following programs:
MS Visual Web Developer 2005 Express Edition
MS SQL Server Express 2005
Here is my code:
sqlForm.aspx
<%@ Page Language="VB" Debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim connContacts As SqlConnection
Dim strInsert As String
Dim cmdInsert As SqlCommand
connContacts = New SqlConnection("Server=MSSQL$SQLEXPRESS;database=contacts")
strInsert = "Insert users ( name, email, comments ) Values ( @name, @email, @comments )"
cmdInsert = New SqlCommand(strInsert, connContacts)
cmdInsert.Parameters.AddWithValue("@name", txtName.Text)
cmdInsert.Parameters.AddWithValue("@email", txtEmail.Text)
I would like to know how I can switch from one database to another within the same script. I have a script that reads the header information from a SQL BAK file and loads the information into a Test database. Once the information is in the temp table (Test database) I run the following script to get the database name.
This part works fine.
INSERT INTO @HeaderInfo EXEC('RESTORE HEADERONLY FROM DISK = N''I:TESTdatabase.bak'' WITH NOUNLOAD') DECLARE @databasename varchar(128); SET @databasename = (SELECT DatabaseName FROM @HeaderInfo);
The problem is when I try to run the following script nothing happens. The new database is never selected and the script is still on the test database.
EXEC ('USE '+ @databasename)
The goal is switch to the new database (USE NewDatabase) so that the other part of my script (DBCC CHECKDB) can run. This script checks the integrity of the database and saves the results to a temp table.
We have been asked to look into using stored procedures with SQL Server 7.0 as a way to speed up a clients site. 99% of all the articles I have read along with all the books all say Stored Procedure should be used whenever possible as opposed to putting the SQL in your ASP script. However one of my colleagues has been speaking to Microsoft and they said that that they were surprised that our client wanted to use Stored Procedures as this was the old method of database access and that now he should really consider using COM objects for data access as itis much faster. Has anyone got any views on this or know of any good aticles regarding this matter ?
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?
Dear All, i have a question abt winCE 4.2 and SQL server CE. i am using VB.net of Visual Studio 2005 My platform is using a PDA with winCE 4.2 and SQL server CE. The Host program is using dbf files on desktop side.
I got a problem of how to sync / read the sql CE data from a windows application.
so, i wanna ask,
1. any method to access the data from winCE data by windows application? or can i convert the sdf file to windows readable files? or any others?
2. Can i use a MDB to sync with SQL server CE? can i synchronize the mobile device which has a SQL Server CE database with the Access database on the desktop?
last question, 3. is that windows CE .net 4.2 not support pocket access (cdb) anymore?
I need detailed instructions on how to connect to a database from a Microsoft Access 2007 database to a Microsft Office Accounting 2007 database. The accounting database is an SQL 2005 datbase. It has an instance name of "MSSMLBIZ".
When I try I get an SQL error 53. Do not have permissions or database does not exist.
I'am doing functionality test on DTS packages and saving my DTS packages to meta data services instead of saving them as local packages. We would like to see what information would be provided by saving them this way, but when we try to open the meta data browser (the 3rd icon under DTS) we get the following error:
An error occurred while trying to access the database information. The msdb database could not be opened.
Hi I am wondering if anyone knows of a way of synchroniseing two versions of a database one in access and one in sql server so they can both run in parrallel in ssis for updates etc.
Also can anyone recommend a book which is easy to use or resources as I can't find what I am looking for in the online help.
I've used the ADS sample program and it works well. I looked at the code and changed it to VB (sorry, I'm not biligual yet), and have tried to 'adjust' it so I can connect to a remote PC (XP running IIS) instead of the local PC using the workgroup information database (system.mdw). Any ideas of the connection string that could make the connection?..my intention is to RDA once a week between a mobile device (3g/gsm) and a 'poor man's' IIS web server. I've tried everything I can think of, and I'm sure its possible since all I'm doing is changing the connection path.
I have a quick question regarding getting data from a SQL database but I am slightly confused as to the best way to handle it.
Basically on of the projects I am working on I need to send data to another company, there are several calls required to the database to bring back various options for changing the questions asked on the front end.
Up to now all that has happened is there has been a mutual agreement between myself and this other company and they have just had access to the database to call a series of stored procs which I have written for them to access the data. Recently however the situation has changed and my client wants me stop them accessing the database however they still need to recieve the information from the database they recieve now.
What will be the best way to handle this? My knowledge of SQL is farily limited presently and I am only ust getting into learning a lot more about it.
I have MS-Access as data source for one of the reports. I can preview the report fine from BI studio however, it does not work when I deploy it on report server.
The error is :
An error has occurred during report processing. Cannot create a connection to data source '<data source name>'.
The Microsoft Jet database engine cannot open the file '<UNC location of the MS-Access database>'. It is already opened exclusively by another user, or you need permission to view its data.
MS-Access database is located on a different server.
Any help to solve this? I understand it has something to do with permission both on server where reporting service is running as well as the server where MS-access database is located. Pls help.
I got thrown into a new project that is going to require me to update an SQL server database tables from an Access table on the backend of an Oracle database on another server. At the end of each day the Access dabase will be updated from the Oracle database.
What I need to do, is when the Access database is updated I need to have the table in the SQL database automaticaly updated. When a new record is added to the Access table I need the new record added to the SQL table. When a record is deleted in the Access table I need to keep that record in the SQL table and set a field to a value (such as 0). And when a record is updated in Access, have it updated in SQL.
Needless to say this is a bit out of my area and not sure how to accomplish this.
Hi, i am working with windows mobile Cf 2.0 and desktop. i got problem when i were trying to synd mobile database and ms-access database. my requirement is online i want to transfar data records from mobile to desktop vice versa. but how? i dont knwo any body would like to guide me. i am ready to accepting yours valuable views. waiting bye Rajat.
When I try to access the database diagrams in AdventureWorks, I get the following message:
TITLE: Microsoft SQL Server Management Studio Express ------------------------------
Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.
I was checking this site: http://www.aspfree.com/c/a/Microsoft-Access/Configuring-a-Linked-Microsoft-Access-Server-on-SQL-2005-Server/
and I do not know what parameters are neeed to do the following two. Configuring a Linked Microsoft Access Server on SQL 2005 Server - Linked Servers on SQL 2005 Server I would also like to know how to do it through this method as well.
Configuring a Linked Microsoft Access Server on SQL 2005 Server - Using the Management Studio to set up a Linked Server Sorry for the large typing I was using cut and paste to make sure I had everything correct.
I wanted to Synchronize the SQL Server (2005) Database to Ms-Access 2003. I want know how can I design the SSIS Package. Could anyone please advice me to design the package..?
Hi, I have been able to view the databases and all of their tables but now when I cilck the "+" next to the database or try to connect a new one i get an error message: "Generating user instances in SQL Server is disabled. Use sp_configure 'user Instances enabled' to generate user instances" I don't know what I have done and I don't know how to fix it, Please help me! Best regards, Elliot
I have several access database files. Now, we have new backoffice server with SQL6.5. How do I transfer the existing access database files to the new SQL server.
Thanks ps: please provide with details or direct me to any links (I am new to SQL server)
I have recently upgraded to SQL2014 on Win2012. The Access front end program works fine.
But, previously created Excel reports with built in MS Queries now fail with the above error for users with MS 2013. The queries still work for users still using MS 2007.
I also cannot create any new queries and get the same error message. If I log on as myself on the domain to another PC with 2007 installed it works fine, so I don't think it is anything to do with AD groups or permissions.
I developed a database with Access 2003 and everything was working good until my tech came in and reformated my hard drive and install a new Ghost image that met our company standards.
Now I cannot go in and make any changes to any of the tables, queries and forms. All of this started when a new Ghost image was installed on my pc.
The message I get when I try to open my database is "You do not have permission to run "tblSwitchboard." I get the same error message when I try to do anything at all on the database.
We replicate a SQL2000 database (DataBaseA) to a SQL2000 database (DataBaseB) by using the Restore function and hasn't change its logical name but only the physical data path and file name. It is running fine for a year. We use the same way to migrate the DataBaseB to a new SQL2005 server with the Restore function and the daily operation is running perfect. However, when we do the Backup of DatabaseB in the SQL2005, it just prompt the error message
System.Data.SqlClient.SqlError: The backup of full-text catalog 'DataBaseA' is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online. Or BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data. (Microsoft.SqlServer.Smo)
Please note we left the DataBaseA in the old SQL2000 server.
Please help on how we can delete the Full-text catalog from DatabaseB so we can do a backup
I have database on localhost and i want to show this data on my website. I want to create a database online and want to sync with Local Host. Can it be possible syncing data automatically after some interval?
Login failed for user 'FAMILYASPNET'. this is the error message when i connect to database, FAMILY is my computer name. my connection string is: "Data Source=localhost;Integrated Security=SSPI;Initial Catalog=forum"
Hello, im new in c# language.Can someone show me, step by step (with simples code) how can i connect to a DSN connection that a configure in my odbc connection in my machine, to connect to my database ? I need only a simple class that use a DSN connection to retreive information from the database.Best regards
I am attempting to work on my asp.net from home on my laptop. To do this, I have installed a local copy of sql server and restored a backup copy of my work database. I then copied over my entire visual studio solution to my laptop.
When I open visual studio, I can use the server explorer to create a data connection to my server. I have full access to browse the tables when I do this. I also have full access via enterprise manager and query analyzer.
However, when I build my solution, I get the error "SQL Server does not exist or access denied". I have checked and rechecked the connection string and there is no issue with that. I have attempted to clear the Temporary files under the Windows/Microsoft.Net folder and then rebuild my entire solution. Again, the same error
I have noticed that when I bring the laptop into work and plug it into the LAN, my web application connects as expected. If I unplug it from the network, I get the error, even though I can still connect via the SQL client tools or via server explorer.