|
yeah well, its 1:19am on a Sunday am here, a colleague and I are in the office for perhaps another hour ... so if they read my mind it'll be
------------------------------------------ (flatline)
|
|
|
|
|
Garth J Lancaster wrote: so if they read my mind it'll be
------------------------------------------ (flatline)
Yep
My mom once had a license plate frame on her car that said:
I read your mind, but it was blank
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
What else can I say?
Blog link to be reinstated at a later date.
|
|
|
|
|
.. hope you're well and safe over there 'lls'
|
|
|
|
|
Sure. It means the code you wrote that does some access to a database created a situation that caused an error. With what you've posted, that's about the best explaination anyone can give you.
|
|
|
|
|
How to copy a DAT file from one machine to another within a workgroup with using code in vb6
I am using the below code:
Private Declare Function CopyFile Lib "kernel32" _
Alias "CopyFileA" (ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, ByVal bFailIfExists As Long) _
As Long
Public Function APIFileCopy(src As String, dest As String, _
Optional FailIfDestExists As Boolean) As Boolean
'PURPOSE: COPY FILES
'PARAMETERS: src: Source File (FullPath)
'dest: Destination File (FullPath)
'FailIfDestExists (Optional):
'Set to true if you don't want to
'overwrite the destination file if
'it exists
'Returns (True if Successful, false otherwise)
'EXAMPLE:
'dim bSuccess as boolean
'bSuccess = APIFileCopy ("C:\MyFile.txt", "D:\MyFile.txt")
Dim lRet As Long
lRet = CopyFile(src, dest, FailIfDestExists)
APIFileCopy = (lRet > 0)
End Function
Private Sub Command1_Click()
Dim Str
Str = APIFileCopy("c:\FeatherTexture.bmp", "\\sim3\D$\FTP\FeatherTexture.bmp", False)
End Sub
The Problem is that whenever I try to copy the file to any of the machine in the woprkgroup, it is not copying. After I open the other computer in the workgroup from my computer using "Run" command and type username and password and got connected to the other computer, it allows me to copy the file. But I dont want to select "Run" command and type username and password, because I want to copy the file to multiple machines in the work group. I doesn't make sense typing user name and password for all the computers in the workgroup in order to copy the file.
Pls provide me some solution to copy the file only by using the code without using the Windows "Run" command
|
|
|
|
|
hmmm.. why dont you look at using wnetaddconnection first to create a connection to each other machine in turn (for which you'll need the userid and password on each machine) and then copy to/thru that ... then use wnetcancelconnection when done
although this is c#, you can use the same idea :-
http://www.codeproject.com/KB/system/Map_Network_folder_UNC_.aspx[^]
(else, you could permanently map a connection from each machine to your source machine, but thats a bit inflexible)
oh, if you go along the first route, maybe you want to store each machine's credentials in encrypted form (and maybe have a common userid/password on each for this task)
hth
'g'
|
|
|
|
|
Since you're using workgroup mode to do your networking, each machine maintains its own user/password database and does NOT trust the ID's in any other machines user database. This means you have no choice but to specify a username and password for each machine your going to copy files to. If these machines were setup in a domain environment, this wouldn't be a problem at all since all the machines in the domain trust the same user database.
There is no code that will solve this problem for you.
|
|
|
|
|
Thanks Lloyd Atkinson for your suggestion but it is not a proper answer for me.
I want to open a text file by right clicking on it,choosing 'open with' option,and selecting my program.
I want to open text file as 'open with' my program instead of executing my program and then opening texe file.
Plz help me...
|
|
|
|
|
|
Oh I see what you mean now, you will just have to register your file type in the registry like Eslam Afifi said.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
|
Well, what do you mean? Are you incapable of reading the comments in the code?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I am not incapable of reading the comments because they have been written by myself. I think you didn't understand the question all i was asking the technical working what is happening in the memory when we execute the given code.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
AliAmjad wrote: you didn't understand the question
Well, it was so off worded, do you really expect anyone to understand?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Not sure what you are asking here. Are you asking for guidance on interfaces?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Ok here is what i am trying to accomplish i am working on an Application Framework and using both the composition approach and inheritance approach all i was asking the technical working of the code given what is actually happening in the memory as there is some confusion i am facing that's why asking.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
WHAT THE HELL ! when someone don't understand the question he/she mark it as bad question. You all guys are expert out there i am sure but i don't consider myself one that's why i was asking for help from all the experts & brilliant brains out there in order to eliminate the confusion i am facing. If by asking something that hurts your ego or that's way too below your expectation then please don't even bother to answer just IGNORE.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
Your question, as worded, implies that you don't know anything about how to declare a variable or create an instance of a class. This is VB.NET 101 type stuff, which is probably why you got knocked down.
The answer to the question at hand is quite simple. Memory is allocated to hold an instance of the object, both the code and data seperately. The code is only kept in memory once for every instance of the class, while each instance's data is kept seperately in their own blocks of memory.
If you wanted to know something beyond this, perhaps an explanation of what you're thinking is going on, or what the situation is you're facing, or why you're looking for more detail would be in order.
|
|
|
|
|
I know all this but may be i am not able to ask the question properly or you are not getting my point anyway thanks a ton for your help Dave.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
Dave Kreskowiak wrote: perhaps an explanation of what you're thinking is going on, or what the situation is you're facing, or why you're looking for more detail would be in order.
Yes, that would be very nice.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I am completely off the road i think if i can rephrase the question should i ask - How memory is allocated to an object in Heap? If you came across any technical article on this topic please let me know Thanks.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
AliAmjad wrote: How memory is allocated to an object in Heap?
Yes, that would have helped alot.
|
|
|
|
|
AliAmjad wrote: Dim nyBus As ICalculateTax = New NewYorkBusiness
An instance of the NewYorkBusiness class (I suppose that it's a class) is created on the heap. The reference to the instance is stored in the nyBus variable. The nyBus variable can hold a reference to any class that implements the ICalculateTax interface.
AliAmjad wrote: Dim nyBus As BasicBusiness = New LahoreBusiness
An instance of the LahoreBusiness class is created on the heap. The reference to the instance is stored in the nyBus variable. The nyBus variable can hold a reference to the BasicBusiness class or any class that inherits it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Im trying to print to a 40 column printer through my VB Application. But the printer instead of printing it will keep showing Spooling status. Im Using Epson TM-U220PD Printer, VB 6.0 and Sql Server 2000 as Backend. Anybody plz help me out in this context. I need to solve this urgently...
Here is my code...
sql = "select * from ReportTable"
If rstemp.State = 1 Then rstemp.Close
rstemp.Open sql, con, adOpenStatic, adLockOptimistic
If rstemp.EOF = False Then
'Open "LPT1" For Output As #intFreeFile
Open App.Path & "\reports\Billing.txt" For Output As #1
Printer.Print ""
Printer.FontName = "Arial"
Printer.FontBold = False
Printer.FontSize = 8
Print #1, vbTab & Trim(rstemp!CompanyName)
Print #1, vbTab & Trim(rstemp!BranchName)
Print #1, Space(1) & Trim(rstemp!Address) & Trim(rstemp!Street)
Print #1, vbTab & Trim(rstemp!City) & "," & Trim(rstemp!Phone)
Print #1, Space(1) & "CST No:" & Space(1) & Trim(rstemp!CATName) & Space(2) & "KST No:" & Space(1) & Trim(rstemp!DeptName)
Print #1, Space(1) & "TIN No:" & Space(1) & Trim(rstemp!VATNo)
Print #1, "-------------------------------------"
Print #1, " CASH BILL "
Print #1, "-------------------------------------"
Print #1, "M/s: " & Trim(rstemp!EANCode)
Print #1, "BillNo: " & Trim(rstemp!slno)
Print #1, "Bill Dt: " & Trim(rstemp!a1Date) & Space(3) & "Time: " & Right(Trim(rstemp!a2date), 12)
Print #1, "-------------------------------------"
Print #1, "SN" & Space(1) & "Desc." & vbTab & Space(4) & "Qty" & Space(2) & "Rate" & Space(4) & "Amt"
Print #1, "-------------------------------------"
slno = 1
totitem = 0
totamt = 0
Do Until rstemp.EOF
If Len(rstemp!ItemName) <= 14 Then
Print #1, Space(1) & Trim(slno) & Space(1) & Trim(rstemp!ItemName) & Space(14 - Len(Trim(rstemp!ItemName))) & Space(3) & Trim(rstemp!Qty) & Space(3 - Len(Trim(rstemp!Qty))) & Space(2) & Trim(Format(rstemp!sp, "#0.00")) & Space(6 - Len(Trim(rstemp!sp))) & Space(2) & Trim(Format(rstemp!amount, "#0.00"))
totitem = totitem + Val(rstemp!Qty)
totamt = totamt + Val(rstemp!amount)
Else
str1 = Trim(Left(rstemp!ItemName, 14))
str2 = Trim(Mid(rstemp!ItemName, 15, 40))
Print #1, Space(1) & Trim(slno) & Space(1) & Trim(str1) & Space(14 - Len(Trim(str1))) & Space(3) & Trim(rstemp!Qty) & Space(3 - Len(Trim(rstemp!Qty))) & Space(2) & Trim(Format(rstemp!sp, "#0.00")) & Space(6 - Len(Trim(rstemp!sp))) & Space(2) & Trim(Format(rstemp!amount, "#0.00"))
totitem = totitem + Val(rstemp!Qty)
totamt = totamt + Val(rstemp!amount)
End If
slno = slno + 1
rstemp.MoveNext
Loop
Print #1, "-------------------------------------"
Print #1, " Total : " & Trim(totitem) & Space(3) & Trim(Format(totamt, "#0.00"))
Print #1, "-------------------------------------"
Print #1, "Some text goes here"
Print #1, "Goods once sold will not be exchanged or "
Print #1, "taken back. "
Print #1, "Some text goes here"
Print #1, "Some text goes here"
Print #1, "Some text goes here"
'Ejecting the page
Print #1, Chr$(12);
'Releasing the printer
Print #1, Chr$(27); "q";
Close #1
Else
'Do Nothing
End If
rstemp.Close
|
|
|
|
|