473,507 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using User-defined Functions in VB.net

Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 13 '07 #1
14 6858
a) Access MDB is for retards

b) SQL Server UDFs are great

c) if you're trying to reuse them in VB 2005 you'll have to rewrite
them _AGAIN_

MS does not support code reuse; move away from VB; consider PHP or
something
MS has demonstrated; time and time again-- that they could care less
about 7 million vb6 programmers; and they'd rather cater to a couple
hundred C# _FAGS_


On Feb 13, 5:22 am, "SemiNoviceProgramer" <hgnov3...@gmail.comwrote:
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #2
either learn SQL or VB you can't skate by without one of the two
I personally said 'screw dotnet' and i've been focused on SQL for the
past 5 years; I love it

and worse comes to worse; i'll move to mySql or Oracle or someting; MS
has demonstrated a complete and utter disregard for programmers,
programmers, programmers

On Feb 13, 5:22 am, "SemiNoviceProgramer" <hgnov3...@gmail.comwrote:
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #3
If nobody here helps you (and ignore the Larry Linson guy; he's trolling),
I recommend that you post this to the
microsoft.public.sqlserver.programming newsgroup.

Robin S.
---------------------------
"SemiNoviceProgramer" <hg*******@gmail.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #4
seriously robin

time to start sticking on topic
DOTNET DOES NOT SUPPORT CODE REUSE

IT DOES NOT SUPPORT VBA
IT DOES NOT REPLACE VBA

IT DOES NOT SUPPORT VBS
IT DOES NOT REPLACE VBS

keep your access code in MS Access where it belongs

DOTNET IS DEAD
AND NO ONE CARES

IF THERE WAS A HELL
I WOULD SEND MICROSOFT THERE

On Feb 13, 10:26 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
If nobody here helps you (and ignore the Larry Linson guy; he's trolling),
I recommend that you post this to the
microsoft.public.sqlserver.programming newsgroup.

Robin S.
---------------------------"SemiNoviceProgramer" <hgnov3...@gmail.comwrote in message

news:11*********************@v33g2000cwv.googlegro ups.com...
Hi Every body
I used access succefully for years and I created many scientefic
databases with it
Now I want to use VB.net2005 environmment with access database
I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported
So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!
What Can I Do to make the SQL engine read functions as it was in
access?
Thanks in advance- Hide quoted text -

- Show quoted text -

Feb 14 '07 #5
SemiNoviceProgramer wrote:
I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported
<snip>

There's a really long time since I coded in Access, so forgive any
mistakes.

It seems to me that the Access functions belong to the DB, and will
probably not be imported.

A (somewhat far fetched) solution would be to create (parameterized)
queries that use your functions in Access and import the queries into
VB.

HTH.

Regards,

Branco.

Feb 14 '07 #6
learn how to rewrite VBA into DOTNET

_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_
_WELCOME_TO_VISUAL_FRED_



On Feb 13, 5:22 am, "SemiNoviceProgramer" <hgnov3...@gmail.comwrote:
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #7
and for the record, the mix-match of VBA and SQL is something that is
only available in MS Access

it isn't anywhere else
sorry

On Feb 13, 5:22 am, "SemiNoviceProgramer" <hgnov3...@gmail.comwrote:
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #8
When you say you loaded the database, what did you load it into?

Robin S.
-------------------------------------
"SemiNoviceProgramer" <hg*******@gmail.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #9
Semi

There should be almost no differences. OleDB is more difficult to use with
an auto identifier because the created one is not given back. Parameters in
OleDB have to be given in sequence as the are created.

I write OleDB that is because MS-Access has no SQLClient provider. Using
edit and replace will be probably the most you have to do.

Cor

"SemiNoviceProgramer" <hg*******@gmail.comschreef in bericht
news:11*********************@v33g2000cwv.googlegro ups.com...
Hi Every body

I used access succefully for years and I created many scientefic
databases with it

Now I want to use VB.net2005 environmment with access database

I succesfuly loaded my database BUT all the custom functions in the
modules had not been imported

So I created a module in VB.net and put all my custom functions as
Public Functions,
But this fails too!

What Can I Do to make the SQL engine read functions as it was in
access?

Thanks in advance

Feb 14 '07 #10
Thanks Every body for reply

To Robins
I loaded the tabels and queries only to VB2005
The code and parameters' queries did not load

I have no problem to rewrite code in VB.net syntax

BUT the problem is that VB.net is unable to link its code to the
database

for example it loaded a table, say emploee table, a query should be
built to geather those having 3 years or more and to raise there
salary according to specific function NewSalary(DateOfStart,
BasicSalary, PositionID)
This was done in Access by simply definig Public function in a module
and every thing ok
When I defined a public function in VB.net, the query can not identify
that function and returns an error.
In SQL server the stored procedures fixed the problem but in access
database no stored procedures.

Is there any possible solution?

Feb 17 '07 #11
"SemiNoviceProgramer" <hg*******@gmail.comschrieb
Thanks Every body for reply

To Robins
I loaded the tabels and queries only to VB2005
The code and parameters' queries did not load

I have no problem to rewrite code in VB.net syntax

BUT the problem is that VB.net is unable to link its code to the
database

for example it loaded a table, say emploee table, a query should be
built to geather those having 3 years or more and to raise there
salary according to specific function NewSalary(DateOfStart,
BasicSalary, PositionID)
This was done in Access by simply definig Public function in a
module and every thing ok
When I defined a public function in VB.net, the query can not
identify that function and returns an error.
In SQL server the stored procedures fixed the problem but in access
database no stored procedures.

Is there any possible solution?

Modules <Database

means: In VB.Net, you are doing database programming, not Access
programming. Access uses the same database enginge (Jet) as VB.Net does, but
VB.Net does not use Access. You do not even have to have Access installed on
a machine running your application, only the Jet is necessary. Modules (like
Reports) belong to Access. The Jet does not know any of your code in VB.Net.
That's database programming.

If you want to do more than SQL can offer, write the code in VB.Net. Or, if
you like to have it in the database (I don't), SQL server (express) using
it's stored procedures may be an alternative.
Armin

Feb 17 '07 #12
Access MDB can do this; and I think that ColdFusion can do this?? i
don't know why I say that I just think that is true about coldfusion.

but no, visual basic .NET doesn't support _ANYTHING_ considered
practical like this.

you can't bind a sql statement to a form; nothign like this.

sorry; I hate vb.net and this is one of those reasons

but you've just got to do it programmatically
and because the forms and all classes and they're all optimized for a
MDI: i don't even think that you can refer to the form name.

instead of DoCmd.OpenForm

you've got to do this:

Dim StartupForm1 as new StartupForm
StartupForm1.Show

and then when you're living on the Detail form, in order to refer to a
control on the StartupForm; you need to make sure that you use the
StartupForm1.txtUsername instead of StartupForm.txtUsername

these people are going to flame me; but I believe that I'm on the
right track here.
I just think that VB dotnet is not competitive with MS Access in 10%
of the functionalty; I would reccomend avoiding VB.net and maybe it
will be a decent product with the next release (i know; I've been
saying that for 5 years but the damn IDE crashes every day and it's
thus unusable)

On Feb 16, 11:22 pm, "SemiNoviceProgramer" <hgnov3...@gmail.com>
wrote:
Thanks Every body for reply

To Robins
I loaded the tabels and queries only to VB2005
The code and parameters' queries did not load

I have no problem to rewrite code in VB.net syntax

BUT the problem is that VB.net is unable to link its code to the
database

for example it loaded a table, say emploee table, a query should be
built to geather those having 3 years or more and to raise there
salary according to specific function NewSalary(DateOfStart,
BasicSalary, PositionID)
This was done in Access by simply definig Public function in a module
and every thing ok
When I defined a public function in VB.net, the query can not identify
that function and returns an error.
In SQL server the stored procedures fixed the problem but in access
database no stored procedures.

Is there any possible solution?

Feb 20 '07 #13
Armin;

so sissy-pants; why are u scared of the database side?

oh does the little baby vb.net progwammer not speak SQL roflmao

I swear to fuckin god if you kids stoppped fuckign around with UML and
classes and all that crap-- and you started focusing ON THE DATABASE
then maybe these jobs would stop getting outsourced to India.

I MEAN SERIOUSLY.

In vb6; 95% of applications either write stuff into a database or pull
it out of a database; or both.

you lazy retarded kids don't understand that collections and classes
have NO ADVANTAGE to a database and life is a lot easier when you make
the database the center of your app.

Seriously.

Any kid that uses classes instead of a database is fucking stupid.

-Larry Linson Jr
(WAKE UP DAD, LEARN SQL!)

On Feb 17, 4:07 am, "Armin Zingler" <az.nos...@freenet.dewrote:
"SemiNoviceProgramer" <hgnov3...@gmail.comschrieb
Thanks Every body for reply
To Robins
I loaded the tabels and queries only to VB2005
The code and parameters' queries did not load
I have no problem to rewrite code in VB.net syntax
BUT the problem is that VB.net is unable to link its code to the
database
for example it loaded a table, say emploee table, a query should be
built to geather those having 3 years or more and to raise there
salary according to specific function NewSalary(DateOfStart,
BasicSalary, PositionID)
This was done in Access by simply definig Public function in a
module and every thing ok
When I defined a public function in VB.net, the query can not
identify that function and returns an error.
In SQL server the stored procedures fixed the problem but in access
database no stored procedures.
Is there any possible solution?

Modules <Database

means: In VB.Net, you are doing database programming, not Access
programming. Access uses the same database enginge (Jet) as VB.Net does, but
VB.Net does not use Access. You do not even have to have Access installed on
a machine running your application, only the Jet is necessary. Modules (like
Reports) belong to Access. The Jet does not know any of your code in VB.Net.
That's database programming.

If you want to do more than SQL can offer, write the code in VB.Net. Or, if
you like to have it in the database (I don't), SQL server (express) using
it's stored procedures may be an alternative.

Armin

Feb 20 '07 #14
Hi Dad!

"Larry Linson" <la***********@hotmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
Access MDB can do this; and I think that ColdFusion can do this?? i
don't know why I say that I just think that is true about coldfusion.

but no, visual basic .NET doesn't support _ANYTHING_ considered
practical like this.

you can't bind a sql statement to a form; nothign like this.

sorry; I hate vb.net and this is one of those reasons

but you've just got to do it programmatically
and because the forms and all classes and they're all optimized for a
MDI: i don't even think that you can refer to the form name.

instead of DoCmd.OpenForm

you've got to do this:

Dim StartupForm1 as new StartupForm
StartupForm1.Show

and then when you're living on the Detail form, in order to refer to a
control on the StartupForm; you need to make sure that you use the
StartupForm1.txtUsername instead of StartupForm.txtUsername

these people are going to flame me; but I believe that I'm on the
right track here.
I just think that VB dotnet is not competitive with MS Access in 10%
of the functionalty; I would reccomend avoiding VB.net and maybe it
will be a decent product with the next release (i know; I've been
saying that for 5 years but the damn IDE crashes every day and it's
thus unusable)

On Feb 16, 11:22 pm, "SemiNoviceProgramer" <hgnov3...@gmail.com>
wrote:
>Thanks Every body for reply

To Robins
I loaded the tabels and queries only to VB2005
The code and parameters' queries did not load

I have no problem to rewrite code in VB.net syntax

BUT the problem is that VB.net is unable to link its code to the
database

for example it loaded a table, say emploee table, a query should be
built to geather those having 3 years or more and to raise there
salary according to specific function NewSalary(DateOfStart,
BasicSalary, PositionID)
This was done in Access by simply definig Public function in a module
and every thing ok
When I defined a public function in VB.net, the query can not identify
that function and returns an error.
In SQL server the stored procedures fixed the problem but in access
database no stored procedures.

Is there any possible solution?


Feb 20 '07 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5932
by: Sam | last post by:
I would like to store html templates in a database. By using perl I would like to retrive the template ask the user to fill the template and store the whole file is template + the user data in a...
19
4065
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
10
9836
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
2
2398
by: YRao | last post by:
I am going to create intranet application using Windows Authentication using C# asp.net I am having following problem: 1 setting windows Authentication, it will validate for all users, user...
5
2062
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
5
3143
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
5
4827
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
3
1736
by: Lord0 | last post by:
I *think* I need to be able to validate subsets of an XML document using different schema. The functionality I'm trying to implement is this. a) External suppliers produce an XML document...
5
3080
by: Mukesh | last post by:
Hi i want to use AJAX.net in my Existing Application I have already installed the ajax .net ..net 3.0 and using VS 2005 in the old application i have added a new web form then script manager...
10
13040
by: shankhar | last post by:
Hi all, In my project there is a requirement. If a user logged in at a time since he/she logged out others are not allowed to loggin using the same user name. That is to avoid multiple logins...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.