Hi all, I am getting this error when tring to access my page hosted on fast hosts; ERROR [42S02] [MySQL][ODBC 3.51 Driver][mysqld-4.1.11-standard]Table 'touchofglass.products' doesn't exist Now I have changed the products table to 'products' so that the table name is correct but it comes back with the error; ERROR [42S02] [MySQL][ODBC 3.51 Driver][mysqld-4.1.11-standard]Table 'touchofglass.Products' doesn't exist WOW, any body have any ideas on this, coz this one has completly thrown me! I know that tables in MYSQL are case sensitive, but i cant think of anything else to try? Cheers in advance Stu
jetset32
Posts
-
mysql table problem -
Update queryCheers, your right, I knew this site was a god send. Thanks for all your help with this Stuart
-
Update queryHi, The sub query will return more than one product id , this is because the customer has bought more than one item. the query works if only one item is purchased but if more than one item is bought then mysql returns the error more than 1 row is returned, that is correct. I want it to update all the product id's with the quantity that the customer has bought. Can this be done in MySQL, I dont know. Thanks in advance Stuart
-
Update querythe TOP 1 thing didnt work, and I have tried every way i know to get this to work! the shopping cart will only contain the productID once, so am still a little clueless on this one! Any one have any ideas? Cheers
-
Update queryhi all check this out, it returns this error ERROR [HYT00] Subquery returns more than 1 row the update query is as follows UPDATE Products p, shoppingcart s SET p.Prodquantity = (p.ProdQuantity - s.Quantity) WHERE p.ProductID =(SELECT ProductID FROM ShoppingCart WHERE ProductID = ProductID and s.CartID='" + Convert.ToString(cartID) + "' Why is this and how do I get round it??? Thanks in advance Jetset
-
SQL Update commandhi, I cannot get this SQL command to work in MySQL, its supposed to update the product quantity with how many has been ordered by the customer UPDATE Products SET ProdQuantity = (ProdQuantity - s.Quantity) FROM Products p, ShoppingCart s WHERE p.ProductID =(SELECT ProductID FROM ShoppingCart WHERE ProductID = p.ProductID and s.CartID='" + Convert.ToString(cartID) + "')") Im not sure what im doing wrong, anyone have any ideas? Thanks in advance Jetset
-
databinding in code behindhi, Is it possible that you can databind a webcontrol from code behind i.e. visual basic. I know you can use Databinder.eval method in html but is their a way of doin this in code behind? Thanks Jet set
-
mysql output parametersi forgot to say the problem, the code runs but nothing is returned in the labels
-
mysql output parametersHi, Mikey just sorted out my first problem, the next one is this. In my stored procedure in sqlserver i used OUTPUT Parameters, im not sure i can do this in MYSQL as im not using stored procedure; this is my code; ' the connection string myconnection = New MySqlConnection(ConfigurationSettings.AppSettings("ConnectionString")) ' the query strSQL = "SELECT ?SubDesc=SubDesc, ?SubName=SubCatName FROM SubCategory WHERE SubcatID = ?SubID;" mycommand = New MySqlCommand(strSQL, myconnection) ' Input Parameter Dim parameterSubID As MySqlParameter = New MySqlParameter("?SubID", SubCatID) mycommand.Parameters.Add(parameterSubID) ' Output Parameter Dim parameterSubCatDesc As MySqlParameter = New MySqlParameter("?SubDesc", MySqlDbType.String, 500) parameterSubCatDesc.Direction = ParameterDirection.Output mycommand.Parameters.Add(parameterSubCatDesc) Dim parameterSubName As MySqlParameter = New MySqlParameter("?SubName", MySqlDbType.String, 50) parameterSubName.Direction = ParameterDirection.Output mycommand.Parameters.Add(parameterSubName) ' execute read myconnection.Open() mycommand.ExecuteNonQuery() myconnection.Close() Label1.Text = CStr(parameterSubCatDesc.Value) Label2.Text = CStr(parameterSubName.Value) I dont know if anyone can help me on this? Mike what about this one! Cheers Jetset
-
mysql adding parameters in asp.net vbMike, Thanks alot, you have helped me out loads with that, my parameter code was correct but becuase I wasnt using the execute read method it wasnt working! It is now! Thanks alot Jet set:laugh:
-
mysql adding parameters in asp.net vb.Prepare method? Out of all the searches Ive done on google ive not seen this mentioned before? could you expand on this? Thanks.
-
mysql adding parameters in asp.net vbhi all, I wonder if anyone can help with this one, alls im trying to do is add a parameter to a query, i have tried for days but cannot get this to work!! heres my code; myConnection = New MySqlConnection(ConfigurationSettings.AppSettings("ConnectionString")) strSQL = "SELECT SubCatID,CategoryID,SubCatName,Multibuy,SubCatPic FROM SubCategory WHERE CategoryID = ?CategoryID AND Multibuy='Single' ORDER BY SubCatName, SubCatID;" Command = New MySqlCommand(strSQL, myConnection) myDataAdapter = New MySqlDataAdapter(strSQL, myConnection) Command.Parameters.Add("?CategoryID", 1) Command.Parameters("?CategoryID").Direction = ParameterDirection.Input I get the error ; Parameter '?CategoryID' must be defined i have tried everyway i think possible, PLEASE i hope someone can help or point me in the right direction! Thanks. Jetset
-
httpwebrequest helphi all, Im having problems with httpwebrequest and postbacks. I just wondered what the best way is to test that a postback is working correctly, i am using code from superexpert at http://www.superexpert.com/default.aspx?id=535 The code looks like it works but The page it posts to when loaded does not show the posted message. This is all becuase im trying to get paypals IPN to work, but im having big problems with it and also testing it. Im trying paypals sandbox but when an order is sent through, nothing seems to get sent to the IPNHandler.aspx. How can i test this?? I hope somebody can help coz Ive been messing with this for a week now!! Cheers Jetset!
-
email asp.netyes, im using the system.web.mail.smtpmail class and the smtp server is set to my localhost , im not sure this is right? and my fully qualified domain name is my computer name i.e. exmple-932ddc the way im testing it is by using notepad to save a email test in pickup, it just gets sent straight to the queue folder! any ideas? cheers
-
email asp.nethi all, im trying to setup an automatic email when a user registers on my site. coding it is easy but im having real trouble setting up the smtp on IIS, i've tried for three days to get it working, and ive gone through NSLOOKUP Telnet and various other routes Ive also installed CDONTS to no avail can anyone point me in the right direction to sort this out? Basically what happens is that all mails get sent to the queue and nothing happens!!! its really frustrating! Thanks for your help! Jetset
-
login and Default.aspx pageHi all, Im coming to the end of my project and my last prob is this! When a user goes directly to the login page and enters correct details in, they get redirected to the 'Default.aspx' page, I want them to be redirected to the 'Home.aspx' page. The question is , how to change the 'Default' page to 'home' page. I want to keep using the FormsAuthentication.RedirectFromLoginPage(customerId, True) Because i dont want the user to ALWAYS be directed to the Home page. Thanks in advance Jetset!
-
passing value from user control to webformhi, I recently asked the question, of how to pass a value FROM webform TO usercontrol, I figured this out with help from mike ellison(Cheers!), but now i need to pass a value FROM usercontrol TO webform?? I've tried reversing the technique i used before but that doesnt work. I have a usercontrol which allows people to enter their address details, but becuase i have different usercontrols that are called from a dropdownlist, I have a button on the webform, the button should READ the details entered into the user control and then pass to database. Button code is fine apart from I am unable to Pass the details entered into the usercontrol to the webform....any ideas people! Thanks in advance. jetset
-
Update Tablethanks, I worked it out in the end, and it only took me the whole day!!! UPDATE Products SET ProdQuantity = 0 WHERE ProductID =(SELECT ProductID FROM ShoppingCart WHERE ProductID = Products.ProductID and ShoppingCart.CartID=@CartID) Their you go Thanks again
-
Persistant cookiesYour right, Cheers. Problem solved Jet Set
-
Update TableHi, This is really bugging me, I have a product table with a quantity column, When a user buys an item I want the quantity column to change to "SOLD" or 0. The thing is, how do I do this if a customer buys more than one item at a time? I need to be able to pass the number of product ID's to the database and then let a stored procedure UPDATE the selected ProductID's Quantity column to "SOLD" or 0. Somebody help or put me in the right direction! I have tried all i can think of but my SQL knowledge is limited! Thanks in advance JetSet