|
hello frnd,
what u use vb.Net or VB 6.0 ???
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
i use vb.net 2005.Thanks
phatkin
|
|
|
|
|
it's easy then
just call shell("ipconfig" > "C:\ip.txt")
it will create the text file at location C:\ip.txt
it contains the ip and other things too.
read it and get information
and to get the computer name
just use
my.computer.name
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Thanks to ya'all.Thanks so much.
this is a real post
am happpy
phatkin
|
|
|
|
|
the code doesnt work it says "file not found"
any help?is it some text formatting tn i need to do?
phatkin
|
|
|
|
|
koolprasad2003 wrote:
just call shell("ipconfig" > "C:\ip.txt")
it will create the text file at location C:\ip.txt
it contains the ip and other things too.
read it and get information
The real question is, would you do that in your project?? Would you create a text file each time and read from it every time you want the ip address? I'd bet that no customer would accept such a solution.
SG
|
|
|
|
|
Can u help GS? PLZ?
phatkin
|
|
|
|
|
WMI [^]is a good option.
This[^] may also help.
SG
|
|
|
|
|
Thanks...would work that out
Actually am working on a chat application in vb.net where it is asynchrounous and that each macine is act as a server and client and i wanted a way of displaying all computers on an LAN.
phatkin
|
|
|
|
|
|
no not ip messenger. this is smaller than that one fo ra project.
am trying to use shell cmd net view to get the computers and use a text file cos i can see my way around the rest but the storing to the text file gives me problems says file not found
phatkin
|
|
|
|
|
ERROR:Format() is a type and cannot be used as an expression
Why is it this function works smoothly in VB.NET 2003?
Format(1234, "0000")
but when i try to used it in Visual Basic 2005
an error occurs just like this...
'Format' is a type and cannot be used as an expression
here's my code:
****************************************
Function AutoGenerateEmpID(ByVal strSQL As String) As String
Try
Dim strID As String
Dim strCharYr As String
Dim strDigit As String
openDB() 'this is just my customized function..
dbRecordset.Open(strSQL, dbConnection)
strDigit = Format(Val(dbRecordset.Fields("IDNo").Value) + 1, "0000") 'my error occurs here...
strCharYr = Microsoft.VisualBasic.Right(Year(Now), 2)
strID = strCharYr & "-" & strDigit
'dbRecordset.Fields(0).Value
closeDB() 'this is just my customized function..
Return strID
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Function
***************************
Note: expect that dbRecordset.Fields("IDNo").Value returns an numbers which is in the form of string
***********************************
Please help....
I cant figure it out my self why is that so??
Is it there something i just forgot to imports some namespace or what??
Please help...
Thanks in advance!!
|
|
|
|
|
VB2005 obviously removes still more VB6 nastiness. You need string.Format
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
HI ALL,
I WOULD LIKEE TO EXPORT THE ACCESS DATABASE TABLE DATA IN EXCEL FROM VB6.0.I USED ADO REFERENCE TO CONNECT THE DATABASE.HOPE FOR QUICK SOLUTION.
PAWAN
-- modified at 5:12 Wednesday 22nd August, 2007
|
|
|
|
|
Hi,
I am using oracle to connect to the db and I have written the below code in vb.net. Any way u can try it and feedback me.
imports Microsoft.Office.Interop
Dim xl As New Excel.Application
xl.Workbooks.Add()
xl.ActiveSheet.Name = "Cash Report"
xl.Visible = True
j = 1
l = k = 0
For i = 1 To n - 1
j = 1
l = 0
For l = 0 To 4
xl.Cells(i, j) = ds.Tables(0).Rows(k)(l)
j = j + 1
Next
k = k + 1
Next
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
in vb 6.0 we can use the referance of the excel library.i used the excel library and export the data but my problm is that i have to already create excel file in certain location and display the record in that file .but i want to export the data with out creating excel file already.(have u undestood or not if not noty fy me)
|
|
|
|
|
Do u need to update the data into the same excel which was created earlier?
-- modified at 6:12 Wednesday 22nd August, 2007
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
I DO NOT LIKE TO USE THE EARLIER CREATED EXCEL FILE.I WANT TO CREATE NEW.
|
|
|
|
|
Hi,
The following code snippet will create a new excel file.
Dim xl As New Excel.Application
xl.Workbooks.Add()
xl.Visible = True
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
hi
sorry that code is not worked.simply i want to expor the data in excel by using vb 6.0 .my data base is MS Access.
|
|
|
|
|
Hi,
Please import the reference of microsoft excel(its a com file) into your application and then try. Because its working fine with my application.
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
Did you try using the DTS Wizard option that comes with SQLServer. There is an option to transfer between heterogenous data sources in it.
|
|
|
|
|
Your CAPS-LOCK key seems to be most probably on. Typing in ALL-CAPS normally indicates a bad temper (viz) shouting. It may also indicates an amateurish attitude in a public discussion forum.
|
|
|
|
|
Dear Everyone.....
Hope you will be in best of your health....
I have an immediate assignment from my boss to collect the knowledge that what are the best practices & architecture to deal with databaes, tables using vb .net...
Actual problem is that i want to know simply that what way i should adopt for the subject. weather i should go with using data source managers or i should create objects, classes, procedures or whatsoever is...
i can quote an example of my question as;
CONTROL --> DATABINDINGS --> DATASOURCE -->
DATA-ADAPTER-->DATABASE
please help me...
thanks
Khurram
|
|
|
|
|
Your boss wants you to learn how to properly write a database application ?
I'm all for a seperate data layer, and all SQL in stored procs. Some people swear by ORMs.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|