|
I already told you what you have to do.
It's either expose all the functionality of your database through a Web Service you have to write or you switch to a database engine that supports communication over TCP/IP, like SQL Server or mySQL.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Once again thnx for immediate reply,
I got your point.
I will Work on it now.
Kiran Sajanikar
Software Engineer
CleverBIT softwares.
Pune.
|
|
|
|
|
Hi
i am facing a poblem in using the api
the api is
Private Declare Function GetProfilesDirectory Lib "userenv.dll" Alias "GetProfilesDirectoryA" (ByVal lpProfileDir As String, ByVal lpcchSize As Long) As Boolean
and the code is
Dim sBuffer As String
Dim strPARENT As String
sBuffer = ""
GetProfilesDirectory(sBuffer, 255)
when the control comes to to the execution of the code line
GetProfilesDirectory(sBuffer, 255)
there occurs the following error
Attempting to Read or write the protected memory
this is often an indication that other memory is corrupt.
please help.
|
|
|
|
|
I take it you're looking for something to give you the path to the Documents and Settings folder??
You don't need the API to do it:
Imports System.IO
Dim profilesPath As String
profilesPath = Path.GetDirectoryName(Environment.GetEnvironmentVariable("USERPROFILE"))
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi! All,
Please help me to sort out my problem of copying files from a folder of FTP site. I am using Inet Control for this purpose but it is giving an error that "Unable to Connect to remote host." The FTP site which I want to access need userid and password, which I am providing but still no result. Please help me how to resolve this problem.
Virendra
|
|
|
|
|
First, are you using VB6 or VB.NET and which version of VB.NET?
Next, let's see the code you're using to connect to this FTP server and get the file.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi! Dave,
I am using VB6. Main Code is as follows
Dim MyFTP as FTP
With MyFTP
'
' Initialize the FTP connection.
'
If Not .FTPInit(gsServer, gsUser, gsPswd, 0, 0, "", sError) Then
GoTo cmdReceiveError
End If
'
' Transfer the file(s)
'
If bSingleFile Then
Call .FTPGet(gsLocalDir, sFileType, gsFTPDir, sError)
If sError <> "" Then GoTo cmdReceiveError
Else
Call .FTPGetAll(gsLocalDir, sFileType, gsFTPDir, sError)
If sError <> "" Then
sMsg = sError
GoTo cmdReceiveError
End If
End If
'
' Close the connection.
'
Call .FTPClose
End With
lblStatus = sMsg
'
' cleaning.
'
Set MyFTP = Nothing
Dim bFiles As Boolean
Dim sFileName As String
Dim ofile As File
Dim ofiles As Files
bFiles = False
FTPPutAll = False
On Error GoTo FTPPutAllError
Set ofiles = fso.GetFolder(sLocalFolder).Files
For Each ofile In ofiles
sFileName = UCase$(ofile.Name)
If InStr(1, sFileName, UCase$(sFileNameString)) > 0 Then
bFiles = True
If Not FTPPut(sLocalFolder, sFileName, sFTPFolder, sError) Then
Exit Function
End If
End If
Next
Set ofile = Nothing
Set ofiles = Nothing
If bFiles Then
FTPPutAll = True
Else
sError = "No files found."
End If
Virendra
|
|
|
|
|
OK. I have no idea what the "FTP" class is, but it's not the Internet Transfer Control. If you're not using the ITC, you'll have to go back to the people that wrote the class you're using for support on it. I have no idea who that is or where the library came from. There's not enough information to track that down either.
The Internet Transfer Control has problems with it when using a Username and Password, as documented here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi every one,
I want to extract first word from a string (e.g. ASD XYZ)
then i want ASD to be stored in a separate variable.
Is there a vb function to do.
Thanx and rgds,
Ahmad
|
|
|
|
|
It must be the night of the stupid headers. How does 'help me urgent' not reflect every question asked here ?
The split method of the string class can turn your string into an array of two strings, ASD and XYZ.
dim s as string() = str.split(" ")
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
left("ASD XYZ", instr(1, "ASD XYZ", " ") - 1)
Regards
KP
|
|
|
|
|
If this was a VB.NET question, you shouldn't use the VB6 stuff, you should use the stuff that's in .NET. This is a lot more ugly than using split.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
left("ASD XYZ", instr(1, "ASD XYZ", " ") - 1)
Regards
KP
|
|
|
|
|
How Can i Start VB.NET ???
[]D @ []v[] []D @ []v[]
|
|
|
|
|
|
Try using Start --> All Programs --> Visual Studio.NET 2003 --> Microsoft Visual Studio.NET 2003 or if you have a different version it might go slightly different, but try doing something first before asking. Might solve a lot.
--Zaegra--
|
|
|
|
|
Buy a book and work through it before asking questions like this one. There's no way anyone can answer you in a meaningful way, as you'll have seen from the responses you've got.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi!
I have an embeded resource as wav file (hello.wav) and I would like to play it with my.computer.Audio.Play(). How can I do that?
Thanks
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
A little Google goes a long way... Results[^]
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
i want the combo box that accepts only capital letters.
|
|
|
|
|
I'm sure you do. How does VB.NET reflect this, and give people any idea of what you're asking ? Imagine if everyone typed the name of the forum into the header, how hard the forum would be to read.
You can handle the keypress event and either replace the character typed with a capital, or reject it if it isn't a capital.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Try the following code on the keypress event
If (e.KeyChar = "A") Then
e.handled=true
else
e.handled=false
End If
hope this may help u.
|
|
|
|
|
Hello,
I have 2 images, both loaded into pictureboxes. Now, i want to compare them using the GetPixel method (i know i al typed this before )
I tried the following: (the images have the same size)
but it does not work
Dim btm1 as new bitmap(picturebox1.image)
Dim btm2 as new bitmap(picturebox2.image)
dim i as integer
dim j as integer
for i = 1 to btm1.width
for j = 1 to btm1.height
Dim pixg1 as color
Dim pixg2 as color
pixg1 = btm1.getpixel(i,j)
pixg2 = btm2.getpixel(i,j)
If NOT pixg1 = pixg2 Then
...
End If
next j
next i
Can someone please give me the code to compare 2 images loaded into picturebox by going over each pixel using the GetPixel method it is kind of urgent
Thanks in advance,
--Zaegra--
|
|
|
|
|
Zaegra wrote: know i al typed this before
Yes, over and over. Why not reply to my response ?
Zaegra wrote: Dim btm1 as new bitmap(picturebox1.image)
Dim btm2 as new bitmap(picturebox2.image)
Wow, that's not convoluted. Why can't it be the same image, instead of a copy ?
Zaegra wrote: for i = 1 to btm1.width
for j = 1 to btm1.height
They are 0 indexed, and should end at height-1 and width-1 or they will throw an exception. They should also be called x and y for readability.
FWIW, this is also going to be very slow. VB.NET cannot do it faster, but C# can. How big are these images and how often do you need to do this ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|