|
What ie your Problem?
Be Specific and ask your Question?
Did you notice the Rules and Regulations before posting the Questions in the forum?
Regards,
Satips.
|
|
|
|
|
ya i saw it... i need help so only came here...
i have an access .mdb file... the thing is that i don have primary key 4 it.. DAO connection is being used....
so i select a list box point towards a field in dat table when i select in list box... what all rows i want should be displayed in a grid or as a report...
do please help me
|
|
|
|
|
daredevil_beware16 wrote: i have an access .mdb file... the thing is that i don have primary key 4 it..
Ok.
daredevil_beware16 wrote: DAO connection is being used....
is it ADO? not DAO.
daredevil_beware16 wrote: what all rows i want should be displayed in a grid or as a report
Did you able to show the datas from the table in the Front End.
While connecting to DB using ADO what error it shows?
Regards,
Satips.
|
|
|
|
|
actually am giving that code using data grid... i wanna select one row according to de name i select in de list
|
|
|
|
|
According to your other posts you are a student wanting to learn. So why do you want us to do if for you from scratch? Most of us learned by trying and trying again. If you want to learn, look at online tutorials or buy a book.
__________________
Bob is my homeboy.
|
|
|
|
|
i need a help i studied from scratch without learning any book or tutorial nor am able to afford to buy 1 thats de reason to be open
|
|
|
|
|
Hi
I wonder if any kind person out there may be able to help me.
I am writing an ocx (vb6), in which it is necessary to watch for directory and file changes.
Ths is done by creating a new thread and then using ReadDirectoryChangesW and WaitForSingleObject to do the watching. This works perfectly, but when the calling .exe shuts down, I have to be able to destroy this thread, and that is where the trouble starts.
Once this new thread is started if I attempt to shut down the calling application, the ocx does not terminate. Although it is sent a WM_NCDESTROY message by the caller, VB seems to intercept this and it never arrives at the ocx's window proc. The ocx's terminate event is not called either and the caller continues to run (albeit without a window). If I use the End directive in the IDE, VB crashes, and if I run it as a compiled exe, it does not terminate.
Does anyone know if it is possible to detect that the calling app wants to shut down so that I can destroy the extra thread created by the ocx and allow a normal shut-down to take place.
Any help would be appreciated as I am horribly baffled.
Bertram
|
|
|
|
|
You may use the WaitForMultipleObjects [^] function (instead of WaitForSingleObject one) to wait also for an event and then raise such event whenever you need to terminate gracefully your thread.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi Pallini
Thanks for your reply. Your suggestion is certainly a far more elegent way to end the thread, but unfortunately I cannot detect when parent of the ocx is about to shut down, as for some reason it does not call the terminate event
Bertram
|
|
|
|
|
Dear Sir/Maam,
I'm using visual basic 6 (NOT .net) to capture the screen (Screenshot) of a certain application window (Say, cmd.exe).
I already know how to capture the ACTIVE WINDOW. Is it possible to capture (Screenshot) an external proccess (cmd.exe) that is not the current ACTIVE WINDOW?
Please point me to the right direction.
Thank You.
PS: I did search codeproject for a possible article, all articles were all for VB.NET.
|
|
|
|
|
It's done using the exact same process. All you need is the window handle.
BUT!! (there's always one of these ) You can only capture what you see on the screen. If the window is not visible at all, you won't see anything in your captured image at all either.
|
|
|
|
|
Dear Sir Dave,
Is there any work around for that problem?
PS: How do I make use of the the Window Handler? Do you know any articles that might guide me?
Thank You Very Much.
|
|
|
|
|
Only if you can get the other application to render to a new device context. I don't exactly know how to do it myself, but I know it's doable. Warning! Not for the faint of heart, or newbie of skill! Google for "VNC VB.NET" for some library possibilities.
|
|
|
|
|
hi all
I have a banking project developed in vb and oracle( in cd). now i want to copy that project into a new system. So i created all the tables in oracle, but when i am trying to openthe proj in vb this message is poping out can any one help me. I am running out of time pl.
"d:/ documentand settings/....../New/MSRDC20.OCX could not be loaded continue loading Project?"
DO i need to make any changes in the settings for connectivity ans all. i just want to run my project. my tables are ready in oracle.
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Your project is using this component but it's not found on your machine. It WAS on the original machine, but it not installed on the machine you transferred the project to. Either the file is not found, or the control is not registered properly.
The MSRDC20.OCX is part of RemoteData Control. This control shipped with Visual Basic 5.0 and 6.0 Enterprise Edition only. It did NOT ship with the Learning or Professional Editions.
You should find this file under C:\WINDOWS\SYSTEM32. If it's there, open a CMD prompt and type:
C:\> CD C:\WINDOWS\SYSTEM32
C:\WINDOWS\SYSTEM32> REGSVR32 /U MSRD20.OCX
C:\WINDOWS\SYSTEM32> REGSVR32 MSRD20.OCX
|
|
|
|
|
thanks sir
I installed vb6 and removed the professional edition and it really worked
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
hello frnds,
how can i want to fetch some value from BLABLA table in to combobox using VB 6 how can i code ????
i am using SQL Server 2000 as a database.
how can i write connection string?
please help..
thankx and regards,
koolprasad2003
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
|
Hi,
I have this error:
"The CLR has been unable to transition from COM context 0x1a6e78 to COM context 0x1a6d08 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations."
this piece of code:
sqlcode = sqlcode & "'" & conv_str(System.Text.Encoding.Default.GetString(crs.Fields(cfieldix).Value), "mysql") & "'"
return the information from a blob field
and the function where the error is being thrown is:
Private Function conv_str(ByVal str As String, ByVal provider As String) As String<br />
<br />
Dim i As Integer, nlstr As String, rstr As Object<br />
' string validation check the string for invalid characters<br />
' keep characters that have the Asci code 32-165, 192-255 and 0,8,9,10,13<br />
' fix here the euro_symbol probleme :p<br />
' provider can either be MySQL or MSSQL<br />
Try<br />
str = str.Normalize()<br />
Catch ex As Exception<br />
'remember to make a detailed report of the error here<br />
conv_str = "NULL"<br />
<br />
Exit Function<br />
End Try<br />
<br />
Dim chrCode As Long, j As Long<br />
For j = 1 To Len(str) Step 1<br />
chrCode = Asc(Mid(str, j, 1))<br />
If chrCode < 32 Then<br />
If chrCode <> 0 And chrCode <> 8 And chrCode <> 9 And chrCode <> 10 And chrCode <> 13 Then<br />
str = Left$(str, j - 1) & " " & Right$(str, Len(str) - j)<br />
End If<br />
End If<br />
If chrCode > 165 And chrCode < 192 And chrCode <> 180 Then<br />
str = Left$(str, j - 1) & " " & Right$(str, Len(str) - j)<br />
End If<br />
<br />
Next j<br />
<br />
nlstr = ""<br />
rstr = ""<br />
i = 1<br />
<br />
If (provider.ToLower() = "mysql") Then<br />
While i <= Len(str)<br />
<br />
Select Case Mid$(str, i, 1)<br />
Case Chr(0) ' ASCII NUL<br />
nlstr = ""<br />
rstr = "\0"<br />
Case Chr(8) ' backspace<br />
nlstr = ""<br />
rstr = "\b"<br />
Case Chr(9) ' tab<br />
nlstr = ""<br />
rstr = "\t"<br />
Case Chr(180)<br />
nlstr = ""<br />
rstr = " '' "<br />
<br />
Case "'"<br />
nlstr = ""<br />
rstr = "\'"<br />
<br />
Case """"<br />
nlstr = ""<br />
rstr = "\"""<br />
Case "\"<br />
nlstr = ""<br />
rstr = "\\"<br />
Case Chr(10), Chr(13) ' line feed and carriage return<br />
If nlstr <> "" And nlstr <> Mid$(str, i, 1) Then<br />
' there was a previous newline and this is its pair: eat it<br />
rstr = ""<br />
nlstr = ""<br />
Else<br />
' this is a fresh newline<br />
rstr = LINE_BREAK<br />
nlstr = Mid$(str, i, 1)<br />
End If<br />
Case Else<br />
nlstr = ""<br />
End Select<br />
<br />
If rstr <> "" Then<br />
str = Left$(str, i - 1) & rstr & Right$(str, Len(str) - i)<br />
i = i + Len(rstr)<br />
rstr = ""<br />
Else<br />
i = i + 1<br />
End If<br />
End While<br />
<br />
End If<br />
<br />
<br />
conv_str = str<br />
<br />
End Function<br />
please help.
thanks
-- modified at 4:33 Monday 4th June, 2007
|
|
|
|
|
I don't use MySql so I don't know how much I'm going to be able to help. But, how many bytes is the value that's you're trying to convert to a string?? It would seem that the operation is retrieving a large block of data from the database and it's taking too long. What is this code supposed to be doing? What's in this field?
|
|
|
|
|
hi,
in the fields are xml documents but in bytes.
The field where I have this error is like 9 Mb
and the function reads the bytes and convert each byte for mysql.
|
|
|
|
|
Well, since 9MB takes a while to come out of the database, you might have run into the problem. Doing this with SQL Server exposes this as a stream, avoiding the blocking call waiting for the entire field to transfer all at once.
|
|
|
|
|
Hello,
I am trying to do as following and I am getting the message
"Cross-thread operation not valid: Control 'ProgressBar1' accessed from a thread other than the thread it was created on.":
My Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ind As Integer
Button1.Enabled = False
ProgressBar1.Step = 21
ProgressBar1.Value = 0
Dim trd As Threading.Thread = New Threading.Thread(AddressOf ThreadDo)
trd.Start()
ListBox1.Items.Clear()
For ind = 0 To 50000
ListBox1.Items.Add(ind)
Next
Button1.Enabled = True
End Sub
Private Sub ThreadDo()
ProgressBar1.PerformStep()
If ProgressBar1.Value >= ProgressBar1.Maximum Then
Timer1.Enabled = False
End If
End Sub
Please help
Thank you
Eric H.
|
|
|
|
|
You're not allowed to interact with UI components on another thread. I'd use the BackgroundWorker class and use it's progress notification to tell the main thread to update it's progress bar.
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 )
|
|
|
|
|
Thank you much, have you got any simple example on this.
Eric H.
|
|
|
|