DataBase - Usin VB in Sql Server

Asked By jschping
23-Dec-09 12:48 PM
Hi,

I Upsized an Access database to SQL Server 2008 Express, so I will be able to
create a .NET application so the  public will be able to view the data.

However, I used Access's wizard because I wanted to keep the reports that I
worked on for days. I thought that the Access front end would still allow
that.

However, I had used some VB functions in the queries that the reports were
built on. Now I get error messages that those functions are not defined in SQL
Server.

What can I do? Can I port the VB code over to SQL Server so it will
recognize those functions?

Thanks!!
SQL Server 2008
(1)
SQL Server 2005
(1)
Visual Studio
(1)
ASP.NET
(1)
VB.NET
(1)
VBA
(1)
VB
(1)
Database
(1)
  David C. Holley replied to jschping
23-Dec-09 11:31 PM
SQL Server does not support VB. It only supports SQL and T-SQL
(Transaction-SQL) which effective allows you to develop custom functions
*BUT* they are do not function in the same manner as functions in VBA. They
can be used within VIEWS and Queries executed in SQL Server, however there
will be a learning curve in adapting them.

Your existing queries will work, however you have to run them as
Access-native queries. You will also have to link the Front-End to the SQL
Server backend. Once you relink them you will then need to rename the links to
the names of the old tables. The Linked Table Manager will most likely
import the links as dbo.tblName. Doing the renaming should be sufficient to
reenable the queries.

Also on a side note, C# is the generally preferred language for the code
behind in a page. Personally, my first ASP.NET site used VB.NET since it
eliminated the learning curve with C#. VB.NET is very similar in context to
VBA and should be easier to transition to. Once you start, you will want to
visit WWW.ASP.NET very frequently.
  vanderghast replied to David C. Holley
24-Dec-09 09:05 AM
Recent versions (MS SQL Server 2005 + ) also accept C#/VbNet, but that
requires some extra steps, in comparison with what we have with
Jet+Access+VBA. That is not something use quite often, though, probably for
security reasons, although it may be nice to interact with SQL itself, such
as adding a LIST aggregate for total queries.



Vanderghast, Access MVP
  jschping replied to David C. Holley
25-Dec-09 10:21 AM
Thanks!
  david replied to vanderghast
27-Dec-09 08:43 PM
Older versions (all current versions) also support Extended
Stored Procedures, ie User Defined Functions.

User Defined Functions are defined in Windows DLL's
or ActiveX DLL's.

VB6 can create Windows DLL's (in spite of MS) or
ActiveX DLL's.

What you do not get is the default Access.Application objects
and methods: Codedb, CurrentDB, OpenRecordset etc.

So it is good for calculations and string manipulations, but
not much else.

http://www.devx.com/getHelpOn/10MinuteSolution/20562
http://msdn.microsoft.com/en-us/library/ms164653.aspx

(david)
  Stuart McCall replied to david
27-Dec-09 10:04 PM
Could you point me to some info re creating windows dll's with vb6?


Those are all part of the DAO library, not Access. The DAO lib is usable
from vb6 once you set a reference (or it can be used late-bound as
  david replied to Stuart McCall
30-Dec-09 03:47 AM
http://www.vb-helper.com/howto_make_standard_dll.html

VB6 uses the Visual Studio 6 compiler and linker. You
need to interrupt the process and change the link commands.

(david)
  Stuart McCall replied to david
30-Dec-09 05:51 PM
Thanks v much. Studying it now...
Happy new year!
Create New Account
help
Might be outgrowing Access but daunted by SQL Server DataBase I am close to completing the consolidation of various small Access databases and a spent the last 10 hours downloading, installing and trying to get my head around Microsoft SQL Server 2008 Express and how it might help me out. It all started when I came across encouraging article on keeping your Access database as your front end application and linking to SQL Server database tables. I am finding it MUCH more complicated than I had hoped. Can anyone be happy to use my quite powerful workstation at the office as some kind of server. You may have guessed by now that I am no IT guru by any stretch
proof DataBase https: / / mcp.microsoft.com / authenticate / validatemcp.aspx transcript: 944364 AccessCode: helloworld Access Discussions SQL Server 2008 R2 (1) SQL Server 2008 (1) SQL Server 2005 (1) Microsoft SQL Server Reporting Services (1) Regards Larry Linson Microsoft Office Access (1
Cannot link to SQL server DataBase Can any of you guys help? I am new to using SQL Server. I have a database that I wish to upsize from Access to put the back end on a server, and use Access as a front-end. However, I am stuck at the very first stage - I cannot link Access to the SQL server. I am using SQL Server Management Studio on a single computer for development purposes, no network involved yet. In
Access to remote SQL server DataBase Hi everyone, Developing in Access 07. All users will be using Runtime. I have database admin for a bank, and we used ODBC to connect to our local Microsoft SQL server. However, I have never created an app to connect to a remote SQL database on a web server. Couple of questions. . . 1. Is Access the best solution for the front-end? I developed connected to a remote Access back-end and it was dreadfully slow even with the server on a T1 and the Users on cable. Will connecting to an SQL back-end speed things up? 2. If I do stick with Access for the front
when I create a record using a data macro. Is that possible? Thanks! Access Discussions SQL Server 2008 (1) SQL Server (1) Visual Studio (1) SharePoint (1) Access 2010 (1) Oracle (1) Office (1) Error (1) Neil wrote, on that (in fact I have to admit I read specially the beginning ;) ), I learned the asp.net platform, with SQL Server. Other solutions existed before, as compiling a program in VB6