469,344 Members | 6,511 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Database Connectivity

Hi all,

I am just getting started on a new app and am a rusty VB6 guy who is
looking to create something on the side to serve as a corporate
workbench for my company.

ADO.net is new to me so I have some books and need to do some learning
but I am seeing a few different ways to get started.

Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.

I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 21 '06 #1
47 2161
Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.
I created a class that handles all my ADO.NET interactions. Basically,
I just created the general purpose routines (overloading can come in
handy here if you need mulitple version of a sub). Then I inherit the
class and override the subs if I need to need a more specific version
of the class.
I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?
I guess I didn't help much with the "how" part of your question, but
I'm not sure what you mean? Let me know what you need and I'll be glad
to help you out.

Thanks,

Seth Rowe

Ivan Weiss wrote:
Hi all,

I am just getting started on a new app and am a rusty VB6 guy who is
looking to create something on the side to serve as a corporate
workbench for my company.

ADO.net is new to me so I have some books and need to do some learning
but I am seeing a few different ways to get started.

Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.

I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 21 '06 #2
It does seem like a class is the way to go.

The how part is simple. I am very used to VB6 and "coding as you need"
or just creating Public Subs.

How would I go about designing a class that could handle my database
connectivity.

I guess for starters I am looking to create a login form. I have an
access database with fields UserName, Password, Roles and I need to
authenticate a user to allow them access to the application.

Once I get through that, I will have enough knowledge and have the class
created so the rest of the app should be a lot easier to learn through.

I am not even sure how to get started writing that class though to
access the database.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 21 '06 #3
Here ya go Ivan, this will get you started.

There is probably 10 different ways to write this, I like this method:

*************************************
Imports System.Data.OleDb

Public Class cls_AdoManager

Private strConString As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
My.Settings.DatabasePath & My.Settings.DatabaseName & ";User
Id=admin;Password=;"
Private oleCmd As OleDbCommand
Private oleConn As OleDbConnection
Private oleReader As OleDbDataReader
Private strUserRole As String = ""
Private strSQL As String = ""

Public Property UserRole() As String
Get
Return strUserRole
End Get
Set(ByVal value As String)
strUserRole = value
End Set
End Property

Public Function ValidUser(ByVal UserName As String, ByVal Password
As String) As Boolean

Dim bolTemp As Boolean = False

Try

strSQL = "SELECT usr_DatabaseRole " & _
"FROM tbl_Users " & _
"WHERE (usr_UserName = '" & UserName & "') " &
_
" AND (usr_Password = '" & Password &
"')"

oleConn = New OleDbConnection(strConString)
oleCmd = New OleDbCommand

oleConn.Open()

With oleCmd
.CommandText = strSQL
.CommandType = CommandType.Text
.Connection = oleConn
oleReader = .ExecuteReader
End With

While oleReader.Read
bolTemp = True
UserRole = oleReader(0)
End While

oleReader.Close()

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
Finally
oleConn.Close()
End Try

Return bolTemp

End Function

End Class

*******************************

Then the form code would look like this:

*******************************

Public Class frm_Main

Dim clsDB As New cls_AdoManager
Dim strDbRole As String = ""

Private Sub cmd_Login_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmd_Login.Click

If clsDB.ValidUser(txt_UserName.Text, txt_Password.Text) Then
strDbRole = clsDB.UserRole
Else
MsgBox("Invalid User Name or Password!",
MsgBoxStyle.Information)
End If

End Sub

End Class

********************************

I hope this gets you started. Be careful of word wrap.

Izzy
Ivan Weiss wrote:
It does seem like a class is the way to go.

The how part is simple. I am very used to VB6 and "coding as you need"
or just creating Public Subs.

How would I go about designing a class that could handle my database
connectivity.

I guess for starters I am looking to create a login form. I have an
access database with fields UserName, Password, Roles and I need to
authenticate a user to allow them access to the application.

Once I get through that, I will have enough knowledge and have the class
created so the rest of the app should be a lot easier to learn through.

I am not even sure how to get started writing that class though to
access the database.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #4
Also I didn't exactly make it clear what the connection string looks
like. I'm using VS 2005 which has the My.Settings XML settings file. VS
2003 does something slightly different.

The connection string should look like this:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db1.mdb;User
Id=admin;Password=;

or my favorite place to go for connection strings is:

http://www.connectionstrings.com/
Izzy wrote:
Here ya go Ivan, this will get you started.

There is probably 10 different ways to write this, I like this method:

*************************************
Imports System.Data.OleDb

Public Class cls_AdoManager

Private strConString As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
My.Settings.DatabasePath & My.Settings.DatabaseName & ";User
Id=admin;Password=;"
Private oleCmd As OleDbCommand
Private oleConn As OleDbConnection
Private oleReader As OleDbDataReader
Private strUserRole As String = ""
Private strSQL As String = ""

Public Property UserRole() As String
Get
Return strUserRole
End Get
Set(ByVal value As String)
strUserRole = value
End Set
End Property

Public Function ValidUser(ByVal UserName As String, ByVal Password
As String) As Boolean

Dim bolTemp As Boolean = False

Try

strSQL = "SELECT usr_DatabaseRole " & _
"FROM tbl_Users " & _
"WHERE (usr_UserName = '" & UserName & "') " &
_
" AND (usr_Password = '" & Password &
"')"

oleConn = New OleDbConnection(strConString)
oleCmd = New OleDbCommand

oleConn.Open()

With oleCmd
.CommandText = strSQL
.CommandType = CommandType.Text
.Connection = oleConn
oleReader = .ExecuteReader
End With

While oleReader.Read
bolTemp = True
UserRole = oleReader(0)
End While

oleReader.Close()

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
Finally
oleConn.Close()
End Try

Return bolTemp

End Function

End Class

*******************************

Then the form code would look like this:

*******************************

Public Class frm_Main

Dim clsDB As New cls_AdoManager
Dim strDbRole As String = ""

Private Sub cmd_Login_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmd_Login.Click

If clsDB.ValidUser(txt_UserName.Text, txt_Password.Text) Then
strDbRole = clsDB.UserRole
Else
MsgBox("Invalid User Name or Password!",
MsgBoxStyle.Information)
End If

End Sub

End Class

********************************

I hope this gets you started. Be careful of word wrap.

Izzy
Ivan Weiss wrote:
It does seem like a class is the way to go.

The how part is simple. I am very used to VB6 and "coding as you need"
or just creating Public Subs.

How would I go about designing a class that could handle my database
connectivity.

I guess for starters I am looking to create a login form. I have an
access database with fields UserName, Password, Roles and I need to
authenticate a user to allow them access to the application.

Once I get through that, I will have enough knowledge and have the class
created so the rest of the app should be a lot easier to learn through.

I am not even sure how to get started writing that class though to
access the database.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #5
Izzy,

Thanks so much for posting all of that. I am going to load it in and go
through it with a fine tooth comb to make sure I see what you are doing
(not a problem for me).

However, I thought the approach would be different and correct me if I
am right or wrong from a general programming with OOP sense.

