|
Hi ,
I need a Single DES or Triple Des or AES code in Dot Net...
Regards,
Narayanan.S
|
|
|
|
|
I googled and found tons of code.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
in which version you want this code.
VS 2005 and later has directly support for any type of encryption algorithm like AES, DES, RSA etc.
|
|
|
|
|
Thanks For ur Reply...
I have seen that code , but i could`t undestand the logic behind that Algorithms ... I got lot of documents Regarding that algorithm, but
I could`t undersatnd how they r using the keys for Encryption & decryption and all....
Regards,
Narayanan.S
|
|
|
|
|
Please let me know .. if you want the sample code for the same ...
and regarding which type of encryption algorithm
|
|
|
|
|
Hi, I need help connecting an access file with my project I am working on in Visual Studio 2008 (I also have Visual Studio 2005).
I know how to connect to SQL databases but access is totally new to me. My friend told me that just add it through the "Add data source wizard" and then drag the columns you need from the "Data Sources" side bar.
I did that the connection was established and I the navigation bar was also created automatically, when I ran the program, it was showing the records from my access file, I was able to add or delete records but the changes I made to the database are just temporary and are not saved in the database (THIS IS WHERE I NEED HELP)
Please answer this question, I am stuck because of this problem, and please answer it as descriptively as possible because I am new to coding and don't know much.
I don't know ADODB or anything else like that but am willing to try anything just want to be able to access, edit and update any access file from within my program.
Thanks for your help in advance.
|
|
|
|
|
I thought you just create a connection string with the path to your access file ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Could you please give me a sample program or tell me where I can get one which would be able to retrieve, change, delete and add records in an access database.
I would be very grateful if you would assist me in this matter.
Thanks for your any help in advance.
|
|
|
|
|
Use the following connection string using the OleDb dataadapter to make the connection
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\DOT_NET\DB\db1.mdb;Persist Security Info=False
and after update the data please close the conenction and release the created object.
Please let me know if u want sample code for the same.
|
|
|
|
|
|
Good Morning Muhammad Zaid Pirwani
The Problem when using the Wizard is that you will never understand what is wrong when something is wrong. i suggest you start writting code and connect to your Database your self. its simple. You are going to do the Following
In your Project as you know you have to import the Following
Imports System.Data
Imports System.Data.OleDb
And your code for Database Access , should be Something like this
'Connection String for the Access Database
Dim strCon As String = "Data Source=C:\Valuation Roll\ValuationRoll_CD.mdb; Provider=Microsoft.Jet.OLEDB.4.0;persist security info=False;User ID=Admin"
Dim con As new OleDbConnection(strCon) 'Declaring a Connection Object
Dim cmdselect As new OleDbCommand 'Declaring a Command object
Dim da As new OleDbDataAdapter 'Declaring an Adapter
Dim dsdata As New DataSet
cmdselect.CommandText = "SELECT * FROM mytable"
cmdselect.CommandTimeout = 0
cmdselect.CommandType = CommandType.Text
cmdselect.Connection = con
da.SelectCommand = cmdselect
Try
con.Open()
dsdata.Clear()
da.Fill(dsdata, "mytable")
con.Close()
Catch
Throw
End Try
And you can Bind your Control , mybe a Datagrid
like this
Try
datagrid1.DataSource = ds
datagrid1.DataMember = "mytable"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
and Walla its Simple , Check my Articles about doing Database work without relying on Wizards. Wizards dont give you the Flexebility and they will never allow you to learn, as you say you are new to coding , you have to start coding and stop using Wizards
Hope this Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I have applied your method and it is working I am retrieving data from the database
THANK YOU VERY MUCH
Still working on how to change, update, add and delete records from the database though
where can I see your articles your sites are showing the "cpanel" page and not the actual content.
Will ask if get some other problem
Again Thanks
|
|
|
|
|
|
Hi everyone, I'm focusing on a real tough problem that I hav been trying
to solve since a long time. I'm trying to detect the Open or close status
of the Cd drive door. I'm using mcisendstring function to query the
status, mcisendstring("Status CDAudio Mode"). This function returns
the following values accordingly:
"not ready", "paused", "playing", and "stopped" values.
Some devices can return the additional "open", "parked", "recording",
and "seeking" values.
If there is a cd in the drive and the door is closed then it's almost easy to identify as "status CDAudio mode" returns a value anything other
than "open". But the real problem is when the CD door is open the
value returned by the mcisendstring function is "open". Again when the
CD door is closed with no CD inside the function is returning the same
value "open". There's no way I can distinguish the CD tray status
programatically when the value returned is "open". Can anybody help
me? Is there any way other than the mcisendstring function to
query the CD door status? If yes then Plz provide me a code example.
|
|
|
|
|
I imagine that all the system knows for sure is that there's no CD there. I am pretty sure there's an API to open the door, if there's no CD, you could open it, and then know it was open :P
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Yeah u r right, through the API I'm using for MCISendstring function, the system can identify whether a cd is present in the drive or not through the command- mcisendstring(Status CDAudio Mediapresent). It returns true or false accordingly. But to be precise, the problem lies during the absence of any cd. At that time the command- mcisendstring(Status CDAudio Mode) is returning the same value- OPEN regardless the open or close state of the tray door. Can U plz focus more on it? Thanx.
|
|
|
|
|
hi all,
im using winsock array in vb6, i converted to vb.net 2005 platform...they created a axwinsockarray .dll.. my question is : it is useful using winsock in vb.net 2005 ?
until now the conversion is good .. but i don't know if it will be an error in futur by using winsock inside vb.net 2005 ....
can anyone help me thanks in advance.
|
|
|
|
|
I believe winsock went the way of the dinosaurs in .Net. It was replaced by System.Net.Sockets Namespace[^], and on a high-level by TcpClient [^] and TcpListener[^].
So, I suggest migrating to one of those to make it easier and avoid any unnecessary problems.
|
|
|
|
|
If you are using the winsock (VB.NET 2005) for desktop application then no issue. You will get the same functionality with InterOp Winsock component i.e. AxWinsockArray.dll.
Otherwise instead of InterOp Winsock you can use the socket programming, which is a great alternative of winsock.
|
|
|
|
|
I am trying to get a variable to pass to another procedure.
I have set my procedure as follows
Sub Procedure(X)
' programming code
End Sub
Normally I would use the following to send data
Procedure1 Count6
however in this case I am running the called procedure using this code
With ActiveWorkbook.Sheets(SetMonth).Buttons.Add(600, 20, 100, 25)
.OnAction = "Procedure1"
.Caption = "Bills Not Paid July"
.Name = "JULY"
End With
how do I adapt the ".OnAction = "Procedure1" section to pass the variable"
Can anyone help me
|
|
|
|
|
Hi
The issue with specifying the parameter when you create the button is that the value for the parameter will be fixed.
For instance:
Public Sub CreateButton()
With ActiveWorkbook.Sheets("sheet1").Buttons.Add(600, 20, 100, 25)
.OnAction = "'Procedure1 ""Hello"", " & nCount & "'"
.Caption = "Bills Not Paid July"
.Name = "JULY"
End With
End Sub
Public Sub Procedure1(ByVal s As String, ByVal x As Integer)
MsgBox s & " " & x
End Sub
In the code above, even though the parameter is specified as a variable, the value when you _define_ the OnAction is what will be passed in.
To get around this, you could try this:
Public Sub CreateButton()
With ActiveWorkbook.Sheets("sheet1").Buttons.Add(600, 20, 100, 25)
.OnAction = "July_Click"
.Caption = "Bills Not Paid July"
.Name = "JULY"
End With
End Sub
Public Sub July_Click()
Call ActiveWorkbook.Application.Run("Procedure1", "test", nCount)
End Sub
Public Sub Procedure1(ByVal s As String, ByVal x As Integer)
MsgBox s & " " & x
End Sub
HTH
|
|
|
|
|
Hai,
After selecting one row in a datagrid(vb.net2003) if i press enter then the focus has to go into another control like i have textbox in the form..
How to get that focus,In which event i have to write the focus.
In .net2005 i will get that easily,but in vb.net2003 how it is possible.Pls help me..
hanuman
|
|
|
|
|
Hi Hanuman,
Please try KeyPress or KeyDown event of DataGrid.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Hi,
I have worked on .NET 2003.(VB.NET & C#.NET).
Now,my new project is support for the application written in VB6.
Please clear my confusion,is there any problem I will face while I do work on that?
What I need to learn?
Thanks in advance.
G Singh
|
|
|
|