Hey all, I have the need to write a small web app that will bulk insert data in mysql. For example, let's say I have a couple of combo boxes and text boxes. The selections that the user makes in the combo boxes need to appear on each inserted row. The text boxes will contain specific data that require their own rows. This will be a listing of financial accounts, and the user will enter in the account numbers and the amount. The page will have something like 20 different rows of text boxes for each account that need to be filled in at the same time. So picture this like a spreadsheet of text boxes where the user needs to enter specific information in each box that needs its own row in the database, because each row will have the combo box information and timestamp for auditing purposes. My big question is how to go about doing this with xml. I'm pretty that sure this would be the best way unless you guys have something else. I have read a lot of resources on using xml with bulk insert, but I need this in vb.net. That documentation has been hard to come by. Could someone point me in the right direction? Thanks all!
archangel717
Posts
-
XML Bulk Insert Question -
Mysql dateadd query problemThank you so much! That finally got it working. I knew there was a difference in mysql, but I just couldn't figure it out. Usually its the simple things that fix these problems. Thanks again mate!
-
Mysql dateadd query problemAll, I have been toying with this query for some time now to no avail. I need to run a retention report on sales that canceled within 30, 60, 90 days of the original sale date. My query is below. Could someone please help me in the right direction as to why it doesn't work? The error I get is below the query
SELECT count(*) FROM db.orders where date_entered between "2007-08-01" and "2007-08-31" and cancel_date <= date_add('day', 30, date_entered)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '30, date_entered)' at line 2 Thank you very much! -
Query + Variable problemOk so dateadd in mysql is just date_add! Doh! My syntax is still off though because I'm getting 1064 errors. I've got:
SELECT * FROM orders where date_entered between "2007-08-01" and "2007-08-31" and cxldate <> "0" and cxldate <= date_add('day', 30, date_entered)
cxldate stands for cancel date I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '30, date_entered)' at line 2 -
Query + Variable problemThanks guys! I still have a problem with my formatting somewhere because in mysql I get the error "no database is selected". I played around with the query and got another error saying that "n.dateadd does not exist". It seems like I need some parenthesis or something. Does anyone know the specifics of how to use this function right in mysql? I've searched around, and I've had problem fitting it to my situation. Thanks all!
-
Query + Variable problemHey all, I have a need to create a retention report in mysql/sql server that I can use to find out how many customers have canceled within 30,60,90 days of their sale date. So my query is something like this in mysql:
SELECT t1.sale_date, t1.primary_phone, t1.cancel_date FROM n.orders as t1 where t1.sale_date between "2007-08-01" and "2007-08-31" order by t1.date_entered
I need to be able to say something like and t1.cancel_date <= 30 days + sale_date. Does this make sense? I'm not sure how to do this without adding a more complex script, but you guys are the experts! Please help! Thanks -
Custom WSS 3.0 aspx pageNot sure if this is the correct board, but I'll try here. I am trying to add a custom aspx page to my Sharepoint site. Here are the steps I've taken: - Published my site with VS 2005 - Created a blank aspx page with Sharepoint Designer - Copied the published aspx page into the newly created one in Designer - Added the dll to my Sharepoint bin folder - Added the following line to my web.config: This is apparently the only way to have custom aspx pages in WSS 3.0/MOSS 2007, which is annoying. When I try to run the page I get this error: An error occurred during the processing of /contact.aspx. Value cannot be null. Parameter name: key I have no idea what that means. I thought it might have to do with not having a PublicToken parameter, but that was just a blind stab at what that might mean. Any help on this would be great! Thank you!
-
Convert selectedindex value to an email recipientAs you mentioned using the value, I realized how complicated I was making this. Thanks for your direction. I just added a single line of code in my submit click event and added the emails to the ddl as values and everything works great!
Dim Email As New System.Net.Mail.MailMessage( _ "email@email.com", ddlLocation.SelectedValue)
Thanks again! -
Convert selectedindex value to an email recipientHey all, I wrote a simple web form that has a drop down list with various property locations. I need my code to assign a specific email address to a selectedindex value based on the location. For instance: If the user selects Detroit as the location, then the recipient of the mailmessage should be detroit@company.com. Can I do this correctly in an If/Then statement outside of my MailMessage sub? Like :
Dim Address As System.Net.Mail.MailAddress If ddlLocation.SelectedIndex = 1 Then Address = "helpdesk@turnberry.com" End If
Obviously I need to convert the string somehow, so any help here would be great. Thanks!! -
Text box to from address in contact formI had tried that line before, but got an error about the property 'to' being read only. I eventually got it to work using this:
Dim Email As New System.Net.Mail.MailMessage( _ txtEmail.Text, "test@test.com")
Thanks for your help! -
Text box to from address in contact formHey all, I would like to know what is the best way of doing this. I just need the user to enter in some information, including their email address, and let the user's email that they enter in the text box be the address that the smtp function uses to send the message. This form is on our intranet, so it accesses our internal smtp server, which does not require authentication. I have some code that I think might work, but not sure what I should have set in my web.config to allow for something like this. Any help would be great. Thanks!
-
How to format textbox data into an email message [modified]The only other piece that I would like to add would be the ability for the user to enter their email address in a text box and have the app use that email address to send the email. My code is:
Email.From.Equals(txtEmail.Text)
This seems to be correct syntax, but .net is just using whatever is set as the credentials in the web.config file. If I remove all credentials and try the anonymous route, would this line of code work? I wanted to get feedback before going on a wild goose chase. Thanks again! -
How to format textbox data into an email message [modified]Wow that makes me feel inadequate in my coding experience! Haha. Thanks for the quick fix. I could have sworn that I tried inserting HTML tags in my code, but I guess I didn't try it enough. Thanks Fred!
-
How to format textbox data into an email message [modified]Hey all, I have searched all over the internet for this, but haven't found exactly what I am looking for. I am not an expert VB.Net programmer, so bear with me here. I have about 12 text and drop down boxes that will reside on a 'Customer Account Creation Request' form page. An HR rep will fill out the form with the appropriate fields and then click submit. It will then just email IT the contents of the form. My code works and all is well. My only problem is to actually format the email so it isn't just one long line of information. I am half way there, but I can't figure out how to insert the appropriate breaks and formatting. This is probably so simple, but I've never done it before in this manner so I need help! A sample of my code is below:
Dim Email As New System.Net.Mail.MailMessage( _ "email@email.com", "email@email.com") Email.IsBodyHtml = True Email.Subject = "New Account Creation Request" Email.Body = "A new account was requested by " & txtRequesterFirst.Text & " " & txtRequesterLast.Text & " on " & DateTime.Now.ToString() & ". Employee Name - " & txtFirst.Text & " " & txtMiddle.Text & " " & txtLast.Text
The email.body line is just on one line, so thats why it might display weird in this post. Could someone point me in the right direction? I basically want each text box to be on its own line in the generated email. For example, the Employee Name part should be on the next line of the email and not alongside the first part of the message. Thanks!! -- modified at 12:56 Friday 11th May, 2007