Click here to Skip to main content
15,914,905 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Screen Capture a Certain Application Pin
Ian Uy4-Jun-07 11:14
Ian Uy4-Jun-07 11:14 
GeneralRe: Screen Capture a Certain Application Pin
Dave Kreskowiak4-Jun-07 14:05
mveDave Kreskowiak4-Jun-07 14:05 
Questionproblem in loading the project Pin
Prakash_Mishra3-Jun-07 21:25
Prakash_Mishra3-Jun-07 21:25 
AnswerRe: problem in loading the project Pin
Dave Kreskowiak4-Jun-07 3:52
mveDave Kreskowiak4-Jun-07 3:52 
GeneralRe: problem in loading the project Pin
Prakash_Mishra4-Jun-07 20:53
Prakash_Mishra4-Jun-07 20:53 
Questionhow can i create connection and do the operation in vb Pin
koolprasad20033-Jun-07 21:10
professionalkoolprasad20033-Jun-07 21:10 
AnswerRe: how can i create connection and do the operation in vb Pin
originSH3-Jun-07 23:24
originSH3-Jun-07 23:24 
Questionerror with thread Pin
WhiteGirl233-Jun-07 20:58
WhiteGirl233-Jun-07 20:58 
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
AnswerRe: error with thread Pin
Dave Kreskowiak4-Jun-07 3:44
mveDave Kreskowiak4-Jun-07 3:44 
GeneralRe: error with thread Pin
WhiteGirl234-Jun-07 20:23
WhiteGirl234-Jun-07 20:23 
GeneralRe: error with thread Pin
Dave Kreskowiak6-Jun-07 16:29
mveDave Kreskowiak6-Jun-07 16:29 
QuestionProgressBar Thread Pin
ayeleteric3-Jun-07 19:56
ayeleteric3-Jun-07 19:56 
AnswerRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 20:25
protectorChristian Graus3-Jun-07 20:25 
GeneralRe: ProgressBar Thread Pin
ayeleteric3-Jun-07 20:49
ayeleteric3-Jun-07 20:49 
GeneralRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 21:55
protectorChristian Graus3-Jun-07 21:55 
GeneralRe: ProgressBar Thread Pin
ayeleteric3-Jun-07 21:59
ayeleteric3-Jun-07 21:59 
AnswerRe: ProgressBar Thread Pin
ScottM13-Jun-07 23:21
ScottM13-Jun-07 23:21 
GeneralRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 23:46
protectorChristian Graus3-Jun-07 23:46 
GeneralRe: ProgressBar Thread Pin
ScottM13-Jun-07 23:59
ScottM13-Jun-07 23:59 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:09
protectorChristian Graus4-Jun-07 0:09 
GeneralRe: ProgressBar Thread Pin
ScottM14-Jun-07 0:22
ScottM14-Jun-07 0:22 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:25
protectorChristian Graus4-Jun-07 0:25 
GeneralRe: ProgressBar Thread Pin
ayeleteric4-Jun-07 0:00
ayeleteric4-Jun-07 0:00 
GeneralRe: ProgressBar Thread Pin
Christian Graus4-Jun-07 0:12
protectorChristian Graus4-Jun-07 0:12 
GeneralRe: ProgressBar Thread Pin
ayeleteric4-Jun-07 0:16
ayeleteric4-Jun-07 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.