|
dear friend
Actually i have a smart card developed with vb application interface. It has a unique no in it. I want to pass that number in koha log in screen . Koha is a open source lib software built with cgi perl. whenever i will insert the smart card in the reader the specific id no will go to the text box of koha log in screen .
url:"http://hlt.katipo.co.nz/cgi-bin/koha/mainpage.pl"
My question is the id nomcan be shown in a textbox or label of an application in vb, the url can be invoked with the help of web browser.In the text box of that login screen i want to show the id no. HOW?
Thanks in advance
Rana
|
|
|
|
|
I have added a COM type library to my VB project and can see some COM objects in the object browser. I do this:
Dim myobj As New Plugin 'Plugin is COM object in object browser
myobj now has a number of methods available to it but it also has properties. How can I access these properties? There are no methods on the COM object to get the properties but I know they are there.
I start to type myobj. and then get a menu of methods and properties to call. What can I do with properties? One of them is called Name which must store the name of the plugin which is what I want to get.
|
|
|
|
|
If those properties are not public, and it doesn't sound like they are, then you're not going to get at them. Sure, private properties show up in the browser, but that doesn't mean you can use them.
Everything you can get to is going to be revealed when you hit the period key after typing myobj .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In my VB .NET project I use Access 2003 method ImportXML and ExportXML.
Is there any way that I could still use these methods without having Access 2003 installed? Could I install only some dlls in order to achieve this
|
|
|
|
|
Nope. If your going to bind your application to Access, it better be installed when you run it. You can't just use the functions you want without having everything else above that in the object tree also present.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
if i have a ascii file, example:
2 4
3 40
42 56
etc...
how to open this file?
how to show this file in listview or datagrid?
how to save in a ascii file if i have this data
thank
|
|
|
|
|
This stuff is much nicer in C++, but in VB.NET you can still use the System.IO namespace to read and write files. In fact, a quick google will overload you with the information you need.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Use the following Code. Put an AsciiFile.txt with the data
2 4
3 40
42 56
in the applications path
Imports System.IO
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(200, 232)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
'
'ListView1
'
Me.ListView1.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2})
Me.ListView1.Location = New System.Drawing.Point(8, 8)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(264, 192)
Me.ListView1.TabIndex = 1
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Width = 120
'
'ColumnHeader2
'
Me.ColumnHeader2.Width = 135
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.ListView1)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim str1 As String
Dim i As Integer = -1
Dim SReadLine As Stream
SReadLine = File.OpenRead(Application.StartupPath & "\AsciiFile.txt")
Dim SrReadLine As StreamReader = New StreamReader(SReadLine, _
System.Text.Encoding.ASCII)
SrReadLine.BaseStream.Seek(0, SeekOrigin.Begin)
While (SrReadLine.Peek() > -1)
i += 1
str1 = SrReadLine.ReadLine().ToString
Dim str2() As String = str1.Split()
Me.ListView1.Items.Add(str2(0))
Me.ListView1.Items(i).SubItems.Add(str2(1))
End While
SrReadLine.Close()
End Sub
End Class
|
|
|
|
|
I think it's cool that you took the time to whip this up, but don't you think just the code that writes the file, along with a description of what it's doing, would be more helpful ? I personally thought that making the poster look for it themselves was more helpful again, given how elementary the question was.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
How can i produce an xml file from a given schema. data in the xml file should be filled from the database and the xml file should be according to the schema eg.
Schema:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="medgivande">
<xs:complexType>
<xs:attribute name="personorgnr" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
XML File:
<?xml version="1.0" encoding="ISO-8859-1"?>
<medgivande>
<medgivande personorgnr="2143544" >
<medgivande>
something like this. data "2143544" will be fetched from the data and will be written when the xml file is created.
can someone tell me how i can do this. its urgent.
|
|
|
|
|
A schema is not supposed to be used to create an XML file. You should write code to create your XML file, using the schema as a guide.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanx, but If i have a dataset with some values then can i produce xml file with the same format.
|
|
|
|
|
Simple - you've given an XML file that follows this ( simple ) Schema. So, use an XmlTextWriter to create a document that looks the same, given the data. You'd need to iterate over the rows in the dataset, using for-each, and then create the inner nodes inside the loop, opening the outer node before the loop, and closing it after.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I won't be providing any xml file, instead i want the data in the dataset to be written to xml file. now dataset has writexml method but that won't work in this case cause the output of that xml is not what i want.
|
|
|
|
|
must...use......small.....words......only
I don't know of a way to get a dataset to write to xml using a schema. But you can create your own XML file by stepping through a dataset, and writing the nodes based on your schema.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanx,
I date this girl for 2 years, and then the nagging starts: " i wanna know ur name": - Nitin
|
|
|
|
|
Hi all,
I am having a problem with a databound combobox in that when I save the record (ie, end current edit,update the database and accept the changes) the combobox resets its value back to the first object in the list.
Anyone else experienced this problem before?
My code for saving goes something like this.
'MsgBox("Record Saved")
'Create a new dataset to hold the changes that have been made to the main dataset.
Dim objDataSetChanges As Buckner_Intranet.dsNCR = New Buckner_Intranet.dsNCR
'Stop any current edits.
Me.BindingContext(DsNCR1, "NCR").EndCurrentEdit()
Me.BindingContext(Me.DsNCR1, "Responses").EndCurrentEdit()
'Get the changes that have been made to the main dataset.
objDataSetChanges = CType(DsNCR1.GetChanges, Buckner_Intranet.dsNCR)
'Check to see if any changes have been made.
If (Not (objDataSetChanges) Is Nothing) Then
Try
Me.BindingContext(Me.DsNCR1, "NCR").EndCurrentEdit()
Me.BindingContext(Me.DsNCR1, "Responses").EndCurrentEdit()
daNCR.Update(Me.DsNCR1, "NCR")
daResponses.Update(Me.DsNCR1, "Responses")
Catch eUpdate As System.Exception
MsgBox(eUpdate.Message)
End Try
'Commit the changes that were just merged
'This moves any rows marked as updated, inserted or changed to being marked as original values
DsNCR1.AcceptChanges()
End If
Cheers for any help you might be able to offer.
Kutz
_____________________
Don't take out the Magic Pen,
Don't draw on the Infinity Board
- Neil Young
|
|
|
|
|
How to use "Joins" in Crystal Reports.
Here is my query.
select books.bookid,books.bookname,issuebooks.issuedate,issuebooks.returndate,issuebooks.datereturned from books,issuebooks where books.bookid=issuebooks.bookid and memberid= '" & TextBox1.Text & "'"
I am making a report regarding to this query. How can i use this query in "crv.SelectionFormula" method, where crv is the name of the "Crystal Report Viewer" Control.
EsHbAn BaHaDuR
|
|
|
|
|
good news it can be done bad news is I dont use querys like that. In the report designer if you add the 2 database and link the like fields like a user ID or a author name they will show the information form both databases.
second to do the selectionformula call the like id from one of the fields I would use the one with the most fields called from it.
use the fllowing
CrystalReportViewer1.SelectionFormula ="{Customer.Cust_No } = " & CInt(txtCustNo.Text)
for string you have to use
CrystalReportViewer1.SelectionFormula ="{Customer.Cust_Name } = ' " & CInt(txtCustNo.Text) & "'"
you can put anything where txtCustno.text i normally name my strings and put them there.
James Kennelly
|
|
|
|
|
I currently have an application that uses System.Web.Mail to send mail to our Exchange server using SMTP. The problem is that our new virus scanner (McAfee) blocks port 25 on the workstations, which prevents my applicaiton from sending email. The workaround is to have a dedicated workstation that runs this application, and leave it without virus protection, but that's not the optimal solution.
Is there a way that I can access the Exchange server directly using .NET? Outlook doesn't seem to have a problem sending emails, so there must be a way to do it. I don't need access to all of the Exchange functionality or information - I just want to provide some credentials to log into the server (even trusted authentication will work) and then be able to send outgoing mail. Any thoughts?
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasstopic.asp
Try
SmtpMail.SmtpServer = "your mail server name goes here"
SmtpMail.Send(Message)
Catch ehttp As System.Web.HttpException
Console.WriteLine("0", ehttp.Message)
Console.WriteLine("Here is the full error message")
Console.Write("0", ehttp.ToString())
End Try
|
|
|
|
|
Thanks for the quick response, but this was the method I was using before, and it is stopped in its tracks by the new virus scanner.I get the following error message:
---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
This method appears to use port 25 to connect to the mail server, and so doesn't avoid my problem. In order to bypass the virus scanner, I'm going to need to connect to the Exchange server another way. Can I use the Exchange functionality, or is there some way that I can use IMAP to send mail without a 3rd-party tool?
BTW - the code that's used in that knowledgebase article appears to be incorrect - It displays lines to the console with only the "0" instead of the actual error. The correct syntax to display the detailed error information from your example would be:
Console.WriteLine("{0}", ehttp.Message)
Console.WriteLine("Here is the full error message")
Console.Write("{0}", ehttp.ToString())
|
|
|
|
|
Ryan,
yes I see the error, thanks.
Looks like your only other option is imap, there is a C# library here on CP:
http://www.codeproject.com/csharp/IMAPLibrary.asp
I don't think it includes the create/send messages functions ect. but it will give you an idea how imap works and you can go on from there.
Hope this helps.
|
|
|
|
|
http://www.ddj.com/documents/s=8903/ddj1112722336208/20050405b.html
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yeah, but only for a fee. *dance* Ding dong, the witch is dead.....
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|