|
mmmm..
permission set as normal, you can try to add 'everyone' with read and write....
here are 2 other suggestions...
1. maybe someon else has this file open. check for the '.ldb' file in that directory then you wil know.
2. why not create an odbc connection under admin tools to this mdb file.
then in you code you can call up this datasource eg.i have always used this and it hasn't given me any errors thus far....
here is the connectionstring = "DSN=TEST;PWD=PASSWORD"
where 'TEST' is the datasource name and password if any password!
sorry but this all i can think of at this moment, will check on other solutions.
|
|
|
|
|
Thanks lot.
Yes But I am having one doubt with DSN.
When i create and use with(System DSN)...then i need to create dsn in all the systems? or is there any options in Package and Deployment, that will automatically create dsn in all the systems when we install this application?
Expecting your reply.
Regards,
|
|
|
|
|
Yes, there is a way,
have not tried it myself but you can give it a shot...
here is what you do...
if not create the access odbc connection to the mdb file...then
[A.] Familiarise yourself with this...
1. click start..run- type in regedit.
2. navigate to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\[your datsource name]
3. you will notice that there are certain folders and files taht point to the file along with Engines!
[B.] NEXT...
1. open you project, right click your setup project name and select "View Registry"
2. You now have a registry tree in front of you.
3. you will need to re-create the treenodes here as found in the registry editor mentioned above in [A].
4. build and install on your pc to test!
this should create the odbc with relevant info....
hope this helps...
|
|
|
|
|
Currently i'm pulling out data by using this code:
odCommand = New OleDbCommand("select top 5000 * from TPers, TComp where tpers.compkey = tcomp.compkey", odConnection)
odReader = odCommand.ExecuteReader
While odReader.Read
InsertDBIndexData(odReader("persid").ToString, odReader("cpr").ToString, odReader("firstname").ToString & " " & odReader("lastname").ToString, odReader("legalname").ToString, odReader("tpers.address1").ToString)
End While
odReader.Close()
this takes 5 minutes and 5000 people is indexed in my LuceneDB. But the AccessDB contains more than 100.000 people, so the faster the better. I also tried to index the whole DB, but with this code it's never finished. Don't know why.
What's the fastest and best way to pull data from an AccessDB?
|
|
|
|
|
I doubt Access is as fast as SQL Server, perhaps you've outgrown access ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm afraid i have no choice but to stick with Access. But you're certainly right though.
There's no way to get that data any faster than using the method i've already posted? Or just a better method that wont crash the program if it's running for too long.
|
|
|
|
|
Not really. Why are you using the TOP modifier in the SQL? You're not doing any ordering, so it looks like you're just using it to limit the results returned, which could be ANY 5000 of the record set returned constrained by the WHERE clause.
The biggest part of the problem may not be the records returned, but by the code running in InsertDBIndexData . If it's adding data to a sorted collection, the data will be added slower and slower as the size of the collection increases.
|
|
|
|
|
Thanks for your reply.
I'm not sorting anything, only adding it to a Lucene.Net indexing database. This is how the code looks:
Private Sub InsertDBIndexData(ByVal idbID As Integer, ByVal sCPR As String, ByVal sName As String, ByVal sCompany As String, ByVal sAddress As String, ByVal sStatus As String, ByVal sType As String)
'New person in the index
Dim writer As New Lucene.Net.Index.IndexWriter(DBIndexLocation, New StandardAnalyzer, False)
Dim doc As New Document
Dim f1 As New Field("dbID", idbID, Field.Store.YES, Field.Index.NO)
Dim f2 As New Field("CPR", sCPR, Field.Store.YES, Field.Index.TOKENIZED)
Dim f3 As New Field("Name", sName, Field.Store.YES, Field.Index.TOKENIZED)
Dim f4 As New Field("Company", sCompany, Field.Store.YES, Field.Index.TOKENIZED)
Dim f5 As New Field("Address", sAddress, Field.Store.YES, Field.Index.TOKENIZED)
Dim f6 As New Field("Status", sStatus, Field.Store.YES, Field.Index.NO)
Dim f7 As New Field("Type", sType, Field.Store.YES, Field.Index.NO)
doc.Add(f1)
doc.Add(f2)
doc.Add(f3)
doc.Add(f4)
doc.Add(f5)
doc.Add(f6)
doc.Add(f7)
writer.AddDocument(doc)
writer.Optimize()
writer.Close()
End Sub
Private Sub newIndex()
Dim odConnection As oleDbConnection = new oleDbConnection("......db.mdb")
odConnection.Open()
Dim writer As New Lucene.Net.Index.IndexWriter(DBIndexLocation, New StandardAnalyzer, True)
writer.Close()
odCommand = New OleDbCommand("select * from Customers", odConnection)
odReader = odCommand.ExecuteReader
While odReader.Read
'InsertDBIndexData(odReader("id"), odReader("cpr"), odReader("firstname") & " " & odReader("lastname"), odReader("legalname"))
InsertDBIndexData(odReader("persid").ToString, odReader("cpr").ToString, odReader("firstname").ToString & " " & odReader("lastname").ToString, odReader("legalname").ToString, odReader("address1").ToString, odReader("Status").ToString, odReader("InsType").ToString)
End While
odReader.Close()
End Sub
The only optimizing i can figure out here, is to only open the (Lucene.Net)writer once. And when i'm indexing it also takes up ALOT of resources. Is there any way i can limit that?
Would it be better to first drag everything out of the DB, place it in an ArrayList and when that's done, start moving it to the Lucene.Net index?
|
|
|
|
|
Jan Sommer wrote: writer.AddDocument(doc) writer.Optimize()
I get the feeling that this is where your code spends most of it's time. Just on these two lines. You can use the ANTS profiler, or CompuWare's, to find out how much time it takes to execute these instructions.
Jan Sommer wrote: And when i'm indexing it also takes up ALOT of resources. Is there any way i can limit that?
No, there isn't.
|
|
|
|
|
The writer.optimize() part certainly took alot of time. I removed it and placed it after the while odreader.read, and that saved me 1/3 of the time it took to index the db. But it still isn't fast enough.
Currently i'm indexing the DB and when i check the taskmanager it says something like:
Process: IndexService.exe, CPU: 00 (sometimes 01) and memory: between 100.000 and 800.000
Why is it taking up all the memory and not using the CPU?
The indexing program is soon going to run on a server with a bit more ram. I hope that will speed up things a little.
Will it be any faster if i somehow convinced the IT-department to switch to MSSQL?
|
|
|
|
|
We have a problem with outlook size limit and are not allowed to create pst. I can only copy those msg to a folder. Do you have any idea how to store this msg in access and create forms in access to view this msg.
|
|
|
|
|
Can I select a certain time such as 4:00PM on a particular date with a dateTime picker?
I only saw a date selection in the dateTime picker.
|
|
|
|
|
hi,
use following code to getTime.
MsgBox(DateTimePicker1.Value.TimeOfDay.ToString)
also if you want to display time with date in datetimepicker then change the "format" property of datetimepicker to "Custom" and custom property to MM/dd/yyyy hh mm tt
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Can I make it so that the time picker will only choose each hour or half hour.
|
|
|
|
|
hi,
i does not properly get you (Because of my poor english). Please told your problem in detail & simple way, so i can suggest you.
However you can show only time in DatetimePicker by change the CustomFormat property to "hh mm tt"
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I need to create a time picker that only shows every hour on the hour such as 4:00 PM and 5:00 PM. I also want it to show each half hour such as 4:30 PM and 5:30 PM.
Does the time picker do this or does it only show by the minute such as 5:01 PM, 5:02 PM, etc.
|
|
|
|
|
hi,
i think you want to show Time in hour or Half hour format.
Change CustomFormat property to "hh 00" or "hh 30" according to conditon
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Can the date time picker do both date and time at the same time?
|
|
|
|
|
yes. you can .
use following for get date and time
msgbox DateTimePicker1.Value.ToString
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hii
Thanks now i got the shapes present on the panel at runtime .
1 ) Now , the problem is , i am having some normal controls like Textbox,Rb,CBox,Checkbox,Grid ..which are generating at runtime on the panel(Runtime generated ).Now if if move the RectangleShape ,OValShape on those controls ( Textbox,Rb,CBox,Checkbox,DataGridview ..) Dark Lines scattering all over the control are appearing while Dragging from one place to another place (For this i used pickbox from codeproject for shapes ) on the panel .I have refresh my panel again .THis makes the Shape controls Flickering all the time .
2 ) If i create a control .like Textbox,Rb,CBox,Checkbox,Grid on the location of Shape control ,The boundaries of shape controls are appearing on the Control which is not good for looking . I want like at Visual Studio 2005 Design time .It has to go back of the control and doesnt show the boundaries of shapecontrol on normal control .
3) Its not in the smooth way like in Visual studio 2005 design time
Thanks ,
|
|
|
|
|
VB 8.0 wrote: 1 ) Now , the problem is , i am having some normal controls like Textbox,Rb,CBox,Checkbox,Grid ..which are generating at runtime on the panel(Runtime generated ).Now if if move the RectangleShape ,OValShape on those controls ( Textbox,Rb,CBox,Checkbox,DataGridview ..) Dark Lines scattering all over the control are appearing while Dragging from one place to another place (For this i used pickbox from codeproject for shapes ) on the panel .I have refresh my panel again .THis makes the Shape controls Flickering all the time
Yes. This is because you're not redrawing the controls that you're dragging the line over. Until those controls are redrawn, they'll look like garbage. The problem with doing this is that you will be redrawing a lot more stuff for each MouseMove event you get. This can cause even more flickering than you're dealing with now.
VB 8.0 wrote: 2 ) If i create a control .like Textbox,Rb,CBox,Checkbox,Grid on the location of Shape control ,The boundaries of shape controls are appearing on the Control which is not good for looking . I want like at Visual Studio 2005 Design time .It has to go back of the control and doesnt show the boundaries of shapecontrol on normal control .
I have no idea what you're talking about with this one. I'm guessing that you'll have to redraw the entire panel control, along with all of it's child controls again once the new control is added.
VB 8.0 wrote: 3) Its not in the smooth way like in Visual studio 2005 design time
Google for "Host Visual Studio Forms Designer". You may be surprised at what it takes to do what you want.
|
|
|
|
|
THanks ,
i used BringToFront ,SendToBack then it is working properly .
|
|
|
|
|
Hello everyone,
I need to draw a racetrack map using GPS data. Please kindly help or tell me where i can get help from?
Thanks a lot!
Much appreciated
Amar
|
|
|
|
|
Sounds like you need a lot of help. Why do you need to do this ? Have you accepted a job and now you're hoping we'll do it for you ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Wow, pretty tough response since he didn't ask anyone to write it...he just asked for help or direction.
Who cares why he needs it....and why do you assume the worst??? Such a cutting response to assume he accepted a job and now he's hoping you all will do it for you.
God I hope you aren't in Tech support....
Ken
|
|
|
|
|