|
You have some sort of race condition. The msgbox is probably creating a pause that means another thread is finishing it's work in time for the main thread to do what it needs to
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That's what I thought, so I put a delay, using the Sleep(), of 100 and 1000 msec. Didn't help. Anything else to try?
|
|
|
|
|
Without knowing anything about what your code is doing or seeing the code with the problem, there's really not much we can tell you. About the only other thing we could say is try dropping a call to DoEvents in place of the Sleep.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm trying to write a shared addin to extract data from MS Project and dump it into Excel or Access. Problem occurs using the TimeScaleData function and I try to access .Value. I'm using IEnumerator, convert the .Value to a string "Convert.ToString(TSV.Value) = "" Then", etc, per the SDK example. Works with the MsgBox as a "delay", bombs without it. Can access other values, ie TSV.StartDate, with no problem, either with or without MsgBox. Don't really want or need any Form; would like to just click on menu item under tools and dump desired data to CSV file.
|
|
|
|
|
The code would still make this easier...
Why are you converting the TSV.Value to a String? Why not just get the value itself and compare on that?
Try getting the value into another variable before you try to do anynthing with it. Do the comparison on that variable instead of the TSV.Value member. Might work, might not...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there,
I want to display child data in a standard datagrid using the .net 2.0 framework.
Its like the tables in access 2003 where you have the small + sign, when there is associated child data.
The standard datagrid displays only a link to the child data instead of displaying them.
I think i need to replace the link to the child data with my own control. But the big ? is how
Or anybody with other solutions suggestions ?
thx
|
|
|
|
|
If you are only looking for one level of child data, have you considered a master/details setup for your grid(s)?
Steve
|
|
|
|
|
Yes i only need one level and have already considered a master / detail layout.
But that does not fits my app.
The thing is that there already are some other fields with rtf data which already displayed in seperate controls. With an extra detail datagrid the form while be a mess for the user.
But thx for the suggestion
|
|
|
|
|
Hi all,
I am developing a small application in VB.NET 2003 that loads just over a 1000 contacts from MS Access and loads them into a datagrid. (That works pretty good, I can even add/edit/delete contacts ok)
I just want it to add the option of importing contacts in a couple of different ways, first one been from MS Excel.
I have no issues loading the excel file to the application, the following is just the two main lines of code where I load the excel file (obviously there is some extra code, I just don't think is relevant at this stage...)
oledbConnExcel.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilePath & ";Extended Properties=Excel 8.0;"
dt = oledbConnExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
After I am done loading the spreadsheet to a datagrid in a separate form, I make sure that connections and other objects that are no longer required for excel are removed;
oledbConnExcel.Close()
oledbConnExcel = Nothing
After all this my MS Access connection no longer works (even those connection that where ok prior of loading the Excel file)
The following are some of the references for Access connection;
If IsNothing(oledbConn) Then
oledbConn = New OleDb.OleDbConnection
Else
oledbConn.Dispose()
oledbConn = New OleDb.OleDbConnection
End If
oledbConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source= " & DBLConnPath & ";User Id=admin;Password=;"
As you can see, even though I use a different object all together I go and recreate the object and the connection every time.
If I don't use the Excel import function, I can dispose, create, etc... as many times as I want to the MS Access database.
I read a lot of forums, and they recommend checking the MDAC (which I did although I didn't have to as for the above sample)
What gives...?
Thanks in advance.
Alain
|
|
|
|
|
In my project i have a requirement of storing Text and Image in Access Database through VB.NET. And Access it back.
And most important thing is the Data (Text + Images + Tables + etc..) Should be displayed in Crystal Report..
One more thing the data has to be in 1 Column. I cannot divide the data.
Can any one plz help....
-- modified at 10:20 Wednesday 23rd August, 2006
Jats
|
|
|
|
|
Hi
I try to use the great looking GoogleTalkForm Component from here:
http://www.codeproject.com/cs/miscctrl/GoogleTalkWindowsForm.asp
I making a standart Windows Project and set a Reference to the "StyledForms" Dll
It works fine to do an instance of the googletalkwindow and show it, but how can i get the
look of this component at designtime to my standart form?
Sorry im not familiar with using extern components :=(
Thx for help
|
|
|
|
|
You need to ask this question in the forum for the component you downloaded.
If the question is that it's not showing in the designer, the VS2005 designer is a lot pickier than 2003, it won't show components that work fine, a lot of the time.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i have populated a data grid with like this
dim QryFrames As String = "SELECT F.ProductId, F.BrandName, F.Collection, F.Temple, F.Bridge, F.Eye, F.FrameName, F.Color, F.Meterial, F.FrameType,F.FrameShape, F.RimType, F.LenseColor, F.Gender,F.QtyInHand,F.ReorderLevel FROM Frames AS F INNER JOIN Stock AS S ON F.ProductId = S.ProductId and F.GrnNo=S.GrnNo"
ds = classes_obj.getRecord(QryFrames)
dgAddReorder.DataSource = ds.Tables(0)
here getRecord function return dataset for passes qry string.
this works on index change event of combo box.
my problem is user change combo box selected item this return (populate data grid) different order.that mean not in same order.
eg. say i want to get ReorderLevel for last column of data grid.so i place it as last item of Qry.but different times it get different location.(but first time ok. i think this because of cashing or something of dataset.)
i want to get this same position every time.
regards.
amila pradeep
|
|
|
|
|
hello friends
i want to use 'where like' statment to access date/time data type.
For ex.
Data type of my column is date/time , and values are like--
11:01:25
11:01:35
.
.
.
11:15:25
and i want to fire aquery which search records starting with "11:01"
plz help me out
thanks in advance
Born To Code
|
|
|
|
|
You put it in a string:
strSQL = "SELECT * FROM Table-Name WHERE Column-Name like '%initial%';"
When you want to use the query, you use the string variable in the code calling the database.
---
b { font-weight: normal; }
|
|
|
|
|
Please don't just delete replace your question with a new one. The thread gets rather confusing.
Also, try to write a subject that is not useless.
Anyway...
Don't use "like" on a date field. Calculate the starting time and ending time of the interval that you want, and use that in the query.
Example:
select this, that from sometable where somefield >= '11:01' and somefield < '11:02'
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
Can anyone plz help me in building an application in VB.Net which works like a Telephone answering machine and also has a feature of caller ID. I have read the TAPI document in the MSDN but i m unable to understand it fully.
|
|
|
|
|
Your question is too broad. At this point, the only way anyone can help you is by writing it for you. Which bits do you understand ? Which bits don't you understand ? Have you written any code yet ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I need to call a function, that resides in an unmanaged DLL, from VB.NET code that runs on a WINCE 4.2 device (.NET CF 2.0 SP1).
I followed msdn papers on pinvoke and marshalling but it keeps firing MissingMethodException.
I dumpbinned the dll, finding "1A2 machine (SH3)" into the headers (i'm using arm device). I've also found that the function "T4Init" appears as exported.
I tried to use alias "T4Init" and alias "#133" (number of the function) but no way.
I tried to use relative (the dll resides in the executable directory on the device) and absolute path but no way.
I cannot access dll source code, only compiled dll.
Here's the function prototype as in dll documentation:
int T4Init(LPCTSTR Port)
Here's the code:
Public Module DEMO
...
Declare Function T4Init Lib "T4CE.dll" (ByVal ComPort As String) As Integer
...
Public Sub Main()
Dim ErrString As Integer
ErrString = T4Init("COM" & CStr(i) & ":")
End Sub
End Module
Please help!
|
|
|
|
|
The problem was that another application installed T4CE.dll in \Windows folder.
It seems that having two copies of the same dll in system and local folder leads to conflicts:
http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ%2FPInvokeMissingMethodException
|
|
|
|
|
Have any of you used the report viewer in any of your own application ? Or is it only for the teacher starter kit ( vb express edition)
ihe
|
|
|
|
|
I have this error when i run my function...
i wonder did i use my method wrongly.. pls help.
Runtime error:
Command text was not set for the command object.
HEre my coding :
Set cn = New adodb.Connection
cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source= db1.mdb"
cn.Open constr ' constr is a connection string
sqlsql = "delete from [DO] where no = " & dono.Text
cn.Execute strsql, adExecuteNoRecords
|
|
|
|
|
You put the query in the variable sqlsql, then you try to use the variable strsql.
You should use Option Explicit, so that you can't create variables by mistake like this.
---
b { font-weight: normal; }
|
|
|
|
|
I looked straight through that piece of VB nastiness when I read it before, it's not something that would have occured to me as possible ( for the language to magically create undeclared variables )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
VB is very "nice", and automatically declares any variables that you use, unless you use Option Explicit to tell it not to.
Using Option Explicit is one of the things that turns VB from a toy to something that you can use just like if it was a real programming language.
---
b { font-weight: normal; }
|
|
|
|