I had thought the approach would be to make a User object and have that
user have various methods such as validate, authenticate, etc... Am I
reading too much into the OOP approach? I just figured any object
(person or item) should be separated by a class but like I said this is
new to me.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #6
Are you using Access to store sensitive information? If so Access is
very easy to break into, a quick google search will return a few
different methods - just a warning. Anyway, depending on what you're
using the db for you might try to convince them to upgrade to SQL
Server. (This is especially true for things required by the Sarbanes
Oxley laws, in my experience the auditors don't like hearing this info
is stored in Access). Anyways, you might look into some mild encryption
routines to use on the sensitive tables, or at least on the user table.
Let us know if need anything else.

Thanks,

Seth Rowe

Izzy wrote:
Also I didn't exactly make it clear what the connection string looks
like. I'm using VS 2005 which has the My.Settings XML settings file. VS
2003 does something slightly different.

The connection string should look like this:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db1.mdb;User
Id=admin;Password=;

or my favorite place to go for connection strings is:

http://www.connectionstrings.com/
Izzy wrote:
Here ya go Ivan, this will get you started.

There is probably 10 different ways to write this, I like this method:

*************************************
Imports System.Data.OleDb

Public Class cls_AdoManager

Private strConString As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
My.Settings.DatabasePath & My.Settings.DatabaseName & ";User
Id=admin;Password=;"
Private oleCmd As OleDbCommand
Private oleConn As OleDbConnection
Private oleReader As OleDbDataReader
Private strUserRole As String = ""
Private strSQL As String = ""

Public Property UserRole() As String
Get
Return strUserRole
End Get
Set(ByVal value As String)
strUserRole = value
End Set
End Property

Public Function ValidUser(ByVal UserName As String, ByVal Password
As String) As Boolean

Dim bolTemp As Boolean = False

Try

strSQL = "SELECT usr_DatabaseRole " & _
"FROM tbl_Users " & _
"WHERE (usr_UserName = '" & UserName & "') " &
_
" AND (usr_Password = '" & Password &
"')"

oleConn = New OleDbConnection(strConString)
oleCmd = New OleDbCommand

oleConn.Open()

With oleCmd
.CommandText = strSQL
.CommandType = CommandType.Text
.Connection = oleConn
oleReader = .ExecuteReader
End With

While oleReader.Read
bolTemp = True
UserRole = oleReader(0)
End While

oleReader.Close()

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
Finally
oleConn.Close()
End Try

Return bolTemp

End Function

End Class

*******************************

Then the form code would look like this:

*******************************

Public Class frm_Main

Dim clsDB As New cls_AdoManager
Dim strDbRole As String = ""

Private Sub cmd_Login_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmd_Login.Click

If clsDB.ValidUser(txt_UserName.Text, txt_Password.Text) Then
strDbRole = clsDB.UserRole
Else
MsgBox("Invalid User Name or Password!",
MsgBoxStyle.Information)
End If

End Sub

End Class

********************************

I hope this gets you started. Be careful of word wrap.

Izzy
Ivan Weiss wrote:
It does seem like a class is the way to go.
>
The how part is simple. I am very used to VB6 and "coding as you need"
or just creating Public Subs.
>
How would I go about designing a class that could handle my database
connectivity.
>
I guess for starters I am looking to create a login form. I have an
access database with fields UserName, Password, Roles and I need to
authenticate a user to allow them access to the application.
>
Once I get through that, I will have enough knowledge and have the class
created so the rest of the app should be a lot easier to learn through.
>
I am not even sure how to get started writing that class though to
access the database.
>
-Ivan
>
*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #7
Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #8
It is an access database. Ultimately we might upgrade but for starters
this is a side project I am expecting to take a long time to write and
will only be used by in office personnel (about 30 people). It will not
contain any sensitive information such as payroll or social security. I
basically want to initially create an order entry system so that
salesmen have a history of orders by their accounts. Ultimately I want
it to grow into project management and other features but one giant leap
at a time lol

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #9
>It will not contain any sensitive information such as payroll or social security

Good to here! It sounds like a great project to get your feet wet in
VB.NET. Have fun with the new language features!

Thanks,

Seth Rowe
Ivan Weiss wrote:
It is an access database. Ultimately we might upgrade but for starters
this is a side project I am expecting to take a long time to write and
will only be used by in office personnel (about 30 people). It will not
contain any sensitive information such as payroll or social security. I
basically want to initially create an order entry system so that
salesmen have a history of orders by their accounts. Ultimately I want
it to grow into project management and other features but one giant leap
at a time lol

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #10
GS
great if the order history contains no personal nor credit info?
"Ivan Weiss" <iv********@elitefse.comwrote in message
news:eJ**************@TK2MSFTNGP06.phx.gbl...
It is an access database. Ultimately we might upgrade but for starters
this is a side project I am expecting to take a long time to write and
will only be used by in office personnel (about 30 people). It will not
contain any sensitive information such as payroll or social security. I
basically want to initially create an order entry system so that
salesmen have a history of orders by their accounts. Ultimately I want
it to grow into project management and other features but one giant leap
at a time lol

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***

Sep 22 '06 #11
Ivan,

Use this, not primary to use it, but as template how ADONET is working.

I hope this helps,

Cor

"Ivan Weiss" <iv********@elitefse.comschreef in bericht
news:O1**************@TK2MSFTNGP05.phx.gbl...
Hi all,

I am just getting started on a new app and am a rusty VB6 guy who is
looking to create something on the side to serve as a corporate
workbench for my company.

ADO.net is new to me so I have some books and need to do some learning
but I am seeing a few different ways to get started.

Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.

I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***

Sep 22 '06 #12
Hay Ivan,

Sorry for the late response.

Yes you could make an object out of the user like you described. What I
sent, I just wrote to give you a brief overview of ADO.NET, and how you
could query an Access file.

The connection to the database is closed when I called the "Finally"
method of the Try statement. Even if an error occurs the database
connection gets closed.

This way regardless of weather the user was able to login or not the
connection was closed. Plus I wanted you to see how error handling is
different from VB6.

And yes destroying objects when they are no longer needed is good.

Have fun,

Izzy

Ivan Weiss wrote:
Izzy,

Thanks so much for posting all of that. I am going to load it in and go
through it with a fine tooth comb to make sure I see what you are doing
(not a problem for me).

However, I thought the approach would be different and correct me if I
am right or wrong from a general programming with OOP sense.

I had thought the approach would be to make a User object and have that
user have various methods such as validate, authenticate, etc... Am I
reading too much into the OOP approach? I just figured any object
(person or item) should be separated by a class but like I said this is
new to me.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #13
Something to remember is when you destroy an object the memory doesn't
get released back to the OS instantly. It's not until the GC (garbage
collector) comes along and cleans up any unused resources.

I've had instances where I had to tell the garbage collecter to run
manually: gc.Collect()

You'll need that at some point.

Additionally Seth was right, passwords should be encrypted when stored
in an Access file. I have a routine for that too, it will encrypt it
with 128bit encryption then store it in the Access file. I didn't write
and I can't remember who did.

