I have a class orderItem it is a parent of Product and service class Im adding product or services in a listcollection. How can I cast service or product for retrieving orderitem?
Public MustInherit Class OrderItem Private m_enuItemType As TypeOfItem = TypeOfItem.None Private m_strUserID As String = ""
Given a connection object (or series of them), does anyone know of a way to backtrack and get the provider name? I'm trying to create a generic dataset generator that someone could load up with n DbCommand instances populate the dataset without requiring any further information.
Theoretically, as a command requires a connection object, that's all the information one should need to create this tool.Given that I'm populating tables in a dataset, I figured the simplest way would be using a DataAdapter. The only problem is that to generate a generic DataAdapter, I seem to have to go through the provider factory which requires a provider string - which I don't have.
Also, given that the provider for each command could potentially be different (i.e. commands across numerous databases), does anyone have any suggestions that would keep this simple?I'd like not to have to require the user to provide the provider string for each command object if I can avoid it. This way the user can just pass a param array of DbCommands and I can take it from there.
I have a problem in retrieving dateTime object from the database. I have this : Return CBO.FillCollection(Of ObjectInfo)(CType(DataProvider.Instance().ExecuteReader("sp_SelectAll"), IDataReader)) Then When I want to display the date from the collection I get from the stored procedure. the date was truncated. It shows only the timein the ObjectInfo..there is a field call _mydate as DateTime.
I have a Login class with a doLogin() method which is called from a Button.OnClick() event from my Login form.If the login is successful, I then instantiate a User Class with the users details (username, first name etc.).The problem is, I don't know the best way to store this User object .I want to be able to retrieve details from this Object 'on-the-fly' from other forms, Such as UserObj.getFirstName(). And then have the ability to remove the object for when the user logs out, for example.
I really don't want to have to pass the object around to every form that would need it. That seems unnecessary and I'm sure there's a much easier and logical way.If it was possible to store objects in My.Settings, then It'd be perfect, but you can't (i think?).
I like the PHP way of doing things but, it seems I am stuck with using a Collection of Object's to store/retrieve the data I need. I have my Collection loaded with my Objects's and the code to iterate through the collection, my problem is I am unable to retrieve the "key" as it would be called in PHP (I believe in this case it is actually the name of the object).
Consider the following example:
Dim xDoc As XPathDocument = New XPathDocument(fName) Dim xNav As XPathNavigator = xDoc.CreateNavigator()
Dim sender As XPathNodeIterator
[CODE]...
As you can see, I am navigating an XML document, and creating an Object with some Key/Value pairs. The Object would look something like this if it were in JSON:
When I iterate though the Collection I can only get the value of the object, but I need the Key, in this instance I want "name","address1","city","state" to be stored in a variable for each iteration.
I am using the following code to load an ArrayList with an object. [code]I don't know how to retrieve the object from the ArrayList using the Item property. I am using the following withOUT Success. The code is searching the arraylist for a match on serial number. Values(2) is correct and is working fine - the problem is purely getting the object information from the arraylist.[code]How do I pull the propertys back from the object in the arraylist to compare the values with Values(2)?
I built a WCF service that exposes itself for a web application, it accepts an object and prints the data on the clients machine. Works fine on my development machine, and the service is up and running on any machine i install it on. I can enter ip address in clients machine web browser and see it is running. Problem is when i send the object to the clients machine it returns an error, that sounds like it could be because of the clients windows firewall. Where would i start at to deal with this problem ?There was no endpoint listening at http://192.168.1.168:2202/PrintLabel that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
I have an image stored in sql server. I want to retrieve the image and place it in a MailMessage object, not as an attachment file, but as part of the html body. I found many samples using local image file, but I have not found any using an image from a database.
I have a combobox where the user can type the sql server name. Then a connect button that, when the user click, I want it to populate another combobox with all the databases from the server in the previous combobox. Unfortunately, I am getting the error object reference is not set....!
Here is where I am getting the error: For Each objDB As Database In Me.SMOServer.Databases I am new to VB ...I'm using vb2008 connecting to sql server 2005.
Here is my complete code: Imports Microsoft.SqlServer.Management.Smo Imports Microsoft.SqlServer.Management.Common Public Class Form1 'Public Class frmSQLConnection Private m_objServer As Server [Code] .....
I am faced with the prospect of having to completely rewrite the application.I have suddenly started to get this error message all the time - it seemed to start after I added a table to the schema, but deleting the table makes no difference. I can't see anything wrong with the connection string, but as it seems to be entirely undocumented, that doesn't mean much.
The connection string contains DataSource=.SQLEXPRESS;AttachDbFilename=|DataDirectory| est.mdf;Integrated Security=True;User Instance=Trueand certainly the string works when I use "test connection" from the application setting edit box. I am assuming that for some reason it is not evaluating the Data Directory , but can't see any reason why it shouldn't. Any ideas gratefully received! What might be a clue though is that I can't get rid of the table I added. I have deleted it from the database, deleted it from designer and saved the file, but it just keeps reapearing! Even when it is not showing, there is still a table adapter in the .xsd file. I am reluctant to start editing this manually because of the danger of screwing something else up - I did try but it caused an error somewhere else (VS helpfully didn't say where)
I am at a bit of a loss at the moment. What I am basically writing is the password elements of a membership system. What I do is generate a random salt value, take the registered password, combine the two and then pass the new string through a function which will generate a SHAManaged 512 hash.
I then convert the hash and salt string into Byte arrays and store these in my database.The problem comes when I then compare a login attempt against the original value I am being supplied with a completely different hash for the password being presented by the user, even though it should be exactly the same.
Here is my code when someone registers their new account:
I have an openfiledialog, I show the dialog and the user selects there file. How could I calculate the MD5 hash of the OFD.filename/file opened? Or calculate the SHA1, what ever is easiest.
I know MD5 hashes have been asked about 1000+ times, but this question is slightly different.I am looking to find the true MD5 hash of an image, but without using a string for the file's location. I am looking to be able to call on the image inside of a picturebox rather than somewhere on my computer or the internet.
For example, I want to find the MD5 hash of an image inside of my picturebox.
If this doesn't make sense, please ask any questions you may have.
im creating a simple login / registrate form in visual studio 2008 anplant Hash and salt to my login and registrate forms, im using mysql to connect to a online mysql serverthis is my codes i ahve now
Form 1 - Login Try DB_Connect = New MySqlConnection()
[code].....
i really need this working, all works but nothing is encrypted
I have a page with a URL that includes a hash value (www.mysite.com/#123).What I want to do is use that value to determine what is displayed on the page - much like using a querystring.I am using the hash value because the content on the page can be changed client side (I am avoiding page reloads where possible) - if the user then links to another page and uses the back button to return, I need to use the hash value to display the page as it was when they left it.So I'm looking for an if statement that will look something like this:
I would like to write a function GetHashCodeOfList() which returns a hashcode of a list of strings regardless of order. Given 2 lists with the same strings should return the same hashcode.
ArrayList list1 = new ArrayList() list1.Add("String1"); list1.Add("String2");
[Code].....
I can first sort the list, then combine the sorted list into 1 long string and then call GetHashCode(). However sorting is a slow operation. I can get the hash of each individual string (by calling string.GetHashCode()) in the list, then multiplying all hashes and calling Mod UInt32.MaxValue. For Example: "String1".GetHashCode() * "String2".GetHashCode * ... MOD UInt32.MaxValue. But this results in a number overflow.
I'm trying to figure out a way to compare two "salted-hash" strings. How can I do this? I know that the salt is a random generated value that's appended to the plain text, then we just compute the hash of that new string.So how can I compare these two values? O_O (The new hash that the user hash written in a textbox and the hash stored in a database)
I have a function in VB.net that returns a password hash. I need to make a web interface to the same database and I'm not sure how to return the same hash in PHP. Does anyone know both languages enough to convert this to PHP?
Code: Public Function GenerateHash(ByVal SourceText As String) As String 'Create an encoding object to ensure the encoding standard for the source text Dim Ue As New UnicodeEncoding()
I am having issues to hash with sha 1 salted in vb. I have an SMF forum and it uses SHA 1 salted to encrypt its passwords. I want to make a program which is only available to users who have registered in my forum so I have to create a login system in my program. The problem is that how do I hash to SHA 1 salted in vb?I have explained what I want to do a bit more in details below:User opens program >They login using their forum account details >Program hashes the PASSWORD the user has entered to SHA 1 salted >The program then connects with the forum's database and compares the password value > (The Username is checked first tho)
The code below allows a user to enter user name and password to log in to enter marks of students. SQL data reader verifies the user credentials from the database before authentication takes place. modify the code by salting and hashing the password.
Dim frm As New MarksEntryFrm Dim flag As Boolean flag = False
I am porting over some code from .net (vb) to php and I came across some md5 hashing that I can't reproduce in php. In the .net one there are two functions one uses UTF-8 encoding and the other uses Unicode encoding. The output is a different hash when passed in a string
// First function (returns GUID) Dim oHasher As Cryptography.MD5 = Cryptography.MD5.Create() Dim oEncoder As New System.Text.UTF8Encoding() Dim csData() As Byte
[Code]...
but they both produce the same result. Is it possible to produce the same results in php with md5 hashing?
I was asked by an employer to sort a hash table. I always thought that the usage of a hash table was in a way non-sort friendly. Am I wrong in thinking this, and if not can you point me to a good VB.Net(Yes Kill me now, but it's an old system) method of sorting a hash table.
Using sha As New SHA256Managed Using memStream As New MemoryStream(Encoding.ASCII.GetBytes("Hello World!")) Dim hash() As Byte = sha.ComputeHash(memStream) Dim res As String = Encoding.Default.GetString(hash) End Using End Using
I have been unable to recreate the same hash for the same values with these two bits of code.
The javascript implementation returns: 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
and the vb.net example returns: ƒeñüS-ÁHÖ]ü-KÖw(JÝÒ mi"
What am I missing? I assume it's something to do with the character encoding?
ClickOnce Deployment Issue - File Has Different Computed Hash Than Specified In Manifest - Urgent! : ClickOnce and Setup & Deployment Projects : Windows Forms : MSDN Forums
ERROR DETAILS Following errors were detected during this operation. [12/22/2008 9:14:26 AM] System.Deployment.Application.InvalidDeploymentExc eption (HashValidation) - File, NonFormEntryWindow.exe, has a different computed hash than specified in manifest. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ComponentVerifier.Ve rifyFileHash(String filePath, Hash hash) at System.Deployment.Application.ComponentVerifier.Ve rifyFileHash(String filePath, HashCollection hashCollection)
[CODE]...
COMPONENT STORE TRANSACTION DETAILS: No transaction information is available.