|
hi all,
i am simply copy a file from one computer to other.i use following command
File.Copy(BakFileName, "\\" & mdChecking.PublicServerName & "\" & shellCommand.Trim.Replace(":", ""), True) 'mdChecking.PublicServerName is computer name.
above code works well when i copy file from XP to XP, VISTA to XP but fail when i copy from XP to VISTA and give error "Login Failure:unknown user name or bad password"
Please suggest how can i resolve this error?
|
|
|
|
|
And can you copy files using Explorer or other file manager software?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
It would appear that your code is building an invalid UNC path, or a path that doesn't exist. Move the code that builds the path to its own variable so you can see what it's building, then you can troubleshoot it better.
Dim destinationPath As String = String.Format("\\{0}\{1}", mdChecking.PublicServerName, shellCommand.Trim.Replace(":", ""))
File.Copy(BakFileName, destinationPath, True)
Now, the other part of the problem is are these two machines working in a Workgroup in an Active Directory??
If Workgroup, you've got problems. Each machine matintains its own list of user accounts and does NOT trust the accounts of another machine.
If in Active Directory, then is each machine in the same Domain?? Each machine in the domain will use and trust a central list of user accounts.
|
|
|
|
|
How can I receive a normal phone call using line H.323? I've done everything included in the code samples, successfully (Dim objTAPI As New TAPI3Lib.TAPI, objTAPI.Initialize(), mobjTAPI.EventFilter = ..., etc.); however, the events are not fired when there is an incomming call. Please help me.
|
|
|
|
|
I've never used TAPI or the TAPI library, so I really can't answer your question.
But, the first thing anyone is going to ask is do you have a TAPI 3.0 compliant modem and drivers and are the drivers installed for it??
Beyond that, I've got no answers.
|
|
|
|
|
Hi,
Using TAPI is bit tricky and hard , but there a wrappers available
over it , one of such wrapper is available at the following site
http://www.codeplex.com/C4FDevKit[^]
Its an open source wrapper , you can also find information regarding it on
http://www.microsoft.com/express/samples/c4fdevkit/default.aspx[^]
You can use it to recive phone call or to build Instant Voice response System kind of stuff
It has worked for me , hope you would also find it helpful
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hi,
I'm 100% sure that this wrappers will solve my problem. I'll work on it. Thank you very much! Really appreciate your help.
Regards.
Antonio Bockh
|
|
|
|
|
hii all, i m a newbi in programing world, n i searchd for my problem, finaly i came to this plce, please help me out, i hope i m posting this in proper section.
regarding my problem,
i m creating an application, in which i need to download csv files from one website,
i provide 2 diff dates, n my function will dwnload data ranging those 2 dates..
i want to add a progress bar, while its downloading a data
below d code is given
Public Class frm_CLF_Update
Private Sub frm_CLF_Update_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ProgressBar1.Visible = False
Label3.Visible = False
DateTimePicker1.Value = Now.AddDays(-7)
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 100
ProgressBar1.Step = 25
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If DateTimePicker2.Value < Now Then
ProgressBar1.Visible = True
Label3.Visible = True
Label3.Text = "Downloading data from the NSE-INDIA server. Please wait for few minutes(Depending upon internet Connection"
cl.Get_Data(DateTimePicker1.Value, DateTimePicker2.Value, 0)
ProgressBar1.PerformStep()
Label3.Text = " Downloading completed... Data cleaning process in progress."
cl.CleanUp() ProgressBar1.PerformStep()
Label3.Text = "Data Cleaned, Database Updated"
Else
MsgBox("Date Cannot be greter then todays date ", MsgBoxStyle.Exclamation)
DateTimePicker2.Value = Now
DateTimePicker2.Select()
End If
End Sub
End Class
is this the right way to add a progress bar??
cl.Get_Data(DateTimePicker1.Value, DateTimePicker2.Value, 0)
and
cl.CleanUp()
are two class member which download the data and clean it up...
please please sir, help me out in this, sorry for my english..
|
|
|
|
|
Your english is fine, you got the correct forum and I see no problem with your code.
I never use PerformStep so I can't comment, I set the value explicitly eg: ProgressBar1.Value = 25
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
ohh, thanx for the reply, but it also didnt work for me ,
n wat happns is, whn a class is called n its doing operation , the runnig form shows the message "NOT RESPONDING" tht is i cant select or stop the process from the form.. please can any one help me out from this??
|
|
|
|
|
It says "NOT RESPONDING" because you're code is block the apps ability to process it's message pump. This is why when your setting the Text of a label or trying to increment the progress bar, it appears as though nothing is happening. Your doing all of your apps long-running work on the UI thread, blocking the app from picking up the Paint messages, sitting in it message queue, to repaint the controls.
To keep the UI responsive, you're going to have to move the long-running process code to a background thread. You may want to look into the BackgroundWorker component in the Toolbox.
|
|
|
|
|
ohh, its a new task for me, i nver had used a background worker before, i'll try it, but can u please help me out , how can i use it?? i mean how to achive it using bckgroud worker?? sorry sir, i m new in this programming world so its difficult for me to develope those code , if u please help me figuring out, or can guide me how can i achve it, it'll be yr gr8 support, thank u ..
|
|
|
|
|
|
I am using the following code to create a new record in my database. If I try to edit this record after it is created I have issues. If I create the record and stop the program, restart it, then I can edit the info correctly. Any suggestions on what I am doing wrong? Am I asking too vague of a question here? Obviously I am stupidly new to this and I apologize in advance for my ignorance.
Private Sub newagent()
Dim myagentadd As New agentadd()
myagentadd.agentid = 0
Dim result As DialogResult
result = myagentadd.ShowDialog
If result = Windows.Forms.DialogResult.OK Then
Dim agent As HVDataSet.AgentRow
agent = myHVDataSet.Agent.NewAgentRow
agent.Agent_Address = myagentadd.agentaddress
agent.Agent_City = myagentadd.agentscity
agent.Agent_Company = myagentadd.agentcompany
agent.Agent_Email = myagentadd.agentemail
agent.Agent_First = myagentadd.agentfirst
agent.Agent_Last = myagentadd.agentlast
agent.Agent_Phone = myagentadd.agentphone
agent.Agent_State = myagentadd.agentstate
agent.Agent_Web = myagentadd.agentwebsite
agent.Agent_Zip = myagentadd.agentzip
myHVDataSet.Agent.AddAgentRow(agent)
Dim rowsaffected As Integer = 0
rowsaffected = AgentTableAdapter.Update(agent)
If rowsaffected > 0 Then
ToolStripStatusLabel1.Text = "New agent added named : " & myagentadd.agentfirst
Else
MessageBox.Show("Please try adding this agent again, my horseshit program has failed you")
End If
Else
End If
AgentTableAdapter.Update(myHVDataSet)
myagentadd = Nothing
End Sub
|
|
|
|
|
What code do you use to edit the record after adding it? What error message do you get or what does/doesn't work when you perform the edit?
|
|
|
|
|
I think it is a design issue, your parent form creates a dialog where the user enters the data and closes the dialog, then your parent form adds the record to your dataset and uses the table adaptor to update the database. I would do it differently.
parent form gets the ID of the record or 0 for a new record
instantiate the dialog passing the ID to the constructor
dialog gets the table/record based on the ID (empty table if new)
dialog creates a new row in the dialogs table adding any default information
dialog SAVES the record to the database when the user is finished
dialog passes the dialogresult to the parent form
parent form RELOADS the datatable if there has been a change from the dialog.
This style services both Add and Edit of a record, moves all the manipulation logic to the dialog and insures the database is up to date with the data.
The real drawback is that there is an additional read to refresh the parents datatable. I have been using this style of development for decades and it works perfectly for corporate CRUD.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
First off, thank you both very much for you responses. I know this is super mundane for you but I appreciate the help like you can't believe. Try to answer both posts with this. Basics is this, I am a mortgage lender, I work with real estate agents, we have a new lead generation system in place. Want to be able to record and report data back to them on what is taking place. Tables are Agent(recording specific agents info) property (linking descriptions to certain props and referencing specific agents to that prop) and Caller(keeping info on the people calling in)
The code I originally posted is located in my main form. I am using the showdialog as part of a new form loaded when someone wants to do something. This code you saw is written into my main form. In Mycroft's comments I know that is the problem, the last part about updating the parent form once I send info into the DB. Can't really figure out what I am doing wrong though. In regard to Kschuler's comments, here is the code I use to update the record once it is passed in(again through the main form when someone selects update an agent), what I cant figure out is why I cant start the program, add an agent, then turn around and update the record. If the program shuts down, starts up again, my code functions perfectly. If I try to do it all at the same time the error comes back telling me that my edit function is trying to add a new agent. Even though the code returns a value that specifies what agent I am trying to update. Variable selected agent is = the one I want to select, but the program thinks I am trying to add a new agent. This probably also has to do with another problem I am encountering when I databind a listbox to my agents first and/or last name and once I move away from the first agent listed, that agent disappears in the list box.
Private Sub upagent()
Dim myagentup As New Agentup
Dim result As DialogResult
result = myagentup.ShowDialog
If result = Windows.Forms.DialogResult.OK Then
Dim selectedagent
selectedagent = myagentup.TextBox1.Text
Dim agent As HVDataSet.AgentRow
agent = myHVDataSet.Agent.FindByAgentID(selectedagent)
agent.BeginEdit()
agent.Agent_Address = myagentup.agentaddress
agent.Agent_City = myagentup.agentscity
agent.Agent_Company = myagentup.agentcompany
agent.Agent_Email = myagentup.agentemail
agent.Agent_First = myagentup.agentfirst
agent.Agent_Last = myagentup.agentlast
agent.Agent_Phone = myagentup.agentphone
agent.Agent_State = myagentup.agentstate
agent.Agent_Web = myagentup.agentwebsite
agent.Agent_Zip = myagentup.agentzip
agent.EndEdit()
Dim rowsaffected As Integer = 0
rowsaffected = AgentTableAdapter.Update(agent)
If rowsaffected > 0 Then
ToolStripStatusLabel1.Text = "Updated record for Agent: " & myagentup.agentfirst
Else
MessageBox.Show("We were unable to process the request you gave, please try again.")
End If
End If
myagentup = Nothing
End Sub
|
|
|
|
|
Sorry to both of you. I have learned what I know of VB in the last two weeks. Basically your both speaking sputnik for the most part. I am sorry if I don't catch the nuances of what your saying. Want to talk mortgages, I'll blow your head off! =]
|
|
|
|
|
Hello,
I have develop a windows application in VB in which using web browser control I have embedded office word.But the problem is that I can't access content of word.So Pls help me.
Thanks in Regards.
|
|
|
|
|
There is no way to get at the content of the embedded word inside the browser control. You're going to have to completely rework your design to avoid using the browser control if you need to get at the Word document content.
|
|
|
|
|
i have a GL table in which code,desc,debit,credit field
i have a customer talbe in which opening balance come
i want to caclulate opening balance in crystal report
where user prompt for date
also i need a general ledger database in microsoft acess
plz advices thanks
|
|
|
|
|
adnanbilwani wrote: i have a GL table in which code,desc,debit,credit field
i have a customer talbe in which opening balance come
i want to caclulate opening balance in crystal report
where user prompt for date
So write a parameterized query into the database to return the opening balance from whatever date is passed in. You can then use the result in your CR report.
adnanbilwani wrote: also i need a general ledger database in microsoft acess
There is no chance that anyone is going to just GIVE you this. You have to write it yourself.
|
|
|
|
|
Hi all
- I am trying to disable all Textbox in GroupBox
- I am trying to filter the controls in a form so I can get only Textbox
The code I managed to do is this (which is working fine)
For Each _TextBox As Object In Me.GroupBox1.Controls
If TypeOf (_TextBox) Is TextBox Then
_TextBox.Enabled = False
End If
Next
I have 3 questions.
Q1: After I type the dot in "_Textbox." I see the object property is shown up in the intellisense because I had declared the variable _Textbox as Object , but when I am trying to declare it as Textbox it gives error message
For Each _TextBox As TextBox In Me.GroupBox1.Controls
{"Unable to cast object of type 'System.Windows.Forms.Label' to type 'System.Windows.Forms.TextBox'."} PS: I have Label in the groupbox
Q2: I am able to get only the textbox by doing (For Each + TypeOf), cannot I do it in single line or command?
Q3: In VFP there is a method belong to the form called SetAll , it works like this, form1.SetAll("Textbox","Enabled","False") .
Is there similar method in vb?
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Try changing:
For Each _TextBox As Object In Me.GroupBox1.Controls
If TypeOf (_TextBox) Is TextBox Then
_TextBox.Enabled = False
End If
Next
to:
For Each _TextBox As Control In Me.GroupBox1.Controls
If TypeOf (_TextBox) Is TextBox Then
_TextBox.Enabled = False
End If
Next
you might even be able to get away with:
For Each _TextBox As Control In Me.GroupBox1.Controls
If _TextBox Is TextBox Then
_TextBox.Enabled = False
End If
Next
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: If _TextBox Is TextBox Then
The above does not works.
I change Object to Control, It is better to work with it like this.
Thanks for the Idea.
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|