But if you want it I'll post it for you.

Izzy

Ivan Weiss wrote:
Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 22 '06 #14
Izzy,

Id be interested in that 128 bit encryption - just to see how you do it. -
If you wouldnt mind.

Ivan,
I am in the same boat you are, just started learning vb.net
My code is probably all over the place. I started one step behind and
create my access table with adox.
There isnt much info out there. If you need something like that, let me
know. I found some good examples out there,
but were super hard to find.

Miro

"Izzy" <is************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Something to remember is when you destroy an object the memory doesn't
get released back to the OS instantly. It's not until the GC (garbage
collector) comes along and cleans up any unused resources.

I've had instances where I had to tell the garbage collecter to run
manually: gc.Collect()

You'll need that at some point.

Additionally Seth was right, passwords should be encrypted when stored
in an Access file. I have a routine for that too, it will encrypt it
with 128bit encryption then store it in the Access file. I didn't write
and I can't remember who did.

But if you want it I'll post it for you.

Izzy

Ivan Weiss wrote:
>Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***

Sep 23 '06 #15
Will post the encryption code on Monday, I don't remember who wrote,
but it works great. I use it to store passwords in an access table.

Check back Monday after 8AM Central Time.

Izzy
Miro wrote:
Izzy,

Id be interested in that 128 bit encryption - just to see how you do it. -
If you wouldnt mind.

Ivan,
I am in the same boat you are, just started learning vb.net
My code is probably all over the place. I started one step behind and
create my access table with adox.
There isnt much info out there. If you need something like that, let me
know. I found some good examples out there,
but were super hard to find.

Miro

"Izzy" <is************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Something to remember is when you destroy an object the memory doesn't
get released back to the OS instantly. It's not until the GC (garbage
collector) comes along and cleans up any unused resources.

I've had instances where I had to tell the garbage collecter to run
manually: gc.Collect()

You'll need that at some point.

Additionally Seth was right, passwords should be encrypted when stored
in an Access file. I have a routine for that too, it will encrypt it
with 128bit encryption then store it in the Access file. I didn't write
and I can't remember who did.

But if you want it I'll post it for you.

Izzy

Ivan Weiss wrote:
Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 23 '06 #16
Thanks Izzy,
Dont look too hard for it,

I created my own "encryption array" and flush out certain chars with others
depending on what value it links up to
with my encryption table.

Just wondering if there is an easier way. :)

I have a work around though.

Example ( and keep in mind that i have all the alphabet here )
EncryptionKey1 = { A, C, B, D, E, .... }
EncryptionKey2 = { C, D, B, A, E, .... ) 'includes all letters upper and
lower, and also some ascii chars.
and so on ..

Basically if I have a Password that allows for a length of 10. I actually
store the database as an 11 char field and the first
char is a 123...
If I have the #2 stored in that field and and A was in the pword, then it
gets replaced with a letter C.
If its a B, a D gets put in its spot, and an E, ( in this case stays as an
E )

I select a random number from 1 to how many encryption keys i have and thats
the one i use to encrypt it.
Whenever I have to write to the database and I de-crypt it, I re-encrypt it
with a different Encryption key.

Its simple, and with 30 encryption keys, it does its job.
Any letters that are not in the Encryption key or something like a special
char, doesnt get convrted and stays as is.

M.

"Izzy" <is************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Will post the encryption code on Monday, I don't remember who wrote,
but it works great. I use it to store passwords in an access table.

Check back Monday after 8AM Central Time.

Izzy
Miro wrote:
>Izzy,

Id be interested in that 128 bit encryption - just to see how you do
it. -
If you wouldnt mind.

Ivan,
I am in the same boat you are, just started learning vb.net
My code is probably all over the place. I started one step behind and
create my access table with adox.
There isnt much info out there. If you need something like that, let me
know. I found some good examples out there,
but were super hard to find.

Miro

"Izzy" <is************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googleg roups.com...
Something to remember is when you destroy an object the memory doesn't
get released back to the OS instantly. It's not until the GC (garbage
collector) comes along and cleans up any unused resources.

I've had instances where I had to tell the garbage collecter to run
manually: gc.Collect()

You'll need that at some point.

Additionally Seth was right, passwords should be encrypted when stored
in an Access file. I have a routine for that too, it will encrypt it
with 128bit encryption then store it in the Access file. I didn't write
and I can't remember who did.

But if you want it I'll post it for you.

Izzy

Ivan Weiss wrote:
Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database
connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***

Sep 24 '06 #17
Here it is, I have no idea how it works, but it works great. I use it
to encrypt passwords stored in an access file.

To call it:

'This will encrypt a value
Variable = EncryptString128Bit(txt_Password.Text, EncryptionKey)

'This will decrypt a value
Variable = DecryptString128Bit([Password stored in DB goes here],
EncryptionKey)

Have fun,
Izzy

************************************************** **************************

Imports System.Security.Cryptography
Imports System.Text

Module mod_Globals

Public EncryptionKey As String = "justsomewordstobeusedasacryptionkey"

Public Function EncryptString128Bit(ByVal vstrTextToBeEncrypted As
String, ByVal vstrEncryptionKey As String) As String

Dim bytValue() As Byte
Dim bytKey() As Byte
Dim bytEncoded() As Byte
Dim bytIV() As Byte = {121, 241, 10, 1, 132, 74, 11, 39, 255,
91, 45, 78, 14, 211, 22, 62}
Dim intLength As Integer
Dim intRemaining As Integer
Dim objMemoryStream As New MemoryStream
Dim objCryptoStream As CryptoStream
Dim objRijndaelManaged As RijndaelManaged

vstrTextToBeEncrypted =
StripNullCharacters(vstrTextToBeEncrypted)

bytValue =
Encoding.ASCII.GetBytes(vstrTextToBeEncrypted.ToCh arArray)

intLength = Len(vstrEncryptionKey)

If intLength >= 32 Then
vstrEncryptionKey = Strings.Left(vstrEncryptionKey, 32)
Else
intLength = Len(vstrEncryptionKey)
intRemaining = 32 - intLength
vstrEncryptionKey = vstrEncryptionKey &
Strings.StrDup(intRemaining, "X")
End If

bytKey = Encoding.ASCII.GetBytes(vstrEncryptionKey.ToCharAr ray)

objRijndaelManaged = New RijndaelManaged

Try
objCryptoStream = New CryptoStream(objMemoryStream,
objRijndaelManaged.CreateEncryptor(bytKey, bytIV),
CryptoStreamMode.Write)
objCryptoStream.Write(bytValue, 0, bytValue.Length)
objCryptoStream.FlushFinalBlock()
bytEncoded = objMemoryStream.ToArray
objMemoryStream.Close()
objCryptoStream.Close()
Catch

End Try

Return Convert.ToBase64String(bytEncoded)

End Function

Public Function DecryptString128Bit(ByVal vstrStringToBeDecrypted
As String, ByVal vstrDecryptionKey As String) As String

