I am using vb.net (visual studio 2010) and have made a form application that uses a login screen. All that works but I am having trouble any firm way to encrypt the passwords in the database. The encryption doesn't have to be very high standard as its just for a college project. Whats the best way to encrypt the password into the database? Or just encrypt the password string, I can then sort out the database end myself.
I am using VS 2010 and I want to read the Text File values and place them into variables. This is my code Me.OpenFileDialog1.FileName = Nothing If Me.OpenFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK Then Me.TextBox2.Text = Me.OpenFileDialog1.FileName filename = Me.TextBox2.Text End If [Code] ..... I am unable to move pointer to next line.
I recently made a small app for a friend and then made it a public app, in doing so I forgot that it connects to my MS SQL DB and checks for values. Someone used Red Gate .Net Reflector to get my password and destroy it all. I've contacted their ISP and they are looking into it, apparently this person has a static ip with them.So this is a lesson learned at a heavy price for me. How can I prevent this from happening again? How can I get away from the unsafe connection string they were able to use?
i'm oding a project which involves using a log in form, from which the username and passwords are compared to. However, at the moment, my code works, but not case sensitively!
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click Dim sql = "SELECT Username,Password FROM login WHERE Username = '" &
I am trying to get use to this....I need to know how to type in a database for my usernames and passwords??? I am using visual basic 2008, which I think is visual.net? anyway...heres my code:
Code: Public Class login Private Sub login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Hello.Hide()
I use AES encryption in my vb.net 2008 windows forms apps to ....
1. Store user passwords in sql server express database in encrypted form
2. decrypt the encrypted Sql server express connection string password on the fly when connecting to SQl Server over a vpn or direct to web based sql server database
3. decrypt the encrypted ftp site password on the fly when my application connects to my ftp site to upload client's database backups
The issue I have is that the secret key for the encryption / decryption is hard coded within the encryption/decryption functions. So anybody who decompiled my application would be able to generate the same encryption, as they would have the encryption secret key How can you hide the encryption secret key so that if anybody decompiled my app they could not reproduce the decryption function
Getting some errors with a loop. It's a log-in app that has username, passwords & account type stored in a SqlCe database. I would like it to sync with a larger database for updates that has not been made so i left it out but I have started to make a loop that would connect it to the larger DB and if connection failed would try a set number of times before stopping the program. I'm coding this project with Visual Studio 08 pro
Dim conndb As New SqlCeConnection("Data Source = |DataDirectory|\Mydb.sdf") Dim x, y, z As Double x = 1 y = x + 1 z = 5
I'm actually a beginner in VB express. i made about 10 easy programs, now i decided to make one a bit difficult. I'm stuck at the beginning.In first form i have 2 Textboxes and 1 Button (1username, 1password, button - sign in) and then another 2 Textboxes and 1Button (1username, 1password, button - register) I want to make something like this for beginning: When you register the infos from textboxes (username & password) are saved in some file (let's say in info.txt or info.ini). I actually want to know how to automatically save these usernames and passwords in text file when you click register button, so when you want to login, you have to use registered username&password. So if there in text file is not the username you registered or typed in textbox you can't login.
I have a vb .net ArrayList that I would like to store in one field on my Ms SQL 2008 database. Is it possible to put it in and get it back out as an ArrayList? I'm guessing i need to break down the Array some how and store it as a string, then rebuild it when reading back as i dont see any datatypes for sql that are for arrays. Which is a bummer for me! edit - The ArrayList stores a set of quote ID's. There is no limit to how big it is so it could hold 1 or 1001 different ID's
i am making a project and in that getting storing and loop problems there are two fields serial no and quantity when quantity is entered serial number must be asked then only and the number of times quantity is entered that many times serial number must be asked also serial number is from to too like 1 to 6 or 1 to 5 so i have to taken 2 textboxes serialfrm and serialto to store but now the problem is that i am not able to write proper code for it either it doesn't get saved to the particular name to which both fields belong or it keeps saving without stopping.
i am generating a barimage and storing in a database i am able to create a barimage and store in a local drive but while transferring i am facing difficulties my code is
Can anybody help me, i am having challenges getting collections value into the database
Here is my sample code. but is not working at all rather is crashing the applications
Dim collections As New System.Enrolment.CustomerBiometricsCollection() collections = Me.PrintCaptureWizard1.ShowDialog() Dim dbs As New DBClass Dim mee As String mee = dbs.ConnectionString Dim conn As New SqlClient.SqlConnection(mee) conn.Open() Dim ds As New SqlCommand("Custoon", conn) ds.CommandType = CommandType.StoredProcedure ds.CommandText = "CustBiometrics" For k As Integer = 0 To collections.Count - 1 ds.Parameters.Add("@TemplateID", SqlDbType.UniqueIdentifier).Value = New Guid(TextBox1.Text) ds.Parameters.Add("@TemplateIdentifierID", SqlDbType.UniqueIdentifier).Value = (collections(0).TemplateId) ds.Parameters.Add("@CustomerID", SqlDbType.UniqueIdentifier).Value = New Guid(id) ds.Parameters.Add("@Template", SqlDbType.Image).Value = collections(0).PrintTemplate ds.Parameters.Add("@TemplateSize", SqlDbType.Int).Value = collections(0).Size Dim dr As SqlDataReader = ds.ExecuteReader() dr.Close() Next k conn.Close() MessageBox.Show("Record Inserted")
Here is the code I used to store an image in my database (SQL Server 2008 R2) using VB 2010. The images get stored but the problem is the clarity of the image is lost when retrieved and seen in a picture box.
Public Function InsertUpdateImage(ByRef _SqlConnection As System.Data.SqlClient.SqlConnection, ByVal _Image As System.Drawing.Image, ByVal _ImageFormat As System.Drawing.Imaging.ImageFormat) As Integer
I am using an Access database and vb.net 2010. I have created a table in the database with columns for title, datein, dateout and roomnymber. In vb.net 2010 I made a distinguished title = combobox, datein and dateout = DateTimePicker. When I click on F5, an error occurs: INSERT INTO Syntax Error in statement. [Code]
I am in front of a great dilemma whether to store files in Database or doing it the standard way. I would choose the second option, but my application will be used by multiple users, so I am doing it by Web Services.
On the one hand, storing in database will be very useful as every user would have access to everything very fast, not caring about file paths, locations and so on.
On the other hand, if this table consists of 1000 files, wouldn't it be a bad idea as there should be some performance loss?
At the present moment, I am using mysql as database, but I am thinking of moving to SQL Server, but I suppose this is not DB Issue.
I'm trying to store three images from a form (PictureBox's) into a SQL Database (MSSQL2008) The below does what I want but is clearly inefficient. Any pointers on what to change to improve this?
Private Sub SaveImages() Dim ConStr As String = "Data Source=SERVERSQL2008;Initial Catalog=NorthPole;Integrated Security=True"
I have my form set in french as well, and it automatically changes the text format to use ','. However When I try to insert my values into the database it says cannot convert nvarchar to decimal? Worst case, Is there a way I can disable the numbers from changing to use ',' and just use '.' always regardless what language it is? My working language is vb.net?
I've created a rich text box which stored the "textBox.Text" value in an SDF database. The storing works, but the formatting seems to be lost. Is this something that SDF databases can't handle? Do I need to store in binary or something? Not sure how to do that either.I'm using Visual Basic Express Edition with Winforms and writing in VisualBasic.NET btw This is how I store to the database:
Private Sub btnToolStripSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToolStripSave.Click Try Me.Validate() Me.SangerBindingSource.EndEdit()
[code]....
And this is how I insert the text in to the rich textbox
txtBoxText.SelectionFont = New Font("Verdana", 16, FontStyle.Bold) txtBoxText.SelectionColor = System.Drawing.Color.RoyalBlue
I have to store a image file into my Access database.
For that i've used 'OLE Object' datatype for my field. When i convert the image into byte array and tried to insert it, i got an error saying "Syntax error in INSERT INTO statement"
I want to know what datatype should i use in Access 2007 and how to convert the image to byte array in my vb.net code.
My code is...
Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:DBHROsam.accdb") Dim cmd As OleDbCommand = New OleDbCommand("INSERT INTO Member (ID,mname,fname,image) VALUES (@ID,@mname,@fname,@image)", conn)
I am about to develop an application in vb.net 2010, until now I used to connect to database server to manage my data . Now i need to develope an .exe which could run in any pc, so I need somehow to store the data in a local database which is embedded to my application, I see .NET has a local database. My question is a right choice to use a local database for these kind of solutions?
I have my form set in french as well, and it automatically changes the text format to use ','. However When I try to insert my values to the database it says cannot convert nvarchar to decimal? Worst case, Is there a way I can disable the numbers from changing to use ',' and just use '.' always regardless what language it is?
I am trying to store a .png image inside a database using SQL Server 2008. I have done this just fine using mySQL but for some reason it looks like this when placing it into ms SQL Server:
I am developing an application where I need to make use of multiple values during the run time. These values are configuration setting of the application as specified by user and are stored in a database (more than 50 in number containing strings/boolean and numeric). I have defined a structure to contain all the variables that will store this information. At start of app, I retrieve all values from database and fill the structure which i can use when required. I am wondering if it is a good idea to declare too much of variables and keep them alive during the run-time as compared to retrieving the values from database every time it is required?
When I store a binary file in a MS Sql table & then retrieve it & write it back to disk the new file is always 1 byte bigger than the original file, no matter what the file type. Is this normal? The files all open fine in their respective applications, but I'm just wondering where the extra byte comes from & if I'm doing something wrong in my code.
Using con As New Odbc.OdbcConnection(conString) Using cmd As New Odbc.OdbcCommand("insert into mytable values (?,?)", con) Using fs As New IO.FileStream(filename, IO.FileMode.OpenOrCreate,