I have one old foxpro application which is using dbf files as database.
But now i want to develop a new VB.net application for the same dbf database files.
when i try to read dbf files from VB.Net application at the same time foxpro application and dbf files get crashed.
So anyone can help me to solve the problem?
<b> I am using Following code to copy the DBF file from Original location to mylocation </b>
Dim di As New IO.DirectoryInfo(SourceFolderPath)
Dim tempname As String
Dim diar1 As IO.FileInfo() = di.GetFiles("*.DBF")
Dim dra As IO.FileInfo
'list the names of all files in the specified directory
For Each dra In diar1
tempname = dra.ToString
Do Until FileInUse(dra.FullName) = False
''Do nothing Until File Is busy
I am pretty new to DB2. I have a query that returns some result. For each row of the results, I should pass a value from results to external Procedure. Now I want an union of both the results. Here is what I have tried. And I am banging my head to wall since last three days. Can someone please help me with this? It is really really important now.
DECLARE EOF_COND INTEGER DEFAULT 0 ;
DECLARE @ITEM CHAR ( 30 ) ;
DECLARE @BIN CHAR ( 10 ) ;
DECLARE @SIZE CHAR ( 30 ) ;
DECLARE @TIRERACK CHAR ( 10 ) ;
DECLARE @RACKSBIN CHAR ( 10 ) ;
DECLARE @DESC CHAR ( 100 ) ;
DECLARE @DESC1 CHAR ( 100 ) ;
DECLARE @ONHAND CHAR ( 10 ) ;
DECLARE @COMTD CHAR ( 10 ) ;
DECLARE @USEDRACKS CHAR ( 10 ) ;
DECLARE @OPENRACKS CHAR ( 10 ) ;
DECLARE @TEMP CHAR ( 10 ) ;
DECLARE RESULT INTEGER DEFAULT 0 ;
DECLARE CR1 CURSOR WITH RETURN FOR
SELECT T2 . ICITEM , T2 . BABLOC , C . ISSIZE , D . UNITSPER
, E . NBRRCKBINB , F . ICDSC1 , F . ICDSC2 , T2 . TQOH , T2 . TQCM
, CEIL ( INTEGER ( ( T2 . TQOH ) ) / D . UNITSPER )
, E . NBRRCKBINB - ( CEIL ( INTEGER ( ( T2 . TQOH ) ) / D . UNITSPER ) )
NBR_OPEN_RACKS , ( E . NBRRCKBINB * D . UNITSPER ) - T2 . TQOH
SELECT A . BACMP , A . BALOC , MIN ( A . BAITEM ) ICITEM
, A . BABLOC , INTEGER ( SUM ( A . BAQOH ) ) TQOH ,
INTEGER ( SUM ( A . BAQCM ) ) TQCM
FROM TESTDATA . VINBINI A WHERE A . BALOC = '13' AND 1 = A . BACMP AND
A . BAQOH - A . BAQCM > 0 GROUP BY A . BACMP , A . BALOC , A . BABLOC HAVING
MIN ( A . BAITEM ) = MAX ( A . BAITEM )
AND SUM ( A . BAQOH - A . BAQCM ) > 0
) AS T2
, TESTDATA . PALITMLOC B , TESTDATA . VINITEMSIZ C , TESTDATA . PALSIZQTY D , TESTDATA . PALBINPF E
, TESTDATA . VINITEM F
WHERE T2 . BACMP = B . TACOMP AND T2 . ICITEM = B . ICITEM
AND T2 . BALOC = B . IALOC AND T2 . ICITEM = F . ICITEM
AND T2 . ICITEM = C . ISITEM
AND B . PALLETID = D . PALLETID
AND C . ISSIZE = D . ISSIZE
AND E . TACOMP = T2 . BACMP
AND E . IALOC = T2 . BALOC
AND E . IMBLOC = T2 . BABLOC
AND E . PALLETID = B . PALLETID
ORDER BY 1 , 2 ;
OPEN CR1 ;
SET EOF_COND = 0 ;
FETCH CR1 INTO @ITEM , @BIN , @SIZE , @TIRERACK , @RACKSBIN , @DESC , @DESC1 , @ONHAND , @COMTD , @USEDRACKS , @OPENRACKS , @TEMP ;
CALL TESTDATA . PARECR24SP ( '01' , '13' , @BIN , RESULT ) ;
Your help is much appreciated.
Now the GlobalEntityID is a seperate table that holds the company demographics. So each company can have multiple license attached to company. They can also have multiple invoice attached to company.
My question is the end user wants a report that shows company info, license number and invoice attached to each license number. But It does not work cause the invoice is attache to the company not each individual license number.
Is it possible to create get data for each license number when invoices are related to the company table only and not the license number. The report needs to show license numbers with or with out an invoice? When I run the report in SQL Query I can see same invoices for all license numbers, but in the user application I can pull a license number up and see that there is no invoice attached to it. How is this possible when there is no relationship between one license to one invoice?
There are definitely other tables in the mix, as is clear from the License table. I suspect that you can walk a relationship between those. All of those ID fields point to something, chase them down. My suggested starting points are LICENSETYPEID, LICENSESTATUSID, and LICENSECLASSIFICATIONID.
Keep in mind that you may need to join on GLOBALENTITYID to get useful results.
I am creating one website for external exam duty allotment.I am using msaccess database and jsp to connect it,html and css.
I have 2 tables room and facutly details.
Attribute of room table are total_rooms_available, session and date. Attribute of faculty details are faculty_id,faculty_name experience, designation,mail_id and phone_no.
my question is how to fecth faculties randomly based on no of rooms available i.e (if total_rooms_available is 10 i have to fetch 10+3 faculties randomly from facutlydetails table)
I'm taking a database driven website course. The teacher wants us to build a database driven website. I haven't touched a database in a yr since taking a sql plus course and even then never built a database from the planning stage. My idea is to build a website of my favorite music artist with their record album, year, song title, label stored in a database. This website will also have a database that when you click on the artist, a bio of the artist will appear. I also want to be able for the visitor to click a link and play song from my mp3 collection database. I have a database model of what I have so far that I can post. The teacher has given us very little direction other than a book called web programming and internet technologies. Everyone in the course is still in the dark about how to go about doing this project. Any ideas would be approciated on helping me design this. Thank you in advance.
Well, as it is a school assignment you are expected to do the work. However, there are lots of samples of website projects that you can find by doing a Google search, or look at some of the articles referred to at Beginner's Walk - Web Development[^]. The CodeProject articles section also has many database articles.
I hope this question falls under the Database category.
I have this query:
Select e.Dept, e.division, a.managerID,e.EmpName,e.empnum, e.Email,e.zip, e.SSN FROM Emp e, Angular a Where e.empID = a.managerid OR e.empID = @empid and password=@pass
What I am attempting to do is that if a user attempts to log in and that user is a manager, redirect him/her to manager screen.
Otherwise, redirect to employee screen.
The issue is that when I run that query, I expect to see records associated with that manager.
It shows ALL employees belonging to different managers.
How do I tweak this to work?
A bit more info:
There are two tables, Emp table with following relevant attributes:
User logs in with EmpID as username and last digits of SSN as password
Then this other table called Angular with following relevant attributes:
EmpID - FK to EmpID from Emp table
ManagerID FK to EmpID from Emp table
Status (done or pending)
The logic we are trying to employ is that if empID (from Emp table) that the user is logging in with matches ManagerID (from Angular table) then this must be a manager, redirect him or her to manger page.
If empID from Emp table does not match managerID from Angular table, redirect to employee table.
What am I doing wrong?
The code for redirect is asp.net and no need to post it here because if the query is correct, that will work.
The best possible solution is to learn all about database management. It looks like (but this is a guess since your question is not clear) that you have changed the schema of your database and now some of your records do not match the schema.