Dim bytDataToBeDecrypted() As Byte
Dim bytTemp() As Byte
Dim bytIV() As Byte = {121, 241, 10, 1, 132, 74, 11, 39, 255,
91, 45, 78, 14, 211, 22, 62}
Dim objRijndaelManaged As New RijndaelManaged
Dim objMemoryStream As MemoryStream
Dim objCryptoStream As CryptoStream
Dim bytDecryptionKey() As Byte
Dim intLength As Integer
Dim intRemaining As Integer
Dim intCtr As Integer
Dim strReturnString As String = String.Empty
Dim achrCharacterArray() As Char
Dim intIndex As Integer

bytDataToBeDecrypted =
Convert.FromBase64String(vstrStringToBeDecrypted)

intLength = Len(vstrDecryptionKey)

If intLength >= 32 Then
vstrDecryptionKey = Strings.Left(vstrDecryptionKey, 32)
Else
intLength = Len(vstrDecryptionKey)
intRemaining = 32 - intLength
vstrDecryptionKey = vstrDecryptionKey &
Strings.StrDup(intRemaining, "X")
End If

bytDecryptionKey =
Encoding.ASCII.GetBytes(vstrDecryptionKey.ToCharAr ray)

ReDim bytTemp(bytDataToBeDecrypted.Length)

objMemoryStream = New MemoryStream(bytDataToBeDecrypted)

Try

objCryptoStream = New CryptoStream(objMemoryStream,
objRijndaelManaged.CreateDecryptor(bytDecryptionKe y, bytIV),
CryptoStreamMode.Read)
objCryptoStream.Read(bytTemp, 0, bytTemp.Length)
objCryptoStream.FlushFinalBlock()
objMemoryStream.Close()
objCryptoStream.Close()

Catch

End Try

Return StripNullCharacters(Encoding.ASCII.GetString(bytTe mp))

End Function
Public Function StripNullCharacters(ByVal vstrStringWithNulls As
String) As String

Dim intPosition As Integer
Dim strStringWithOutNulls As String

intPosition = 1
strStringWithOutNulls = vstrStringWithNulls

Do While intPosition 0
intPosition = InStr(intPosition, vstrStringWithNulls,
vbNullChar)

If intPosition 0 Then
strStringWithOutNulls = Left$(strStringWithOutNulls,
intPosition - 1) & _
Right$(strStringWithOutNulls,
Len(strStringWithOutNulls) - intPosition)
End If

If intPosition strStringWithOutNulls.Length Then
Exit Do
End If
Loop

Return strStringWithOutNulls

End Function

End Module

************************************************** **************************************

Miro wrote:
Thanks Izzy,
Dont look too hard for it,

I created my own "encryption array" and flush out certain chars with others
depending on what value it links up to
with my encryption table.

Just wondering if there is an easier way. :)

I have a work around though.

Example ( and keep in mind that i have all the alphabet here )
EncryptionKey1 = { A, C, B, D, E, .... }
EncryptionKey2 = { C, D, B, A, E, .... ) 'includes all letters upper and
lower, and also some ascii chars.
and so on ..

Basically if I have a Password that allows for a length of 10. I actually
store the database as an 11 char field and the first
char is a 123...
If I have the #2 stored in that field and and A was in the pword, then it
gets replaced with a letter C.
If its a B, a D gets put in its spot, and an E, ( in this case stays as an
E )

I select a random number from 1 to how many encryption keys i have and thats
the one i use to encrypt it.
Whenever I have to write to the database and I de-crypt it, I re-encrypt it
with a different Encryption key.

Its simple, and with 30 encryption keys, it does its job.
Any letters that are not in the Encryption key or something like a special
char, doesnt get convrted and stays as is.

M.

"Izzy" <is************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Will post the encryption code on Monday, I don't remember who wrote,
but it works great. I use it to store passwords in an access table.

Check back Monday after 8AM Central Time.

Izzy
Miro wrote:
Izzy,

Id be interested in that 128 bit encryption - just to see how you do
it. -
If you wouldnt mind.

Ivan,
I am in the same boat you are, just started learning vb.net
My code is probably all over the place. I started one step behind and
create my access table with adox.
There isnt much info out there. If you need something like that, let me
know. I found some good examples out there,
but were super hard to find.

Miro

"Izzy" <is************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Something to remember is when you destroy an object the memory doesn't
get released back to the OS instantly. It's not until the GC (garbage
collector) comes along and cleans up any unused resources.

I've had instances where I had to tell the garbage collecter to run
manually: gc.Collect()

You'll need that at some point.

Additionally Seth was right, passwords should be encrypted when stored
in an Access file. I have a routine for that too, it will encrypt it
with 128bit encryption then store it in the Access file. I didn't write
and I can't remember who did.

But if you want it I'll post it for you.

Izzy

Ivan Weiss wrote:
Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database
connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 25 '06 #18
Looks like something simillar to what I wrote....... NOT!!! :-)

Thanks... I will be going back to the old code sometime at the end of this
week or early next week once I finish something up what Im doing now and
give her a run. I gotta fix up my Icon/Graphic mess I have created myself.

I will probably have a comment somewhere in there
'Encrypt data 128 bits - it just works ;-)

Thanks agian,

Miro
"Izzy" <is************@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Here it is, I have no idea how it works, but it works great. I use it
to encrypt passwords stored in an access file.

To call it:

'This will encrypt a value
Variable = EncryptString128Bit(txt_Password.Text, EncryptionKey)

'This will decrypt a value
Variable = DecryptString128Bit([Password stored in DB goes here],
EncryptionKey)

Have fun,
Izzy

************************************************** **************************

Imports System.Security.Cryptography
Imports System.Text

Module mod_Globals

Public EncryptionKey As String = "justsomewordstobeusedasacryptionkey"

Public Function EncryptString128Bit(ByVal vstrTextToBeEncrypted As
String, ByVal vstrEncryptionKey As String) As String

Dim bytValue() As Byte
Dim bytKey() As Byte
Dim bytEncoded() As Byte
Dim bytIV() As Byte = {121, 241, 10, 1, 132, 74, 11, 39, 255,
91, 45, 78, 14, 211, 22, 62}
Dim intLength As Integer
Dim intRemaining As Integer
Dim objMemoryStream As New MemoryStream
Dim objCryptoStream As CryptoStream
Dim objRijndaelManaged As RijndaelManaged

vstrTextToBeEncrypted =
StripNullCharacters(vstrTextToBeEncrypted)

bytValue =
Encoding.ASCII.GetBytes(vstrTextToBeEncrypted.ToCh arArray)

intLength = Len(vstrEncryptionKey)

If intLength >= 32 Then
vstrEncryptionKey = Strings.Left(vstrEncryptionKey, 32)
Else
intLength = Len(vstrEncryptionKey)
intRemaining = 32 - intLength
vstrEncryptionKey = vstrEncryptionKey &
Strings.StrDup(intRemaining, "X")
End If

bytKey = Encoding.ASCII.GetBytes(vstrEncryptionKey.ToCharAr ray)

