Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

mil_an

@mil_an
About
Posts
26
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Pass Insert SQL Statement to MS-SQL DB via BAT script
    M mil_an

    Thanks. This is what I have so far and it seems to work when run on the server where the DB is located:

    OSQL -s <<SERVER_NAME>>\<<DB_NAME>> -U <<USERNAME>> -P <<PASSWORD>> -i <<PATH_TO_SQL_COMMAND_FILE>>

    The above makes the connection to the DB and runs the SQL statements held in a text file (PATH_TO_SQL_COMMAND_FILE), which looks a little like this:

    UPDATE <<TABLE_NAME>>
    SET <<Column>> = '<<VALUE>>'
    WHERE <<PREDICTAES>>
    GO

    Now, I am facing the following issue. I am unable to run this command from a different server that does not host the DB. I get the below error: [Shared Memory]SQL Server does not exist or access denied. [Shared Memory]ConnectionOpen (Connect()). I am using the host name of the DB server including DNS for server_name. Any ideas?

    modified on Wednesday, December 10, 2008 9:15 AM

    Database database tools question announcement

  • Pass Insert SQL Statement to MS-SQL DB via BAT script
    M mil_an

    Thanks for your response Colin, much appreciated. However, it looks like SQLCMD is only available in MS-SQL 2005 onwards. I am using MS-SQL 2000 though, and I think the OSQL command is the alternative. Any experience with this? Thanks!

    Database database tools question announcement

  • Pass Insert SQL Statement to MS-SQL DB via BAT script
    M mil_an

    Hi, I am trying to pass an UPDATE / INSERT statement into an MS-SQL DB via a BAT script. Basically, I want to amend / add entries in the DB via a BAT script. 1. Can this be done? 2. If it can be done, how would I connect to the DB? What would the syntax be? Any assistance on this will be much appreciated. Thanks, M

    Database database tools question announcement

  • VBScript to split file path into 3 bits
    M mil_an

    Thanks Dave :-D

    Visual Basic help tutorial

  • VBScript to split file path into 3 bits
    M mil_an

    Hi, I am trying to write a sub-routine in a VBScript to split a file path into 3 bits. For example I want to split the following path: "C:\Program Files\MyProg\Studio\win32\bin\filt.exe" into 3 bits: 1. C:\Program Files 2. \MyProg\Studio\win32\bin 3. \filt.exe The First part will always be de-limited by 'Program Files' (or the 2nd '\'). The Second part will be delimited from the end of 'Program Files' to the last '\' in the path. The 3rd Part will be delimited from the last '\' to the end of the path. The source of the initial file path is stored in an input file, and the split path is to be stored in another text file in the following format: "C:\Program Files" ** "\MyProg\Studio\win32\bin" ** "\filt.exe" I hope this is clear, and someone will be able to assist. Any help will be much appreciated. Thanks :)

    Visual Basic help tutorial

  • Restricting field Input
    M mil_an

    Hi, Sorry, I'm quite new to ASP.NET:~ . I do not know how I can "Add a regular expression validator for your textbox control". Could you tell me how to do this? Thank you for your help.

    ASP.NET question

  • Closing internet page on click
    M mil_an

    Hi, I wanted to know how I can close an internet page by clicking on a link on that page. Is that possible to do in ASP.NET? Thanks,

    ASP.NET csharp asp-net question

  • Restricting field Input
    M mil_an

    Hi, I am trying to restrict the type of information entered into a field on a form. I only want it to accept numeric values. How can I achieve that? Thanks,

    ASP.NET question

  • RSS Aggregator
    M mil_an

    Thanks Heath :)

    C# database xml help announcement

  • RSS Aggregator
    M mil_an

    Hi, Thanks for your feedback. This section of the aggregator should initially display a blank page, and not anything else (including any other URL's). Do you know how I could go about rectifying that? Thanks once again :)

    C# database xml help announcement

  • RSS Aggregator
    M mil_an

    Hi, I'm trying to create a RSS News Aggregator, and this is part of code for it: private void Page_Load(object sender, System.EventArgs e) { // See if the news items for this feed are in the Data Cache string strFeedID = Request.QueryString["FeedID"]; int feedID = 0; if (strFeedID != null) { feedID = Int32.Parse(strFeedID); } XmlDocument feedXML = (XmlDocument) Cache["Feed" + feedID]; if (feedXML == null) { // item not found in cache, get the feed details // Connect to the Database OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Inetpub\\wwwroot\\SyndicationDemo\\RSS.mdb"); // Retrieve the SQL query results string SQL_QUERY = "SELECT URL, UpdateInterval FROM Feeds WHERE FeedID = @FeedID"; OleDbCommand myCommand = new OleDbCommand(SQL_QUERY, myConnection); OleDbParameter feedParam = new OleDbParameter("@FeedID", OleDbType.Integer, 4); feedParam.Value = feedID; myCommand.Parameters.Add(feedParam); myConnection.Open(); string feedURL = ""; int updateInterval = 0; OleDbDataReader reader = myCommand.ExecuteReader(CommandBehavior.CloseConnection); reader.Read(); try { feedURL = reader["URL"].ToString(); updateInterval = Int32.Parse(reader["UpdateInterval"].ToString()); } catch { feedURL = "default url"; updateInterval = 0; // or any other default value } myConnection.Close(); // Now that we have the feed URL, load it in into an XML document feedXML = new XmlDocument(); feedXML.Load(feedURL); Cache.Insert("Feed" + feedID, feedXML, null, DateTime.Now.AddMinutes(updateInterval), TimeSpan.Zero); } xmlNewsItems.Document = feedXML; // Add the FeedID parameter to the XSLT stylesheet XsltArgumentList xsltArgList = new XsltArgumentList(); xsltArgList.AddParam("FeedID", "", feedID); xmlNewsItems.TransformArgumentList = xsltArgList; } ____________________________________________________ I am receiving this error when I tr

    C# database xml help announcement

  • Authentication with back-end DB
    M mil_an

    Hi, I am trying to create a login page. Can someone point out to me how I may connect to a back-end Access database, and validate the entered username and password with the ones stored in the database? Thanks for any help in advance :laugh:

    C# database security help question

  • Using RSS Feeds to Display Info
    M mil_an

    Hi, I am looking for an application that uses RSS Feeds to display information on a webpage. I am NOT looking for a News Aggregator, but some code that just displays news headlines, from a RSS Feed, onto a simple webpage. I am looking for something like how the website, mentioned below, displays info from a RSS Feed: http://www.allheadlinenews.com/news/Top [^] Your help will be much appreciated, Thanks!

    ASP.NET com help announcement

  • Simple Authentication
    M mil_an

    Thanks for your help! May I ask how I may initialize the label? Thanks again...:)

    C# help design security

  • Simple Authentication
    M mil_an

    Hi, Sorry, this is the error message: System.NullReferenceException: Object reference not set to an instance of an object. Thanks,

    C# help design security

  • Simple Authentication
    M mil_an

    Hi, I am trying to create a very simple authentication form, and am receiving an error. Please help!! This is the code i have used: public class login : System.Web.UI.Page { protected System.Web.UI.WebControls.TextBox txtUsername; protected System.Web.UI.WebControls.TextBox txtPassword; protected System.Web.UI.WebControls.Label lblCorrectLogin; protected System.Web.UI.WebControls.LinkButton LinkButton1; protected System.Web.UI.WebControls.Panel pnlLogIn; protected System.Web.UI.WebControls.Label lblIsAuthenticated; private void Page_Load(object sender, System.EventArgs e) { if (! Page.IsPostBack) { if (Session["isAuthenticated"] == null) { this.lblIsAuthenticated.Text = "null"; } else { this.lblIsAuthenticated.Text = Session["isAuthenticated"].ToString(); } } } private void LinkButton1_Click(object sender, System.EventArgs e) { // Basic User Authentication, might want to replace with your own!!! if (this.txtUsername.Text == "admin" && this.txtPassword.Text == "password") { // Set the Authentication Session Value Session["isAuthenticated"] = true; // Redirect to the Home Page Response.Redirect ("hello.aspx"); } else { // Show error message informing of unmatching UserName and Password pair this.lblCorrectLogin.Text = "Authentification Error!"; } } _______________________ I receive this error: Line 31: if (Session["isAuthenticated"] == null) Line 32: { Line 33: this.lblIsAuthenticated.Text = "null"; Line 34: } Line 35: else Source File: c:\inetpub\wwwroot\authentication\members.aspx.cs Line: 33 _______________________ Thanks for your help!!

    C# help design security

  • Cannot run Application correctly
    M mil_an

    Hi, Many thanks for your advice, people. It turns out my code was fine, and the problem was being caused by ZoneLabs Firewall Security. I just needed to disable it before running the applications. Thank you for your input...

    ASP.NET help csharp visual-studio question

  • Cannot run Application correctly
    M mil_an

    Hi, I have a problem with my web application. It DOES run correctly when I view the application by choosing "View in Browser" from VS.NET. But when I run the application through Internet Explorer, the first page is displayed correctly, but I cannot navigate away from this page into any other pages. (When I click on links on the first page, it stays on the first page page instead of going to the next page) Anyone have an idea why this happens/happening? If more info. is needed, please let me know.... Your help will be much appreciated. :)

    ASP.NET help csharp visual-studio question

  • Forum Board
    M mil_an

    Hi, I have been trying to look for the source code of a Forum Board that uses MS-Access as the back-end database. Can't seem to find any that uses Access. Hopefully someone can tell me where I can find such a Forum Board. I have found many with MSDE as the back-end database, and do understand the advantages of it, but I am specifically looking for one with Access as the database. Thanks for any help...

    ASP.NET database help

  • Forum Board
    M mil_an

    Hi, I have been trying to look for the source code of a Forum Board that uses MS-Access as the back-end database. Can't seem to find any that uses Access. Hopefully someone can tell me where I can find such a Forum Board. I have found many with MSDE as the back-end database, and do understand the advantages of it, but I am specifically looking for one with Access as the database. Thanks for any help...

    C# database help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups