savedlema 17 Junior Poster

Thanks very much xrj, from your contribution, I think I will go for Crystal Reports. Yes, I will get some good tutorials and familiarize myself. Thanks.

savedlema 17 Junior Poster

Hi!
I'm developing an application for hospital patients information. Now, as common for hospitals, I need to add a feature for various reports.Now I would like to know if you think Crystal Reports are a good option still.

I would like to present many reports which a user will choose what he wants and click "generate", the report is to be presented to him and should allow him to print the report.

I ask you to please share your experience,Is Crystal Report the BEST choice here? (I'm used to display many short reports just in DataGridView but I think I should probably change)

I use VS 2013 + Mysql

Thanks to Daniweb community where I have learned a lot.

savedlema 17 Junior Poster

Sorry for the trouble.
I would suggest the following:

Create a new form in your application just for testing this.
Likewise,create a new table in your database.

Put a textbox and a Button1 in your form.
Put a simple code in Button1 that will post just simple text data to your database table. Say, create a code to post just text from a single textbox.
See if this works and come back and give feedback.

savedlema 17 Junior Poster

almostbob, Thank you very much. I was able to read about this and implement. Now it works and I hope for the best. Thanks.

savedlema 17 Junior Poster

Hi all!

Thank you all for your inputs. Yes, I'm surprised now the site shows up in Google first page results (key:. My last attempt was to remove in my Google Webmaster Tools dashboard and adding it up again. Glad now it shows up. But I have still been receiving daily emails from Google saying

"http://www.kilivacation.com/: Googlebot can't access your site
Over the last 24 hours, Googlebot encountered 18 errors while attempting to access your robots.txt. To ensure that we didn't crawl any pages listed in that file, we postponed our crawl. Your site's overall robots.txt error rate is 64.3%."

But at least now I have 64.3%, I used to have 100%! I hope it stays there and get better.

HappyCat, more help please with the last part of your comment, how do I do the redirect? What is it good for? (My only access is through cpanel so I think all I have is the .htaccess)

Thank you everyone.

savedlema 17 Junior Poster

Hifriends!
I've just started working on SEO for my sites, but I have problems in my first attempt.
I signed int to Google Webmaster tools...added a site and verified it successfully. My site even started appearing on Google Search and within a very short time, it was on the first page results!

But then it disappeared from Google Search.Even if I search for site:kilivacation.com its not showing up, Google says there is no such a site..if you are owner....

Going into Google Webmaster tools, if I go to Crawl -->robots.txt Tester, I get the error "You have a robots.txt file that we are currently unable to fetch. In such cases we stop crawling your site until we get hold of a robots.txt, or fall back to the last known good robots.txt file"

If I look at the sitemap (still in Google Webmaster) I now see an error "Network unreachable: DNS issue"

I also see Crawl Errors "Network unreachable: DNS issue"

Fetch as Google says "Status: Temporarily Unreachable"

My site is www.kilivacation.com.

Site shows up in the first page results of Bing with no problem.
How can I solve this Google Search problem?
Thanks for any inputs.

savedlema 17 Junior Poster

Thank you gizida, but I have already done so. If I disable the form closing event, how then can I have it logg off a user when a user clicks the close X button without logging off from the database? That's what made me use the form closing event.
Thanks.

savedlema 17 Junior Poster

Excuse me everyone, I decided to do just as Minimalist said, but my solution didn't work in many forms. In fact, it seems it won't work as effectively in more than two forms.

There is still a problem; For example, the first form is login form, after success in login, form1 will open and then a user may want to open form2. Problem: Since every form has a FormClosing event set, even when a user will open another form say Form2, the code me.close,Form2.Show will run causing FormClosing event of the previous form (form1)to run and eventually log off the user and exit the application (while the user just wanted to open another form.

Also, when I'm in my 3rd form (say), If I hit the big X (close), the FormClosing event for that 3rd form will be fired and when the form is closed, the FormClosing events of all the other forms I had opened will also be fired.(In the case where I choose to hide these forms) Its so confusing to me.

I think I explain myself well; I find out that when I close my form/exit application in my 3rd/4t form (just an example), all the other previous forms will have their FormClosing events fired, one after another which is a mess.

I still don't know how to figure this out. The only thing I can think of now is to disable the close button (big X) in all the other forms so that the use will …

savedlema 17 Junior Poster

Hi friends!
First, I have read other similar threads but I haven't seen a complete match.

It is my VB.NET app. I want the user to be logged out when a user closes the form/application by clicking the X at the right-top (to prevent the user from appearing to be online while not).

Now, I created a sub for LoggOff, put it in a module and call it whenever I want it. So I went to properties and double-clicked"Form Closing" event to write the code for FormClosing. Inside FormClose I call the "LogOff" sub explained above, ofcourse, now when the user clicks the big close 'X' at the top, he/she is logged off.But there is a problem;

The first form to load is the login form after which another form, say "Welcome" will be opened and "login" will be closed (by welcome.open, me.close), now the problem is, whenever me.close is executed, all the code in the FormClosing event is also run, which means terminating the application.

Whenever I just want to close one form and open another one (I don't want to just hide forms) the code will log the user off and close the application. How can I differentiate the closing of a user hitting the big X and the closing of a programmer with me.close???

Many thanks for any input.
Frank!

savedlema 17 Junior Poster

Thank you all.

savedlema 17 Junior Poster

cgeier,

Thank you very much again for your wonderful great input to my question. Through your contribution I have been able to archieve what seemed impossible.
Now I'm well to go on.

Thanks, and the thread is solved.

savedlema 17 Junior Poster

Hi friends!
I installed Windows Server 2008 Standard and then activated it successfully. I has been running for over 2 months now with no problem. But, it has now started to ask me for Activation.
"My Computer -->Properties" says "You must activate windows now" and I see the "product ID & Change product key"

I tried to "Activate windows now", entered the product key at the back of the CD case but the activation said "The product key you typed is already in use..to activate Windows you will need another Win Server Standard product key.."

How do I get out of this please? I thought I was done installing and activating Win at the first time.
Thanks for any input.

savedlema 17 Junior Poster

tashee2007,
Try it again carefully, it seems to be working after clicking "Button1". If it does not change with users, try to run a querry that will show you what your application will fetch. Run this querry out of your application (eg. phpmyadmin)

savedlema 17 Junior Poster

Hi cgeier, I was working on your code this weekend.
There is one thing I seem to miss; how should I link the AppPermissionsModule and the Form1? How should I call this module into action?

Thanks again.

savedlema 17 Junior Poster

Thank you again. I'll follow up and get back to you. (I wonder how you came to know all that!)

savedlema 17 Junior Poster

Thank you again.
I have been trying to follow your tables and codes..how then do I effect it by code when it comes to loading and disabling menu items based on the result of a database query? Can we use what is in the dataset to decided which menu items to enable/disable?

Thanks again for your good time and help.

savedlema 17 Junior Poster

That's great Anthony!

savedlema 17 Junior Poster

cgeier,
First, thank you very much for sharing your precious time and knowledge with me and others here. I really appreciate that.

I use mysql instead of SQL, but I can change your code accordingly. I will try to do all that and will come back here for feedback.

Many thanks again.

savedlema 17 Junior Poster

Hi everyone!

I'm making an application which requires users with different permissions/previleges to login and use the application.For example, if the user is "admin", all menu items in the menu bar are shown and enabled. If the user is say "user_group1", some of the menu items are to be hidden. The same for "user_group2", "user_group3", "user_group4" and so on.

I could put a code for each specific user in each form but that's a great deal since users and their user groups may be added after application deployment. So it has to be something flexible.

I want the user "Administrator" to be able to assign/change permissions to others users of the system.

How do I do this?
I have been thinking of creating a table that will include user_groups and permisions, say like a row: user_group (user_group1, user_group2,user_group3) and permission (File,Edit,Backup,Manage Users (these being menu items)) and then for each user I will be setting either "Yes" or "No" under each permission/menu item indicating that the menu item is to be hidden of shown.
But, I can read these permission to a dataset but I can't see how to link them with the menu items.

How should I accomplish this please?

b62a07fd6a5f0836d07c862f336083df

savedlema 17 Junior Poster

Thanks a lot friends.
Solved.

savedlema 17 Junior Poster

Cereal, is there a way I can make every new entry go to a second line?
Instead of [blue,green,yellow] to make them appear like:
blue
green
yellow
Is this possible?

savedlema 17 Junior Poster

Cereal..
Thank you very much. I have found help in your reply. I had never met concat_ws anywhere, it has worked for me and now I'm ready to move on.

Thank you very much for taking your time to explain with all those examples. I know it took some of your precious time.

I appreciate.

savedlema 17 Junior Poster

Hi!
I'm programming with VB.NET + Mysql database. I have one table of which, one of its column can have multiple entries to it. That's, say a table named TableA(item2,item2,item3,item4). Now, I have a scenario where I may have item1,item2 & item4 filled,but item3 is not. (Please have a look at the illustration screenshot attached and see what I filled in the "Favorite Color" for the person with id= 6, I want to do it for the person with id=8)

Then I want to enter data into ONLY item3 (which was empty). A common way would be using UPDATE statement, but an update will not help me in my case, since more than one data will need to be entered in that specific item4 (which will have to be identified by a WHERE id=xx). UPDATE will not help because as far as I know, UPDATE will like delete what is in that item and update it with the new entry.

What I want is, if there're already some entries in item3 (and for a specific id) say, there is blue & red in it, I want to be able to add green,black,orange....to it.

The first thing that came to mind was using INSERT INTO Table1 (color) VALUES (green) WHERE id = XX, but I realize INSERT does not go with WHERE clause.

Does someone out there have an idea of what I could use to accomplish the same thing? To enter some entries to a certain item identified by …

savedlema 17 Junior Poster

Thanks Noralyn_1! Thanks for the link. I have no idea on the AT Commands. I will continue to study the link.

savedlema 17 Junior Poster

Hi all!

I have a USB Modem (dongle) made by ZTE. I normally use it for connecting to the interent. It also came with a dashboard/software that I can use to send & receive SMS and even make a call.

I want to make an application with VB.NET that will use this USB MODEM to send and receive SMS to different mobile carriers. I want it to send SMS using the SIM Card inserted into the USB Modem.

Is there a way to accomplish this from VB.NET? I have seen people talking about doing the same with GSM Modem and I wonder if its the same thing (GSM & USB Modem). Help please.

Thanks in advance!

savedlema 17 Junior Poster

Hi all! I think I landed to a right forum for my question.

I'm using ClearOS in our company's network. There is a certain website I want to visit by its IP (IP Address/cpanel) but I always get"The connection has Time out" errors. But if I try to access it from another network (outside of the company's network), it loads fine and well. So I suspect ClearOS is behind this. The port for /cpanel is 2082.
Will someone please help me how to get past this?
Thanks.

savedlema 17 Junior Poster

Guys, I just want to let you know that leggy's solution helped me. (3 years after the solution was posted!)

savedlema 17 Junior Poster

I managed to add a printer by using the IP address of the machine that hosts the printer. Solved.

savedlema 17 Junior Poster

Thanks LastMitch..
I was able to go through by editing the file manually, so I had no need for the EasyConfig anymore.

Thanks for your response.

savedlema 17 Junior Poster

Hi!

I'm seriously stuck here. The issue is with one Windows 7 Home Premium machine. This machine:

-- I can not ping it from either Win 7 or XP clients (I have a mix of Win 7 and XP)
-- This machine can not be seen in the 'My Network Places' from XP Clients (SP2 & SP3)
-- This machine can be seen in 'My Network Place' by another Win 7 machines. But can't ping to this problematic computer.
-- This machine cannot therefore access the shared printers & folders which're shared in my network. Other computer can.

I have gone to google search with "Windows 7 Home Premium cannot see XP computers in network", I have seen many suggestions in forums which have not helped me.

Few things I tried:

-I have made sure I enabled network discovery and file sharing (I know how to do this)
-I have changed the workgroup name to a different name,restarted, changed the workgroup name to the one in use.
-Went to firewall and enabled print and file sharing in the inbound properties.
-One forum said I should go to gpedit and change some network settings (LAN......)
----I have checked and checked to be sure I connect to "Work" network and enable everything that to needs be enabled in File and Printer Sharing.

Please help.

All printers are connected to XP clients and I want to be able to print from this Win 7 Client. I …

savedlema 17 Junior Poster

After installing Oracle 8.06 on Windows XP (Pentium (R) D CPU 3.2GHz 3.20GHz - 480 MB RAM).

I'm Attempting to run "Oracle Net8 Easy Config" when error comes up saying "jre.exe has encountered a problem and needs to close.."

I tried:
-Doing a system restore and installed it again (after cleaning the registry of anything 'oracle'
-Downloaded Java from their website and installed
-Did a clean Windows installation on the same computer and tried installing Oracle again.

All this to no avail. How do I solve this, please I need some help.

Thanks.

savedlema 17 Junior Poster

Hi Fowomola!

Notice that I said its a .bat file. You make a .bat file with above lines of code and run it.

savedlema 17 Junior Poster

Hi!
I was able to solve it with this bat file:

echo off
reg add "hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\netcache" /v FormatDatabase /t reg_dword /d 00000001

reg delete "hkcu\Software\Microsoft\Windows\CurrentVersion\netcache\shares" /f
reg add "hkcu\Software\Microsoft\Windows\CurrentVersion\NetCache\Shares" /ve

reg delete "hkcu\Software\Microsoft\Windows\CurrentVersion\netcache\AssignedOfflineFolders" /f

reg add "hkcu\Software\Microsoft\Windows\CurrentVersion\NetCache\AssignedOfflineFolders" /ve

Thanks for being willing to help so far.
Cheers!

savedlema 17 Junior Poster

Hi all!

IN MY VIRTUALBOX VIRTUAL MACHINE: I had previously installed XP Service Pack 3 and Windows 2003 Server. I configured this server as a DC and other roles such as DNS...I created users who would login to the domain from the XP client machine. I set up group policies and file server, and all were working fine.

Recently, I removed 2003 Server and installed 2008 Server on the same virtual machine hard disk. I moved on to create the DC (with a different domain name) and other server roles. I created users from my Active Directory and set up group policies too. But, I realized that, when users log in to the server, the set group polices are not implemented. Furthermore, I realize that, when this user logs off from the Domain, that messagebox says "...offline files failed to synchronized to [servername]....", but, this [servername] which appears here, is the name of the OLD 2003 Server, not the present 2008.

Why is this user still appear as if connected to the old 2003 server?
I tried to change the client's computer name, no effect.

Any help please?

savedlema 17 Junior Poster

Solved. I solved it by just few lines of a SELECT statement that has other SELECT in it.

Thank you all, you are great!

Begginnerdev commented: Wonderful! +8
savedlema 17 Junior Poster

Cool.

Thank you very much.

I can now mark the thread solved.

savedlema 17 Junior Poster

Single UPDATE? Can you give the statement please?

savedlema 17 Junior Poster

HI Prataeas!

I kept trying, finally I have managed to accomplish what I want with this code. Please see if there are any risks or if there is a better way of doing it.

 SQL = "CREATE TABLE difference AS SELECT R.InvID, R.Quantity, I.Amount, (I.Amount - R.Quantity) AS Difference " _
            & "FROM Recipe R, Inventory I " _
            & "WHERE(R.MenuID = 1) " _
            & "AND R.InvID = I.InvID; " _
            & "UPDATE Inventory SET Amount = (SELECT Difference FROM difference WHERE Difference.InvID = Inventory.InvID)"

        cmd.Connection = con
        cmd.CommandText = SQL
        da.SelectCommand = cmd

        cmd.ExecuteNonQuery()

        MsgBox("QUERRY  PERFORMED")
        con.Close()

Lastly, I have spent about a week trying to solve this! So I really want to thank you prateaus for stopping by and helping.

Thank you too gusano, your support is immeasurable.

And, I wonder how did you guys learn all this.

savedlema 17 Junior Poster

pritaeas, Thank you so much!

Now I'm able to get the amount that remains after the subtraction, Now, how do I update individual inventory items Quantities in the inventory table to reflect these changes there? Because up to now, the inventory table is unchanged (Quantities remains the same)

I kept the result of your SELECT into a dataset (and I was able to view it ina gridview)

savedlema 17 Junior Poster

I have worked with mysql INNER JOIN in the past projects, like this one:

"SELECT tblDetails.StudentID,tblDetails.FirstName, tblDetails.Surname," _
                    + "tblBiology1.Test1, tblBiology1.Test2,tblBiology1.Grade " _
                    + "FROM tblDetails INNER JOIN tblBiology1 ON " _
                    + "tblBiology1.StudentID = tblDetails.StudentID " _
                    + "WHERE tblBiology1.StudentID = '" & Trim(Me.txtSearch.Text) & "'"

By table aliases, do you mean something like SELECT customer_first_name AS name?

Do I need to elaborate my question more? You can please look at the snapshot of my tables structure (but don't mind about the Menu table). The table inventory contains the total available raw materials/recipes. Query1 shows what and what recipes have been consumed, now I need to update the Inventory table.

I appreciate.

savedlema 17 Junior Poster

Hi all! I don't know if that was a good title, but;

I have this query (I will call it query1):

"SELECT InvID, quantity FROM Recipe WHERE MenuID = 1"

In my tables, this will give me something like Water(20), Oil(30)

Now, from this result of a SELECT query1 (i.e Water(20), Oil(30) or whatever) I want to take just Water,Oil.. (leave out the quantities) and then SELECT these InvID (water,oil..) from another table called "Inventory", but pull them with their quantity in that Inventory table.(i.e if the quantity of Water in Inventory table is 1000, pull Water (1000))

The goal is to subtract the quantities in the Inventory table with the quantities of the 1 select query (which returned 20,30...) (to get Water (1000) - Water (20) possible)

I'm making an application with VB.NET & Mysql and I'm stuck in this part. Can someone please help?

savedlema 17 Junior Poster

Begginerdev, Thank you again for taking your time to help.

But I must admit, almost everything in that function is new to me!

Just pass in the ingredients string and accept the output dictionary.>
Iterating through the dictionary can be done as follows:

Can you please instruct how to do what you said in the quote? I don't mean to be lazy but, I think may be if you instruct me how get the code work (call the function) will help me to learn this 'Dictionary' thing.
Or, if you think you have links where I can read and get things work that way, I would appreciate too. (I would love both, help me iterate through the dictionary, call the function & give any links if any.)

Sorry, new to that, but I can learn.

savedlema 17 Junior Poster

Thanks.
To answer some questions/clarify more:

  • I purchase food raw materials (such as Rice, Oil, Salt, Sugar, Soda, Coffee, Maize etc), I record this in the inventory table

  • I record to the system (table menu), types of foods I will be making (we call it menu), menu can be something like (Rice with Fish, Salad, Coffee, Soda, Pizza etc)

  • I also record to the system (table recipe) what raw materials makes up each of the menu I specified above, and what amount of the raw material. (look like thise Rice & Fish :20units of Rice, 1 fish, 2 units of salt), this for every other menu/food listed in paragraph 2 above.

  • When I sell the food/menu, I want the appropriate amount of its recipes to be substracted from the total that is available in the main Inventory table. So, if I sold 1 Rice&Fish, I want the system to substract 20units of rice, 1fish,2Units of salt from the inventory table. (This is where I get into trouble)

In my trying, I decided to create three tables (Inventory,Menu & Recipe), I am attaching a snapshot of how I designed the tables, please have a look. (Please note that in table recipe, menuID & InvID are foreign key)

Now, FROM THE TABLES (see attached)
If I sell (Click) “Salad” I will run the querry

"SELECT InvID,quantity FROM Recipe WHERE menuID = '" & Me.ComboBoxMenu.Text & "'" '(selected here in this combobox is e.g. "Salad") 

(This give me: …

savedlema 17 Junior Poster

Note: It seems like you guys did not understand my scenario clearly. I will add this note;

Now, let's say to make 1 Salad you will use 5of garlic, 5 of onion and 5 of water. So, when I click on "Salad", I want all these (5garlic,5onion,5water) to be deducted from their store in the inventory table. (Not deduct just one)
This composition for Salad (and whatever will be added) can be changed by a user, say, he can add 5 of salt to it.

I will appreciate more help on that.

savedlema 17 Junior Poster

Yes ddanbe, these are just examples, if it works I can substitute that with something useful. No problem with measurements units too for now, I just want it to do the subtraction and I will care about that in the future. Any idea with my case?

savedlema 17 Junior Poster

Thank you, now it works; it subtract & update one record in the inventory table. BUT,
What I want to do is, consider the inventory table in your solution :

Inventory table:
   Item   | Amount
garlic,     10.21
onion,      50.13
water,      200.23

Now, let's say to make 1 Salad you will use 5of garlic, 5 of onion and 5 of water. So, when I click on "Salad", I want all these (5garlic,5onion,5water) to be deducted from their store in the inventory table. (Not deduct just one)

This composition for Salad (and whatever will be added) can be changed by a user, say, he can add 5 of salt to it.

I will appreciate more help on that.

savedlema 17 Junior Poster

Thank you. But, I think we are using different connectors? This is how I had to change your code to suite the connector I use:

     con.Open()

            Try
                Dim da As New MySqlDataAdapter(New MySqlCommand("SELECT * FROM Inventory WHERE Item='" & Me.ComboBox1.Text & "'", con))
                'The select gets the table structure.

                Dim ds As New DataSet
                da.Fill(ds, "Inventory")
                If Not IsNothing(ds.Tables("Inventory")) And ds.Tables("Inventory").Rows.Count > 0 Then
                    Dim dblCurrentAmount As Double = CDbl(ds.Tables("Inventory").Rows(0)("Amount")) -dblAmountToSubtract '(This dblAmountToSubtract is not declared, what should it be set to?)
                    If dblCurrentAmount < 0 Then
                        MsgBox("You have used more than what is in stock!" & vbCrLf & "This operation will not be completed", MsgBoxStyle.Exclamation, "ERROR!")
                        GoTo DISPOSE
                    ElseIf dblCurrentAmount = 0 Then
                        MsgBox("You have depleted your stock for this item!" & vbCrLf & "Please restock this item!", MsgBoxStyle.Exclamation, "Oops!")
                    End If

                    ds.Tables("Inventory").Rows(0)("Amount") = dblCurrentAmount
                    da.UpdateCommand = New OleDb.OleDbCommandBuilder(da).GetUpdateCommand '(How should I change this line?)
                    da.Update(ds, "Inventory")
                    MsgBox("Item Updated!", MsgBoxStyle.Information, "Complete!")
                End If
    DISPOSE:
                da = Nothing
                ds = Nothing
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try

            con.Close()

NOW:
1. dblAmountToSubtract is not declared, what should this be set to?
2. How should I change this lineda.UpdateCommand = New OleDb.OleDbCommandBuilder(da).GetUpdateCommand to suit my connector?

I appreciate your support.

savedlema 17 Junior Poster

Thanks Begginerdev!

Something:Please can you explain to me what will be done in line 2 of your solution?

Dim da As New OleDbDataAdapter(New OleDbCommand("SELECT * FROM Inventory WHERE Item='" & sItemType & "'", myConnection))

What will this WHERE Item='" & sItemType & "'", myConnection do? I did not understand this. (especially the "sItemType")

Thank you very much.

savedlema 17 Junior Poster

What I have so far:

My tables are:
1.Inventory (item,amount)
2. Menu (menu_name)
3. Salad (recipe, amount)

Other tables will be added for each menu, just like I did for salad. (I may have table for Rice, Soda e.t.c)

Now, when I click Salad, since it has two values (recipe for it and amount), how then can I subtract these (recipe & amount) from the (amount) in the inventory table?

I find it challenging.

savedlema 17 Junior Poster

Hi all!

I'm stuck somewhere. I have a table for Inventory (which contains the available amount of each food component)
What I want to do: If I select a certain food (say salad) I want to be able to deduct the components (amount) of 'salad' from the inventory table.

Consider this:
Salad is made up of 20mil of water, 50 of oil and 100gm of onion (just an example)
When I give someone a Salad, I want to be able to deduct 20mil of water, 50 of oil and 100gm of onion from the inventory table. (So that I know how much of each item in my inventory is left)

The code is to allow these recipes of Salad to be changed/deleted/some others added into it. (Flexibility). I've found this difficult since in order to allow this flexibility, I can't just write that deduction in code as something that won't change forever.(More recipes can be added in the future)

Does anyone has an idea on how to do this?

I use MySQL with VB.NET