objRijndaelManaged = New RijndaelManaged

Try
objCryptoStream = New CryptoStream(objMemoryStream,
objRijndaelManaged.CreateEncryptor(bytKey, bytIV),
CryptoStreamMode.Write)
objCryptoStream.Write(bytValue, 0, bytValue.Length)
objCryptoStream.FlushFinalBlock()
bytEncoded = objMemoryStream.ToArray
objMemoryStream.Close()
objCryptoStream.Close()
Catch

End Try

Return Convert.ToBase64String(bytEncoded)

End Function

Public Function DecryptString128Bit(ByVal vstrStringToBeDecrypted
As String, ByVal vstrDecryptionKey As String) As String

Dim bytDataToBeDecrypted() As Byte
Dim bytTemp() As Byte
Dim bytIV() As Byte = {121, 241, 10, 1, 132, 74, 11, 39, 255,
91, 45, 78, 14, 211, 22, 62}
Dim objRijndaelManaged As New RijndaelManaged
Dim objMemoryStream As MemoryStream
Dim objCryptoStream As CryptoStream
Dim bytDecryptionKey() As Byte
Dim intLength As Integer
Dim intRemaining As Integer
Dim intCtr As Integer
Dim strReturnString As String = String.Empty
Dim achrCharacterArray() As Char
Dim intIndex As Integer

bytDataToBeDecrypted =
Convert.FromBase64String(vstrStringToBeDecrypted)

intLength = Len(vstrDecryptionKey)

If intLength >= 32 Then
vstrDecryptionKey = Strings.Left(vstrDecryptionKey, 32)
Else
intLength = Len(vstrDecryptionKey)
intRemaining = 32 - intLength
vstrDecryptionKey = vstrDecryptionKey &
Strings.StrDup(intRemaining, "X")
End If

bytDecryptionKey =
Encoding.ASCII.GetBytes(vstrDecryptionKey.ToCharAr ray)

ReDim bytTemp(bytDataToBeDecrypted.Length)

objMemoryStream = New MemoryStream(bytDataToBeDecrypted)

Try

objCryptoStream = New CryptoStream(objMemoryStream,
objRijndaelManaged.CreateDecryptor(bytDecryptionKe y, bytIV),
CryptoStreamMode.Read)
objCryptoStream.Read(bytTemp, 0, bytTemp.Length)
objCryptoStream.FlushFinalBlock()
objMemoryStream.Close()
objCryptoStream.Close()

Catch

End Try

Return StripNullCharacters(Encoding.ASCII.GetString(bytTe mp))

End Function
Public Function StripNullCharacters(ByVal vstrStringWithNulls As
String) As String

Dim intPosition As Integer
Dim strStringWithOutNulls As String

intPosition = 1
strStringWithOutNulls = vstrStringWithNulls

Do While intPosition 0
intPosition = InStr(intPosition, vstrStringWithNulls,
vbNullChar)

If intPosition 0 Then
strStringWithOutNulls = Left$(strStringWithOutNulls,
intPosition - 1) & _
Right$(strStringWithOutNulls,
Len(strStringWithOutNulls) - intPosition)
End If

If intPosition strStringWithOutNulls.Length Then
Exit Do
End If
Loop

Return strStringWithOutNulls

End Function

End Module

************************************************** **************************************

Miro wrote:
>Thanks Izzy,
Dont look too hard for it,

I created my own "encryption array" and flush out certain chars with
others
depending on what value it links up to
with my encryption table.

Just wondering if there is an easier way. :)

I have a work around though.

Example ( and keep in mind that i have all the alphabet here )
EncryptionKey1 = { A, C, B, D, E, .... }
EncryptionKey2 = { C, D, B, A, E, .... ) 'includes all letters upper and
lower, and also some ascii chars.
and so on ..

Basically if I have a Password that allows for a length of 10. I
actually
store the database as an 11 char field and the first
char is a 123...
If I have the #2 stored in that field and and A was in the pword, then it
gets replaced with a letter C.
If its a B, a D gets put in its spot, and an E, ( in this case stays as
an
E )

I select a random number from 1 to how many encryption keys i have and
thats
the one i use to encrypt it.
Whenever I have to write to the database and I de-crypt it, I re-encrypt
it
with a different Encryption key.

Its simple, and with 30 encryption keys, it does its job.
Any letters that are not in the Encryption key or something like a
special
char, doesnt get convrted and stays as is.

M.

"Izzy" <is************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googleg roups.com...
Will post the encryption code on Monday, I don't remember who wrote,
but it works great. I use it to store passwords in an access table.

Check back Monday after 8AM Central Time.

Izzy
Miro wrote:
Izzy,

Id be interested in that 128 bit encryption - just to see how you do
it. -
If you wouldnt mind.

Ivan,
I am in the same boat you are, just started learning vb.net
My code is probably all over the place. I started one step behind and
create my access table with adox.
There isnt much info out there. If you need something like that, let
me
know. I found some good examples out there,
but were super hard to find.

Miro

"Izzy" <is************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googleg roups.com...
Something to remember is when you destroy an object the memory
doesn't
get released back to the OS instantly. It's not until the GC
(garbage
collector) comes along and cleans up any unused resources.

I've had instances where I had to tell the garbage collecter to run
manually: gc.Collect()

You'll need that at some point.

Additionally Seth was right, passwords should be encrypted when
stored
in an Access file. I have a routine for that too, it will encrypt it
with 128bit encryption then store it in the Access file. I didn't
write
and I can't remember who did.

But if you want it I'll post it for you.

Izzy

Ivan Weiss wrote:
Izzy, another question.

Wouldnt you need to destroy the object or dispose of it or anything
after utilizing? Or will all resources be freed and database
connection
be closed automatically once the functions run?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***


Sep 25 '06 #19
you would be better off using Access Data Projects and SQL Server.

VB.net has a negative ROI.

Access Data Projects; things are SOOOOOO much easier


Ivan Weiss wrote:
Izzy,

Thanks so much for posting all of that. I am going to load it in and go
through it with a fine tooth comb to make sure I see what you are doing
(not a problem for me).

However, I thought the approach would be different and correct me if I
am right or wrong from a general programming with OOP sense.

I had thought the approach would be to make a User object and have that
user have various methods such as validate, authenticate, etc... Am I
reading too much into the OOP approach? I just figured any object
(person or item) should be separated by a class but like I said this is
new to me.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 26 '06 #20
VB.net has a negative ROI.

By ROI I assume you mean return on investment? If so on what are you
basing this on?
Access Data Projects; things are SOOOOOO much easier
In my opinion ADPs are not nearly as powerful or as secure as a .Net
solution. Also, using ADPs limits you to SQL Server, limiting which
database systems you could use in the future. (As from what I
understand, the OP's company isn't using SQL Server and may prefer a
different db solution like Oracle).
Some other big benefits of using .Net over Access is the that Access
isn't required on each computer, and you have the option to devolop
solutions on mobile devices.

So Ivan, just remember to think about what the project might devolop
into, and don't limit yourself to a certain set up.

Thanks,

