How to insert data into database single table using two different JFrame in Java

Uncategorized
Question: I have two JFrames: BusBookingDetail and PassengerDetail.java and for saving the data I have a single table in SQLite Booking where I want to store the date from these two JFrame.After adding details on BusBookingDetail frame and clicking on next button the PassengerDetail frame is open. From BusBookingDetail like Destination, Arrival and from PassengerDetail frame like Name, Contact.I have written the insert query in both the JFrame. But the data store in SQLite was in two different line and I want it to be inserted in the same line How can I achieve this? How to insert data into database single table using two different JFrame in Java Answer: In both case you are using insert query. Therefore data is save two different row. In first time you should…
Read More

Batch – check if null session connection exist

Uncategorized
Question: I have this shared location mapped to NO local drive. How can I check if it exist, ideally I want the query to return a true or false. Example: The "IF EXIST \pc-name.domain.net ECHO true" syntagm doesn't detect the mapped location. Outcome of "NET USE":Status Local Remote Network ------------------------------------------------------------------------------- OK \pc-name.domain.netIPC$ Microsoft Windows Network The command completed successfully. Answer: This will probably help:@echo off FOR /F "tokens=1,2,3" %%G IN ('net use^| Find "\"') DO ( echo %%H exists ) Where you can set Find to what you need. This specific instance will search for anything mapped where the below will purely search for IPC$ @echo off FOR /F "tokens=1,2,3" %%G IN ('net use^| Find "IPC$"') DO ( echo %%H exists ) Read more
Read More

WPF Using multiple Resource Dictionaries from multiple projects

Uncategorized
Question: I have two class Library projects: Project A.Themes Project B.Themes Project A.Themes is my base Themes Project. Project B.Themes using A.Themes and have new styles and some of the resources have keys that already defined in A.Themes. We want to use this two themes in our Project, and if we use a resource that is defined in both of the project we want to take the resource from B.Themes. This is our code: A.Themes have few files of styles:Brushes.xaml Buttons.xaml CheckBox.xaml etc.. we load them in Bundle.Xaml: B.Themes have the same Files:Brushes.xaml Buttons.xaml CheckBox.xaml we load them in Bundle.Xaml and adding the bundle of A.Themes: In our Project we load them in App.xaml: the problems are: 1. it not always takes the resources from B.Themes and we can't find…
Read More