Can't find SQL view in Access 2010 while using .mdb? - vb6

I can't find the SQL view in Access 2010 when I open the .mdb(access 97 format) database file created with Visual Basic 6 inbuilt database.
It works fine when I open a new database document ** (.accdb) ** in Access 2010, but that version of the access file (.accdb) is not supported in Visual Basics 6.0.
I know it's weird that I still use VB6 but I have no other go since my university only allows to use VB6.
So, is there any way I can solve this issue?
Thank you.

I am not sure what you mean by "can't find SQL view". You can open mdb files in Access 2010 and edit queries using both the query designer and also the SQL editor.
It is also possible to open accdb files using VB6. Here is the proper connection string:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;
Persist Security Info=False;
Taken from:
http://www.connectionstrings.com/ace-oledb-12-0/standard-security/

Related

VS2010 depends on SQL Server Compact 3.5 for IntelliSense?

I've just recently installed VS2010 Professional (trial) on my WinXP machine. Knowing that I only needed it for a VC++ project (with no databases), I "unchecked" the install options for SQL Server.
However, when I try to create a new project (I've tried all variations of MFC and Win32 project types), I am presented with a lovely error message box:
An error occurred while creating or opening the C++ browsing database file c:\path-to-project\testProject.sdf. IntelliSense and browsing information will not be available for C++ projects.
Ensure that Microsoft SQL Server Compact 3.5 is installed and that no other applications are accessing the file. If this problem persists, delete the file and reopen the solution.
If I hit "Ok" VS will still allow me to "develop," except for when I try to add an event handler to a control. Then I am given:
An error has occurred in the script on this page.
The solution's source code database may not have been opened. Please make sure the solution is not open in another copy of Visual Studio, and this its .sdf file is not read only.
Should I have checked the install SQL Server option? If so, why? I don't want it, nor will I be using it. Or rather, what do I need to do to make things work without the errors?
EDIT/Solution
So, it turns out that since the machine I was installing on is not connected to the internet, it was not getting those "wonderful" Microsoft updates, which coincidentally would've installed SQL Server Compact for me! much thanks to #ErikEJ for the clarification.
You have to install Sql Server Compact 3.5 with your Visual Studio because MFC application projects use a temporary database by default. IntelliSense, F12, Shift+F12 and viewing class diagrams will not be available without this database.
IntelliSense will still work when developing c# applications, but not when developing MFC applications.

Connection with SQL database in visual studio 2010

I have connected with the database successfully by using wizard in server explorer. but the data source is showing nothing. i have googled and search on msdn help. but not get help.
I want to add data source. but add new data source option is disabled for me.
I am using windows form application...
I want ask that am i doing right. could you please tell me how can i get rid of not showing thing.
PLEASE HELP!!!
The Server Explorer of Visual Studio 2010 and the Datasource of your application are completely different. Check the following links to see how you can connect your Windows Form Application with Sql-Server database:
Walkthrough: Connecting to Data in a SQL Server Express Database (Windows Forms)
Connecting to a Database with Visual Studio Tools

Is it possible to use Windows Authentication to connect to a SQL Express db?

I've been looking around to find an answer to this question, and seeing lots of different answers, some of which don't look right to me. Here's my problem.
I've created a SQL Server 2008 Express database, and populated it with tables from 2 regular SQL Server databases (it's to receive data from the 2 databases). I've done this using Windows Authentication.
Now I want to test deploying an app, as a ClickOnce application, so I've written a bare-bones console app in VS 2010. Next I tried to add a new data source to the SQL Express 2008 database. But when I try to do that I get a message saying, "This file is in use. Enter a new name of close the file that's open in another program." (I'm running VS 2010 as an administrator on my Windows 7 Ultimate box, which was one of the answers someone gave to fix this problem, but isn't working for me.) I don't have the SQL Express db open in SSMS or anything else. One solution I've read is to get into SSMS and detach the .mdf, but then how would I do maintenance, like create new SP's, views, etc? Is it a maintenance nightmare of attaching in SSMS while not in VS 2010, do DBA work, then detach the DB, get into VS 2010 do work, etc?
The database is meant to run on the user's machine; not a network share.

How do I open a SQL CE4 .sdf database file?

I installed Microsoft WebMatrix, which, I believe comes with SQL Server CE4. I've tried opening the SDF file in SQL Management Studio (SQL 2008), but I get the following error message:
-------- Microsoft SQL Server Management Studio:
There is no editor available for
'C:\efTest\App_Data\SchoolRepository.sdf'.
Make sure the application for the file
type (.sdf) is installed.
How do I view/modify my .sdf database?
I see there is a similar question on StackOverflow (http://stackoverflow.com/questions/4070860/sql-compact-4-0-cant-open-read-sdf-file) but I would really like to use Management Studio if I can, and not another 3rd party tool.
Have you tried the SQL Server Compact Toolbox?
or the SQL Compact Query Analyzer?
You can download sql ce through web api just follow this link
visual-studio-tools-for-sql-serverl
to do that.
Here are a couple which have worked quite well for me in terms of connecting to SQL CE 3.5 and 4.0 databases:
LINQPad - (See my remark to question) It works quite well plus it allows for specifying LINQ or SQL for queries.
CompactView - Seems pretty full featured + install creates a nice Windows file association so one can simply double-click to open/connect to .sdf files for instance.
All of the other options require SQL CE 4.0 Database Provider installed on your machine.
This one doesn't need provider http://sqlcequery.codeplex.com/
If you are using Visual Studio 2015, 2013, 2012, 2010, try SqlCeToolbox.4.5.0.3.vsix. It is SQL Server Compact/SQLite Toolbox for Visual Studio.
The link:
http://www.sokhawin.com/how-to-open-sql-compact-edition-file-sdf-in-visual-studio-or-linqpad/
It has ability to open and edit.

I have problem with create .mdf file in VS 2010

When i trying to create. Mdf file in App_Data folder in visual studio 2010 I see this message.
"Failed to generate user instance of SQL Server due to an error when starting the process for an instance of the user. The connection will be closed."
I can to create the database other ways. (In visual studio -> Tools-> Connect to the database and SQL Manager). SQL Server is installed automatically studio.
How can I solve this problem?
What am I doing wrong?
This is not exactly an answer to your question, however I think it is very important you read this link first before attempting any further resolutions to your problem.

Resources