Seth Rowe

Learning VB.Net also means that you don't
aa*********@gmail.com wrote:
you would be better off using Access Data Projects and SQL Server.

VB.net has a negative ROI.

Access Data Projects; things are SOOOOOO much easier


Ivan Weiss wrote:
Izzy,

Thanks so much for posting all of that. I am going to load it in and go
through it with a fine tooth comb to make sure I see what you are doing
(not a problem for me).

However, I thought the approach would be different and correct me if I
am right or wrong from a general programming with OOP sense.

I had thought the approach would be to make a User object and have that
user have various methods such as validate, authenticate, etc... Am I
reading too much into the OOP approach? I just figured any object
(person or item) should be separated by a class but like I said this is
new to me.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Sep 26 '06 #21
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
Access Data Projects; things are SOOOOOO much easier
And harder to maintain too.
Sep 26 '06 #22
"rowe_newsgroups" <ro********@yahoo.comwrote in
news:11**********************@m73g2000cwd.googlegr oups.com:
>VB.net has a negative ROI.

By ROI I assume you mean return on investment? If so on what are you
basing this on?
Don't mind Aaron Kemp - I think he's the nutcase of the group ; )
Sep 26 '06 #23
Ivan Weiss <iv********@elitefse.comwrote in news:O1qwWoc3GHA.2096
@TK2MSFTNGP05.phx.gbl:
Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.

I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?
Check out LLBLGen for your data layer - they basically provide .NET 3.0
LINQ, OR/M features now ;-)
Sep 26 '06 #24
BS; harder to maintain?
You keep everything in one place!!!

well shit let me just come out and say that .NET causes AIDS.

no facts; i'll just run out and make a claim; ok?

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
Access Data Projects; things are SOOOOOO much easier

And harder to maintain too.
Sep 26 '06 #25
re:
In my opinion ADPs are not nearly as powerful or as secure as a .Net
solution. Also, using ADPs limits you to SQL Server, limiting which
database systems you could use in the future. (As from what I
understand, the OP's company isn't using SQL Server and may prefer a
different db solution like Oracle).
Some other big benefits of using .Net over Access is the that Access
isn't required on each computer, and you have the option to devolop
solutions on mobile devices.
your opinion is wrong.

ADP limits you to SQL Server? SQL Server rules the roost; you're a
fucking idiot if you haven't looked at tpc.org in the past decade.

and you're really; honestly going to use a toolset that takes 3 times
as long; just so that you can put it on a PDA?

get a fucking clue; kids

Mobile is worthless.

ADP runs circles around you kids.

And he should take his Access experience and apply it to Access Data
Projects.

I would rather use a CSV file than MDB.

-Aaron
rowe_newsgroups wrote:
VB.net has a negative ROI.

By ROI I assume you mean return on investment? If so on what are you
basing this on?
Access Data Projects; things are SOOOOOO much easier

In my opinion ADPs are not nearly as powerful or as secure as a .Net
solution. Also, using ADPs limits you to SQL Server, limiting which
database systems you could use in the future. (As from what I
understand, the OP's company isn't using SQL Server and may prefer a
different db solution like Oracle).
Some other big benefits of using .Net over Access is the that Access
isn't required on each computer, and you have the option to devolop
solutions on mobile devices.

So Ivan, just remember to think about what the project might devolop
into, and don't limit yourself to a certain set up.

Thanks,

Seth Rowe

Learning VB.Net also means that you don't
aa*********@gmail.com wrote:
you would be better off using Access Data Projects and SQL Server.

VB.net has a negative ROI.

Access Data Projects; things are SOOOOOO much easier


Ivan Weiss wrote:
Izzy,
>
Thanks so much for posting all of that. I am going to load it in and go
through it with a fine tooth comb to make sure I see what you are doing
(not a problem for me).
>
However, I thought the approach would be different and correct me if I
am right or wrong from a general programming with OOP sense.
>
I had thought the approach would be to make a User object and have that
user have various methods such as validate, authenticate, etc... Am I
reading too much into the OOP approach? I just figured any object
(person or item) should be separated by a class but like I said this is
new to me.
>
-Ivan
>
*** Sent via Developersdex http://www.developersdex.com ***
Sep 26 '06 #26
Aaron,

You really should stick with the Access group, you're in love with
Access and completely blinded by love.

It's fine, and sometimes your actually even helpful there.

People who post questions in the .NET group really don't benefit from
your input. They are not going to convert to ADP just because Aaron
says so. You need to go lay on someone's couch and talk about your
frustrations.

Izzy
aa*********@gmail.com wrote:
BS; harder to maintain?
You keep everything in one place!!!

well shit let me just come out and say that .NET causes AIDS.

no facts; i'll just run out and make a claim; ok?

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
Access Data Projects; things are SOOOOOO much easier
And harder to maintain too.
Sep 28 '06 #27
well the kid was talking about using access.

fucking jackass; nobody should use the MDB file format for ANYTHING.
It's not scalable; its not reliable.

It's almost as bad as using Excel.

If he's a friggin loser that uses Access MDB as a database; he might as
well be using Access forms and reports.

-Aaron

Izzy wrote:
Aaron,

You really should stick with the Access group, you're in love with
Access and completely blinded by love.

It's fine, and sometimes your actually even helpful there.

People who post questions in the .NET group really don't benefit from
your input. They are not going to convert to ADP just because Aaron
says so. You need to go lay on someone's couch and talk about your
frustrations.

Izzy
aa*********@gmail.com wrote:
BS; harder to maintain?
You keep everything in one place!!!

well shit let me just come out and say that .NET causes AIDS.

no facts; i'll just run out and make a claim; ok?

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
>
Access Data Projects; things are SOOOOOO much easier
>
And harder to maintain too.
Sep 28 '06 #28
oh YAH

LINQ, OR/M

It would help if you knew how to use SQL Server you friggin jackasses
If you're looking for an easy solution to a real database-- use Access
Data Projects.

I can out develop any of you .NET kids on performance, features, price
and performance.

-Aaron
Spam Catcher wrote:
Ivan Weiss <iv********@elitefse.comwrote in news:O1qwWoc3GHA.2096
@TK2MSFTNGP05.phx.gbl:
Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.

I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?

Check out LLBLGen for your data layer - they basically provide .NET 3.0
LINQ, OR/M features now ;-)
Sep 28 '06 #29
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11********************@i42g2000cwa.googlegrou ps.com:
It would help if you knew how to use SQL Server you friggin jackasses
If you're looking for an easy solution to a real database-- use Access
Data Projects.

I can out develop any of you .NET kids on performance, features, price
and performance.
Why rewrite the data layer EVERY time?

Not to mention you'll make mistakes in the SQL - (generated) data access
layer save you from all the hassles.

You still need to know how T-SQL, SQL Server, and Database design ... but
OR/M mappers save you the mundane chore of filling data objects :)
Sep 29 '06 #30
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@i42g2000cwa.googlegr oups.com:
fucking jackass; nobody should use the MDB file format for ANYTHING.
It's not scalable; its not reliable.
No need to swear! I've read what you post... and a lot of it make sense -
but you come on too aggressively.

