Hello, I have two data tales in Access. One contais 2 million recors and the other contains 116000 records. The Customer name, street address, city and zip code fields need to be matched against each other across both tables in order to fin mismatches and exact matches. Since one of the tales is very large, I am having a problem with the database program hanging every time I run the query. I tried doing this in SQL server 2005 as well, with no success. Can anyone suggest a method for accomplishing this? Regards.
kshincsk
Posts
-
LARGE database query -
Etracting certain text from PDF document into a databaseDear Dave, Thanks a lot for the suggestion. I found just the perfect piece of code.
Public Function Extract(ByVal TextIN As String, Optional StartTag As String = " ", Optional ByVal EndTag As String = " ", Optional ByVal CheckCase As Boolean) As String On Error GoTo LocalError ' Extracts Text from string using start and end "tags" 'NB: If EndTag is ommitted the entire string from: ' StartTag to EndOfString is returned... Dim lArray As Variant Extract = "" lArray = Split(TextIN, StartTag) If IsArray(lArray) Then Extract = lArray(1) lArray = Split(Extract, EndTag) If IsArray(lArray) Then Extract = lArray(0) Else Extract = "" End If End If Exit Function LocalError: Extract = "" End Function
It works beautifully. Now, All I need to do is put all the keywords into a database and do a recursive search using those fields dynamically at runtime. Thanks a million for your help. Best Regards, Kumar -
Etracting certain text from PDF document into a databaseHello. I am currently working on a project to extract data from a PDF document into structured database tables. I have solved the problem of extracti9g the text from a pdf into a text box in vb6 form by using a readymade dll component that I referenced in my program. Now my problem is, how to extract only certain pieces of data from the text based on some keywords that appear in the text. for example in the pdf document: Existing Chemical Substance ID: 50–00–0 CAS No. 50–00–0 EINECS Name formaldehyde EINECS No. 200–001–8 Molecular Formula CH2O I need to extract "50-00-0" that appears after the keyword "CAS No.", then the text "formaldehyde" that appears after the keyword "EINECS Name" and "200-001-8" that comes after "EINECS No.". I have database table which contain these keywords as field names. What I want is the table to look like this: Sno CAS No. EINECS Name EINECS No. 1 50–00–0 formaldehyde 200–001–8 I would really appreciate it if someone could point me towards the string manipulation functions that I would need to use i order to do this. Also How to get count of a keyword if it appears multiple times between two other keywords. Thanks and Regards, Kumar
-
How to setup SQL Server database on a server for use as back-end for ASP.Net Web application?Hello. I am a total newbie to SQL Server, having worked extensively on MS Access and VB 6.0 only. But now i have upgraded to Visual studio 2008 and have slowly started to update myself on the new platform. I have SQL Server 2005 and I i know how to create tables and database files. But I don't have any clue whatsoever as to how to deploy/migrate the database that I have created as on a server whose address I can reference by its IP address. Could someone help me or point me out to good articles or links to PDF's where I might find step by step instructions? By the way, my next project is a web application in ASP.Net. Thanks and regards, Kumar.
-
Populate a Treeview from Database in VB6.0Hi I would like to populate data from a database into a treeview in vb6.0 application. I have a table in this format Child Parent 1st Level 2nd Level 3rd Level 50000011 50014561 GB_3623 GB_3440 50000012 50000012 GB_3908 GB_5000 50000012 50000012 GB_3908 GB_5000 50000013 50026347 50000014 50010875 GB_6135 GB_5000 50000015 50010414 50000017 50000017 GB_3922 GB_3900 GB_5000 50000018 50000018 GB_3220 50000018 50000018 GB_3220 50000019 50010473 GB_3440 50000019 50010473 GB_3440 etc etc etc. Now from this table to my vb6 form 3rd Level is GreatGreatGrandparent, 2nd Level is GreatGrandparent, 1st Level is Grandparent, Parent is parent & Child is is child I want to represent this in a tree view control in vb6.0 and when I search from my form for any of the five fields mentioned above, the treeview should highlight that particular node and set the expanders on that particular hierarchy. I am not familiar with treeview control at all. Can someone help me please? Yours desperately , Kumar.
-
Multi User Application with Access databaseHi Dave, Thanks a lot for the advice. I just created a record off the fly and used it to retrieve the ID with minimum value and "Flag=N" meaning it has ot been used for ay update. Then , I insert the data based on the text fields in my form. then I change the "Flag" field to 'Y' to say that this particular record has been used and use the followind method. Then I used the "idreturn" method to return the lowest value of ID with Flag=N. Worked like a charm!!! Absolutely no multi-user conflicts since each user would be opening a different record at the same time.
Dim strsql Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset strsql = "SELECT * " strsql = strsql & "FROM main " strsql = strsql & "WHERE Flag ='N' AND ID=" & temp With conn 'this reliably opens a connection .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=\\10.192.16.21\global\uktech\db\uktech.mdb" .Open End With With rs .Open strsql, conn, adOpenStatic, adLockOptimistic End With 'Insert code here to update the Recordset with the txt box values . . . . . . . rs.update set rs= nothing End Sub . . . Public Sub idReturn() Dim CONNECT_STRING As String CONNECT_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=\\10.192.16.21\global\uktech\db\uktech.mdb" Dim rs As Recordset Set rs = New Recordset 'Generate a SQL Dim strsql As String strsql = "select MIN(ID) from main WHERE Flag='N'" With rs .Open strsql, CONNECT_STRING End With temp = rs(0) id.Text = temp rs.Requery rs.Close Set rs = Nothing End Sub
I got promoted to System Analyst on Friday a couple of hours after I showed my manager this program. This makes it the 7th app I have developed since I joined work October last year. Thanks for your support. Best regards, Kumar -
Multi User Application with Access databaseHello Dave, Thank you very much for your input. I tried it. First, I had the user form update the temporary table via ADODC control and then wrote a query to insert the record to the main table from the temporary table. Then I used the data1.recordset.delete method to delete the temporary table. The problem is the data is not transferrin from the temporary table to the main table but the temporary table is deleted. The result is that there is no addition to the main table. Could you help me with this please? Regards, Kumar kshincsk@gmail.com
-
OOOOOOOPS!!!!!Hey guys, I never thought my post would appear the way it did on the page. Sorry for any inconvenience. this is my first time posting so i guess I really dont know how the Message editor of the forum works. Sorry.
-
Multi User Application with Access databaseHello experts, I am really stumped on this one. I have a VB6 front end tool to log in customer queris and the corresponding resolutions with start and end timestamps, customer name,email, phone number etc. Each customer interation is logged into the database via the application into the database and needs to be tagged with a unique ID. The requirement is that I need to generate the ID every time a new case is logged in the program and save the information to a temporary table first and then push it to the main table. this is ecause there are multiple users for the application and in order to avoid dupliation of the Case ID I have used the "idReturn" sub procedure to find the last updated ID and increment it to log a new case in the table. The problem is that the new case ID does not enerate in spite of the procedure I added , because the query in subprocedure "cmdUpdate_Click()" does not update the main table form the temporary table. Easch user would run an instance of the application from his or her own systema nd according to the a parameter set from the login form, another field called "RepID" will be updated in the table whe they log a case by clicking on the "Update" Command button after which the next Case Id should be generated. i guess I am kinda looking for a Token system to make sure that when a record has been updated with a unique case ID, the next user to press the update button to log a case should e given the next new unique ID dynamically created to store in the database. Any suggestions? Or could someone please direct me to some examples of Multi_user database programs in VB6 with similar record lock criteria? I can send anyone the source code if they wish to analyse it further. The database record would look like this ID Date Month Weekday Time Originator CustName.. etc 1 27.05.2008 December Tuesday 9:00:00AM Distributor Vicky West.etc . . . Please see the code for the form below. Sorry if it is toooooo looooooong!
Option Explicit
Public strword, intplace, idlast
Dim temp As Long
Dim currID As StringPrivate Sub cmdAdd_Click()
Data1.Recordset.AddNew Dim temp As Long date.Text = DateValue(Now) Dim m m = Month(Now) monthnam.Text = MonthName(m, False) weekd.Text = WeekdayName(Weekday(Now)) time.Text = TimeValue(Now) starttime = Now orig.Text = "" Text1.Text = "" copname.Text = "" contactno.Text = "" contemail.Text = "" qrytype.Text = "" prodco