|
Where there any updates (windows) installed on the computers where you get this error?
Since the error happens on a call to a 3rd party dll you best bed will be to contact them.
|
|
|
|
|
Hello All,
I am going to Print some File from my application. But I am facing some Problems.
some times an error message is comming :
---------------------------
SOTHER~1
---------------------------
Object is not connected to server
---------------------------
OK
---------------------------
but there is no problem in Printing, its working fine, but the message box is coming again when going to print next file.
My Code is below :
----------------------
For i = 0 To files.Count - 1
Try
POSEx = New PosExplorer
PrintFileName = files.Item(i)
fileData = My.Computer.FileSystem.GetFileInfo(PrintFileName)
fileContents = My.Computer.FileSystem.ReadAllText(PrintFileName)
If InStr(fileData.Name, ".") > 0 Then
PrinterName = (fileData.Name).Split(".")(0)
If PrinterName <> DupPrinterName Then
SetDeviceVariable(PrinterName)
End If
DupPrinterName = PrinterName
End If
device = POSEx.GetDevice(DeviceType.PosPrinter, PrinterName)
If Not device Is Nothing Then
Printer = POSEx.CreateInstance(device)
Printer.Open()
Printer.Claim(1000)
Printer.DeviceEnabled = True
Printer.PrintNormal(2, fileContents)
If bCutPaper = True Then
Printer.CutPaper(0)
End If
Printer.DeviceEnabled = False
Printer.Release()
Printer.Close()
System.IO.File.Delete(PrintFileName)
End If
Catch ex As PosControlException
End Try
Next
Note: My Printing Function written in a separate Thread and it always searches is there any files in my application folder or not.
So, How can I fixed this Prolem.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
Which line does the error occur on??
Since you're using a third party library (I've never heard of it), you're best source of information would be the manufacturer of that library.
|
|
|
|
|
Printer.Release()
Printer.Close()
Any of this line I am getting That error.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
Guy, the best source of information you have on this is going to be the people who wrote that printer library you're using. I have no idea what it is, nor how it works, so there's very little I can tell you.
|
|
|
|
|
hi all,
i want to get longitude and latitude of all point from any location like point P1(x1,y1) which is in the range of 1000 yards .
can anyone suggest me that how can i do this in vb.net?
|
|
|
|
|
Rupesh Kumar Swami wrote: i want to get longitude and latitude of all point from any location like point P1(x1,y1) which is in the range of 1000 yards .
can anyone suggest me that how can i do this in vb.net?
That would be an infinite set. Are you sure you have enough memory to hold all that?
Seriously, SQL Server 2008 has some spatial tools and it comes with some redistributable .NET assemblies (which are also downloadable separately from the Microsoft website) which contain methods that you can use to get the information you want.
|
|
|
|
|
sir,
thanks for your quick respose.
first of all, sorry for my incomplete information. I have a table in database(MySQL) which contains the longitude and latitude of different point. so i want to search in database for all point which is within 1000 yard from given location(mean longitude and latitude).
i can not prepare my mind that how can i add value(like 1000 yard) in any point location.
sir, can you suggest me that how can i add some value like 1000 yard in longitude(say -117.02413764) and latitude(33.03579077).
|
|
|
|
|
For the latitude it's simple to convert between degrees and distance. One degree is 110.9 kilometers.
The the longitude the distance or a degree varies with the latitude. You can read about it here: Wikipedia: Expressing latitude and longitude as linear units[^]
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Colin Angus Mackay wrote: That would be an infinite set
Surely there is a finite number of GPS positions? After all there is a finite amount of surface area on the Earth.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Steven J Jowett wrote: there is a finite amount of surface area on the Earth
Which can be continually subdivided in to smaller and smaller parcels.
Steven J Jowett wrote: Surely there is a finite number of GPS positions?
You could create a finite set if you were to place a limit on the precision. For example, if you set the precision to one degree your set would have 64,800 elements. Setting the precision to a tenth of a degree would mean 6,480,000 elements.
|
|
|
|
|
Just when you think you've out-smarted the smug git in the corner, he turns round a kicks you squarely in the balls, just to prove you wrong.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Steven J Jowett wrote: kicks you squarely in the balls, just to prove you wrong
Well, if that's what you think there isn't much I can do about it. I was merely correcting a misconception. While the surface of the earth is a finite area, that does not translate into there being a finite number of coordinate positions.
|
|
|
|
|
Hi,
I just wanted to know that can VB.Net make make a 32 bit console-based command line executable for Windows. Thanks in advance.
|
|
|
|
|
arslanjatt wrote: I just wanted to know that can VB.Net make make a 32 bit console-based command line executable for Windows. Thanks in advance
Yes.
|
|
|
|
|
|
No.
I are troll
|
|
|
|
|
Hello Friends,
I have a requirement of my application to know whenever a user select a value on crystal report & getting the selected value from crystal report view to my .net application and using that value set datasource to sub report.
Kindly help me how can I get the selected value from crystal report view to my application.
Thanks in advance
Regards
|
|
|
|
|
Do NOT cross post please.
Doing so will not lead to faster answers or better ones, it will only lead to the people here refusing to answer because of it.
As to your question, I don't think you can get the selected text out of crystal reports.
You might try (don't know how you can do it or if its even possible) to write some code in your report that save's the selected text to a parameter, and then get that parameter out of the report.
|
|
|
|
|
You might be able to invoke a webservice using a Hyperlink in your Crystal report that would pass the appropriate value to the webservice. Sounds a bit complicated, but it might work.
Rather than use your original approach, why does your application need to set the datasource for the sub-report ? I've created Crystal reports that have drill down capabilities where links would initiate a sub-report.
You may want to reconsider how your are proposing to implement your solution; there may be an easier way.
|
|
|
|
|
Hi David,
Thanks for your reply. Your second suggestion sounds better and I worked on it i.e On-demand subreport. The problems which I am facing in using on-demand sub report are following :
1) On which event should I set datasource for on-demands sub report.
2) How can I get the value from main report against which I filter datasource for on-demand subreport.
As you said that you've worked on such report might be you give me a solution for my problems.
Regards
Ali Raza
|
|
|
|
|
My reports were easier to create because I made a direct ODBC connection to the database with Crystal. I'm not sure how you would do it with datasets.
|
|
|
|
|
I m setting dataset to main report using PUSH methods. Same way I want to set datasource to on-demand sub report at runtime on the basis of value from main report
Regards
|
|
|
|
|
Dear all,
I'm new to this VB.NET,my platform using now to do the development is Visual Studio 2008 using the VB.NET 2008 Window Form to create a lorry transportation management system.
I'm facing problem with the combobox textchange event now. I'm using MySQL 5.0 with SQLYog v5.29 to develop this system.
The following is a form code for the user to insert the Delivery Order document:
Imports MySql.Data.MySqlClient
Public Class InputDO
Public Shared MyConnString As String = "Server=;Database=logistic_sysdb;Uid=root;Pwd=;"
Public Shared ObjMyConn As New MySqlConnection
Public Shared ObjComm As New MySqlCommand
Public Shared ObjRead As MySqlDataReader
Public Shared SQL As String
Dim ObjAdapter As MySqlDataAdapter
Dim ds As DataSet
Dim dt As DataTable
Dim dt1 As DataTable
Private Sub InputDO_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
ObjMyConn = New MySqlConnection(MyConnString)
'Load the information into Lorry Number Combobox
Try
SQL = "SELECT * FROM lorry_detail"
ds = New DataSet
ObjAdapter = New MySqlDataAdapter(SQL, ObjMyConn)
ObjAdapter.Fill(ds, "Lorry_Number")
dt = ds.Tables("Lorry_Number")
For i = 0 To dt.Rows.Count - 1
ComboBox1.Items.Add(dt.Rows(i).Item(0))
Next
Catch ex As Exception
MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OkOnly, "Connection Error !!")
End Try
Try
SQL = "SELECT * FROM company_detail"
ds = New DataSet
ObjAdapter = New MySqlDataAdapter(SQL, ObjMyConn)
ObjAdapter.Fill(ds, "Client_Company")
dt1 = ds.Tables("Client_Company")
Catch ex As Exception
MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OkOnly, "Connection Error !!")
End Try
End Sub
Private Sub ComboBox2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.TextChanged
Dim x As String ' x = The Client Company name that stored at dt1
Dim i As Integer
x = ComboBox2.Text
For i = 0 To dt1.Rows.Count - 1
If x = dt1.Rows(i).Item(1) Then
ComboBox2.Items.Add(dt1.Rows(i).Item(1))
End If
Next
End Sub
End Class
I would like to show the similar Client company dropdown at the combobox while the user is typing the name of the company. I have select all the client company into dt1 from the database,and now how could I check if the user is typing each character into combobox2 will display the similar company name on the combobox?
Beside that,should I used a textbox or combobox for this event is better or any other ideas?
Hope someone can give me some help on this.
Thank you all for reading.
Regards
Drex
|
|
|
|
|
drexler_kk wrote: I have select all the client company into dt1 from the database,and now how could I check if the user is typing each character into combobox2 will display the similar company name on the combobox?
I am not sure if I understand your question
Do you want to auto search (Auto Complete) the results from the combobox? Meaning when you press 'A', it will fetch all the combo items starting with 'A' and so on.
Mubashir
Senior Engineer
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|