Yes, MDB sucks for the most part... but there are situations were it does
make sense - for example small desktop apps that need localized storage. Of
course no one in their sane mind should use MDBs for enterprise/scalable
apps.
If he's a friggin loser that uses Access MDB as a database; he might as
well be using Access forms and reports.
:-)
Sep 29 '06 #31
rewrite the data layer? ROFL

use client-server not 3-tier dude

you're bitching that 'everyone makes mistakes in sql' but i sure
friggin dont make mistakes in sql.

why would you spend 90% of your time writing code that is 3 times as
verbose as what it takes in Access Data Projects

I can out develop you kids; you kids should stop taking marketing crap
to heart and get some real-world experience.

OR/M?

i mean seriously.

WTF are you talking about jackass

Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11********************@i42g2000cwa.googlegrou ps.com:
It would help if you knew how to use SQL Server you friggin jackasses
If you're looking for an easy solution to a real database-- use Access
Data Projects.

I can out develop any of you .NET kids on performance, features, price
and performance.

Why rewrite the data layer EVERY time?

Not to mention you'll make mistakes in the SQL - (generated) data access
layer save you from all the hassles.

You still need to know how T-SQL, SQL Server, and Database design ... but
OR/M mappers save you the mundane chore of filling data objects :)
Sep 29 '06 #32
small desktop apps that need local storage?

lose the training wheels; bud

why do people NEED local storage?

it's the stupidest idea ever.

give people SQL on the desktop if you MUST lol
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@i42g2000cwa.googlegr oups.com:
fucking jackass; nobody should use the MDB file format for ANYTHING.
It's not scalable; its not reliable.

No need to swear! I've read what you post... and a lot of it make sense -
but you come on too aggressively.

Yes, MDB sucks for the most part... but there are situations were it does
make sense - for example small desktop apps that need localized storage. Of
course no one in their sane mind should use MDBs for enterprise/scalable
apps.
If he's a friggin loser that uses Access MDB as a database; he might as
well be using Access forms and reports.

:-)
Sep 29 '06 #33
I can out develop any of you .NET kids on performance, features, price
and performance.
First learn to type good sentences and then we'll talk about
developing.

Something else you should try and grasp, when you swear and call people
names that doesn't harden your position or make it more right. It makes
you seem ignorant; therefore everything that follows is disregarded.

Wise up man!
aa*********@gmail.com wrote:
oh YAH

LINQ, OR/M

It would help if you knew how to use SQL Server you friggin jackasses
If you're looking for an easy solution to a real database-- use Access
Data Projects.

I can out develop any of you .NET kids on performance, features, price
and performance.

-Aaron
Spam Catcher wrote:
Ivan Weiss <iv********@elitefse.comwrote in news:O1qwWoc3GHA.2096
@TK2MSFTNGP05.phx.gbl:
Would you recommend going with the controls built into Visual Studio,
coding within the subs as I need them, or creating a class to handle all
of my database connectivity.
>
I am guessing a class is the best way for code re-usability but how
would I go about keeping it generic?
Check out LLBLGen for your data layer - they basically provide .NET 3.0
LINQ, OR/M features now ;-)
Sep 29 '06 #34
more importantly

why re-invent the wheels

binding forms to a database table or sproc?

INSERT, AUTOFORM, DONE.

why build OBJECTS?

i've got all the objects I need already.

Lose the training wheels; the action is in the database world; and no
amount or OR/M _CRAP_ is going to save you.

-Aaron


Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11********************@i42g2000cwa.googlegrou ps.com:
It would help if you knew how to use SQL Server you friggin jackasses
If you're looking for an easy solution to a real database-- use Access
Data Projects.

I can out develop any of you .NET kids on performance, features, price
and performance.

Why rewrite the data layer EVERY time?

Not to mention you'll make mistakes in the SQL - (generated) data access
layer save you from all the hassles.

You still need to know how T-SQL, SQL Server, and Database design ... but
OR/M mappers save you the mundane chore of filling data objects :)
Sep 29 '06 #35
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11*********************@m7g2000cwm.googlegrou ps.com:
small desktop apps that need local storage?


why do people NEED local storage?
give people SQL on the desktop if you MUST lol
What a hassle to load MSDE type engine.

Sep 29 '06 #36
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@m73g2000cwd.googlegr oups.com:
>
why build OBJECTS?

i've got all the objects I need already.

Lose the training wheels; the action is in the database world; and no
amount or OR/M _CRAP_ is going to save you.
So you build new applications? haha.
Sep 29 '06 #37
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@c28g2000cwb.googlegr oups.com:
you're bitching that 'everyone makes mistakes in sql' but i sure
friggin dont make mistakes in sql.
I guess you must be god.
Sep 29 '06 #38
what SMS or Active Friggin Directory could push it out; without any
intervention.. in probably 60 seconds

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11*********************@m7g2000cwm.googlegrou ps.com:
small desktop apps that need local storage?

why do people NEED local storage?

give people SQL on the desktop if you MUST lol

What a hassle to load MSDE type engine.
Sep 29 '06 #39
I just find it laughable.

shit; if you don't want to put MSDE on the desktop; then put it on some
unused desktop and use it for a dozen people.

definitely a better solution than hosing up a whole file-server just
because you're playing with a tool for babies.

MDB chokes networks; file servers-- MDB isn't reliable.

you're fucking retarded if you use MDB for anything.

and if you already know Access?

you can get more done; against SQL Server-- using Access Data Projects
than your red-headed stepchild of C#

Microsoft killed the most popular language in the world; get over it.
Go back to using Access.

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11*********************@m7g2000cwm.googlegrou ps.com:
small desktop apps that need local storage?

why do people NEED local storage?

give people SQL on the desktop if you MUST lol

What a hassle to load MSDE type engine.
Sep 29 '06 #40
To all,

As you can see the discussions with aa*********@gmail.com are
meaningless. It doesn't matter what you say or how you say it, we're
not going to convince him we're right. Judging from his other posts I
believe the following URL will summarize the situation:

http://en.wikipedia.org/wiki/Internet_troll

Oh, and if you don't feel like reading the entire article, read at
least this excerpt:

"For many people, the characterising feature of trolling is the
perception of intent to disrupt a community in some way. Inflammatory,
sarcastic, disruptive or humorous content is posted, meant to draw
other users into engaging the troll in a fruitless confrontation. The
greater the reaction from the community the more likely the user is to
troll again, as the person develops beliefs that certain actions
achieve his/her goal to cause chaos. This gives rise to the often
repeated protocol in Internet culture: "Do not feed the trolls.""

So in summary if you agree with me, then please stop responding to him!
It only makes things worse!

Thanks,

Seth Rowe

aa*********@gmail.com wrote:
I just find it laughable.

shit; if you don't want to put MSDE on the desktop; then put it on some
unused desktop and use it for a dozen people.

definitely a better solution than hosing up a whole file-server just
because you're playing with a tool for babies.

MDB chokes networks; file servers-- MDB isn't reliable.

you're fucking retarded if you use MDB for anything.

and if you already know Access?

you can get more done; against SQL Server-- using Access Data Projects
than your red-headed stepchild of C#

Microsoft killed the most popular language in the world; get over it.
Go back to using Access.

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11*********************@m7g2000cwm.googlegrou ps.com:
small desktop apps that need local storage?


why do people NEED local storage?
give people SQL on the desktop if you MUST lol
What a hassle to load MSDE type engine.
Sep 30 '06 #41
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@c28g2000cwb.googlegr oups.com:
what SMS or Active Friggin Directory could push it out; without any
intervention.. in probably 60 seconds
A lot of sites do not have AD or SMS.
Sep 30 '06 #42
I think Seth hit the nail on the head.

Let's banish Aaron too his own misery.

Izzy
rowe_newsgroups wrote:
To all,

As you can see the discussions with aa*********@gmail.com are
meaningless. It doesn't matter what you say or how you say it, we're
not going to convince him we're right. Judging from his other posts I
believe the following URL will summarize the situation:

http://en.wikipedia.org/wiki/Internet_troll

Oh, and if you don't feel like reading the entire article, read at
least this excerpt:

"For many people, the characterising feature of trolling is the
perception of intent to disrupt a community in some way. Inflammatory,
sarcastic, disruptive or humorous content is posted, meant to draw
other users into engaging the troll in a fruitless confrontation. The
greater the reaction from the community the more likely the user is to
troll again, as the person develops beliefs that certain actions
achieve his/her goal to cause chaos. This gives rise to the often
repeated protocol in Internet culture: "Do not feed the trolls.""

So in summary if you agree with me, then please stop responding to him!
It only makes things worse!

Thanks,

Seth Rowe

aa*********@gmail.com wrote:
I just find it laughable.

shit; if you don't want to put MSDE on the desktop; then put it on some
unused desktop and use it for a dozen people.

definitely a better solution than hosing up a whole file-server just
because you're playing with a tool for babies.

MDB chokes networks; file servers-- MDB isn't reliable.

you're fucking retarded if you use MDB for anything.

and if you already know Access?

you can get more done; against SQL Server-- using Access Data Projects
than your red-headed stepchild of C#

Microsoft killed the most popular language in the world; get over it.
Go back to using Access.

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11*********************@m7g2000cwm.googlegrou ps.com:
>
small desktop apps that need local storage?
>
>
>
>
why do people NEED local storage?
>
>
give people SQL on the desktop if you MUST lol
>
What a hassle to load MSDE type engine.
Sep 30 '06 #43
seriously dipshit

how long does it take you to create a simple data entry form?
how about a report?

what do you vb.net gurus bring to the table that <INSERT><AUTOFORM>
doesn't trump?

you're arguing with the wrong kids; and trying to talk about things
other than the facts.

Access MDB shouldn't be used ANYWHERE.
Spit on anyone that uses it.

If you've got an Access-based skillset-- there are more Access
programmers now than there are vb.net programmers-- then it might be
easier and more productive for you to get into ADP instead of VB.net.

VB.net is still too hard to use. It's an order of magnitude more
difficult for simple data entry apps.

And it brings NO BENEFTS over Access.

can you right-click SORT and right-click FILTER on your datagrids?

ROFL

it's built into the system.

can you even bind a form to a sproc?

ROFL

how long does it take you

I just find it laughable.

You vb.net diptards should NEVER be using MDB for a database; I mean;
you've proven; time and time again-- that you're superior programmers
(tongue in cheek)

why don't you lose the training wheels and NOT USE MDB FOR ANYTHING YOU
FLAMING PUSSIES.


rowe_newsgroups wrote:
To all,

As you can see the discussions with aa*********@gmail.com are
meaningless. It doesn't matter what you say or how you say it, we're
not going to convince him we're right. Judging from his other posts I
believe the following URL will summarize the situation:

http://en.wikipedia.org/wiki/Internet_troll

Oh, and if you don't feel like reading the entire article, read at
least this excerpt:

"For many people, the characterising feature of trolling is the
perception of intent to disrupt a community in some way. Inflammatory,
sarcastic, disruptive or humorous content is posted, meant to draw
other users into engaging the troll in a fruitless confrontation. The
greater the reaction from the community the more likely the user is to
troll again, as the person develops beliefs that certain actions
achieve his/her goal to cause chaos. This gives rise to the often
repeated protocol in Internet culture: "Do not feed the trolls.""

So in summary if you agree with me, then please stop responding to him!
It only makes things worse!

Thanks,

Seth Rowe

aa*********@gmail.com wrote:
I just find it laughable.

shit; if you don't want to put MSDE on the desktop; then put it on some
unused desktop and use it for a dozen people.

definitely a better solution than hosing up a whole file-server just
because you're playing with a tool for babies.

MDB chokes networks; file servers-- MDB isn't reliable.

you're fucking retarded if you use MDB for anything.

and if you already know Access?

you can get more done; against SQL Server-- using Access Data Projects
than your red-headed stepchild of C#

Microsoft killed the most popular language in the world; get over it.
Go back to using Access.

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11*********************@m7g2000cwm.googlegrou ps.com:
>
small desktop apps that need local storage?
>
>
>
>
why do people NEED local storage?
>
>
give people SQL on the desktop if you MUST lol
>
What a hassle to load MSDE type engine.
Oct 1 '06 #44
a lot of people are stupid idiots that run out and shoot up heroin.

does it's popularity mean that it's the right thing to do?

is it my fault that you're a novell / unix / linux fag?

ROFL

get some real tools kids
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@c28g2000cwb.googlegr oups.com:
what SMS or Active Friggin Directory could push it out; without any
intervention.. in probably 60 seconds

A lot of sites do not have AD or SMS.
Oct 1 '06 #45
and; btw jackass

read your own wiki k?

re:
including the personal attack of calling others trolls

that means you're a troll-- when you call me a troll.

ROFL.

im rubber and you're glue.. anything you say bounces off of me and
sticks to you

at least I'm not a MDB-pussy

-Aaron

Oct 1 '06 #46
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@c28g2000cwb.googlegr oups.com:
is it my fault that you're a novell / unix / linux fag?
How about if you're building an application for the home user?
Oct 1 '06 #47
if you're building an app for a home user?

MSDE has a simple MSI installer I believe; I think that it would be
trivial to build an installer for MSDE

it's just a completely superior product; I dont think that MDB is
secure enough to use anywhere for anything.

how many times do companies need to report data theft before people
stop using MDB?
MDB is inherently insecure; and insecurable.

-Aaron
Spam Catcher wrote:
"aa*********@gmail.com" <aa*********@gmail.comwrote in
news:11**********************@c28g2000cwb.googlegr oups.com:
is it my fault that you're a novell / unix / linux fag?

How about if you're building an application for the home user?
Oct 2 '06 #48

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by junaid | last post: by
3 posts views Thread by Niks | last post: by
3 posts views Thread by Martin B | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.