|
you may use following code snippet:
Dim x As String = Table1.Rows(1).Item("Product")
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I beleive you can use Linq to do this, however I have always done this in the database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi to all
I am very new to .NET Technology...
I have created a client application in vb.net (Console application) for a web service. The service provider send me a certificate file (certificate.cer) to communicate with server. i just copied the same to local folder c:\Myfolder and double click and install it.
i am connecting to the server through a secure vpn connection
When i run the application, i am getting the following error
"An unhandled exception of type 'System.Net.WebException' occurred in system.dll
Additional information: The underlying connection was closed: Could not establish trust relationship with remote server."
Imports System
Imports System.Net.WebClient
Imports System.Security.Cryptography.X509Certificates
Module Module1
Sub Main()
Console.WriteLine("Start")
Dim mycc As New SH_SaleService
Dim certific As String = "C:\Myfolder\certificate.cer"
Dim cert As X509Certificate = X509Certificate.CreateFromCertFile(certific)
mycc.ClientCertificates.Add(cert)
Dim ZZ As String
'Following line is used to check the status of a serialnumber"
ZZ = mycc.getInfoBill("UserID", "Password", "7852455")
Console.WriteLine(ZZ)
Console.WriteLine("End")
End Sub
End Module
My question
is there anything missing in my client program.. and how i can refer a certificate file in vb project
Thanks for replies in advance
|
|
|
|
|
your code seems fine to me.
Are you sure that the certficate you are using is the correct one..
What I mean to ask is if you can check that this error is not being thrown due to some reasons at server side.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I currently have a project which was to finding the particular files in my com and to delete them if the file is 4 days old. I am starting from scratch anyone can advise me how can i go about doing it?
|
|
|
|
|
is com, computer ?
I guess use the FileInfo class to find out how old the file is, then delete it. System.IO is the namespace you need.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes is a computer.. Is a window application. Do u know of anywhere have this or similar file? I need to refer to it as i am not very good at programming.
|
|
|
|
|
Subjugate wrote: as i am not very good at programming.
Looks like you're getting set to learn.
It's really very easy. Why not post what you've done so we can help ? If you're incapable of making a start, you're probably also incapable of changing any code you're given, you should consider sites like rentacoder, if you need this one app but don't need to know how to write code for any future work.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
For to do it first of all u will have to imports system.io
n then use the getfiles method to get all file of a paricular directory n check if it is old then delete it
Hope it will help
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
Not sure how restating my answer in less detail is helpful ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks for ur advise.. I will try it out 1st.. Thanks..
|
|
|
|
|
When i am using the getfiles method and listing them into the list box i am unable to get all the file. I use .ppt as example i only manage to get one same file over and over again whenever i click on my read button. But the explanation given but the software is that the code suppose to be able to list down all the file. So i dun understand why i cant? any by the way anyones knows how to use the getfilesdatetime function?
|
|
|
|
|
with getfiles you get an array of files. if your listbox just shows the same file over and over again, i assume you are using for... next to add the files to your listbox, counting the number of items in your array but not changing the index at each step. either change the index or use for each... next for iterating through that array and adding its items to your listbox.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
I am using for each... next in my coding and it still just list only one file. Dun understand why..
|
|
|
|
|
I have read the help provided by the software but it dun provide detailed explanation and no example given. I not very sure on how it actually works. Example like string.remove(12, 4) wat does it mean?
|
|
|
|
|
|
I assume it means remove the characters from number 12, going for 4 chars. Did it occur to you to write some code and see what it returns ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Because i am taking over this codes and initially the code is connected to a web server and now it is not.. So there is no way where by i can know the result. So have no choice but to check out wat the codes means..
|
|
|
|
|
You think it works differently in a console app to how it does in a web app ? How can you test your code at all, if you can't run it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: You think it works differently in a console app to how it does in a web app ?
My 5 .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
In this case i think i really need to connect to the network to test the code out first. Thanks a lot.
|
|
|
|
|
Well, the fundamental here is, although you can test string.replace anywhere, you sure shouldn't bother working on any code, if you can't test it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm stumped. Tried asking google and look around here in TCP, but I still haven't got any answer. I'm totally new in ASP.net programming, but have some experience in VB.net.
Here's my situation:
I have a project that is required to access a smart card and read data inside it, then pass the data into the server for further processing. I presume ASP.net does not have smartcard abilities right? Therefore, I created a dll (in VB.net) to handle smartcard processing and pass out the resulting values to the main program. When I tried it in localhost, the thing works; but when I tried to run the program from another PC, it turns out that the dll looks for the smartcard reader at the server, where the dll resides. Now I'm trying a different method since that one fails miserably. I'm writing a VB.net program that is going to pass the acquired data from the smartcard at client PC to an ASP.net/ASP page. But I cannot find any article on the net about passing data from VB.net to ASP.net. Since the dll available is only for local .net, therefore accessing it through ASP.net results in weird performance where the accessed SC reader is the one at the server. Any idea guys? Or is there a better solution?
|
|
|
|
|
Ricky, I think your application design is at fault. Why do you need the smart card data in an ASP.net page.
Your DLL will ALWAYS reside on the server unless it is DEPLOYED to the client (you know all those issues we have with installing activex/dll from the internet, this is the cause). Your DLL can only work with what it sees as the local machine (the server).
If you use a winforms client (so the DLL is now on the client) then why send the data to the ASP page?.
If you have to use ASP then you need to ask the user to download and install the DLL on the client machine.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Well, you see.. In my country (I don't know if it is implemented in your country), we got a smart card as National ID Card; we can access basic personal information in it; so I'm building an application that automatically inputs some of the public data inside the ID Card to the application (like Name and date of birth and so on).
The reason why I need to pass the data to the ASP page is that I'm not the original developer; I'm "the new guy" that continues development of an already existing web app where the data input is manual.. and try to make it into automatic input.
Is this not possible at all?
|
|
|
|