How to convert a ms access query to ms sql 2005 query

rb4343

New Member
Joined
Apr 21, 2010
Messages
1
<table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td><code></code>
I have been using a ms access database with my online booking application. My host upgraded me to a 64 bit server and ms access do not for my asp.net app. anymore.
I upgraded to MS SQL and now my ms access query will not work. I am not that great at MS sQL yet and I would like someone to please
convert Line 98 for me. Thanks so much in advance. I appreciate it a lot.

Line 98: str1 = "insert into tblBookings(bookingName,bookingTel,bookingEmail,bookingDate,bookingTimeFrom,bookingTimeTo,staffID) values('" + Convert.ToString(Session["username"]) + "','" + tel + "','" + email + "','" + bdate1 + "','" + btform + "','" + btto + "','" + Convert.ToInt32(Session["hstyle"]) + "')";
Line 99: OleDbCommand mycommand = new OleDbCommand(str1, con);
Line 100: mycommand.ExecuteNonQuery();
Line 101:
Line 102:</td></tr></tbody></table>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top