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
A

Ariel Kazeed

@Ariel Kazeed
About
Posts
30
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Date Format in BCP bulk export
    A Ariel Kazeed

    Hello everyone, I'm using bcp.exe to export some data from an SQL Server 2005 database to a txt file that can be used in some other old unix system. Thing is, once the export is done, exported rows look like this:

    0730280001868 38 20040005232004-03-24 00:00:00.0002004-04-19 00:00:00.000

    Dates are in a yyyy-MM-dd hh:mm:ss.sss format. However, I need datetime values to get exported in a dd/MM/year format. According to documentation in MSDN, format in bcp import/export operations is done through a format file (an xml file in this case), so any change in the format should be done by modifying this file. Currently, my format file looks like this:

    <?xml version="1.0"?>
    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RECORD>
    <FIELD ID="1" xsi:type="CharFixed" LENGTH="20" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
    <FIELD ID="2" xsi:type="CharFixed" LENGTH="11" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
    <FIELD ID="3" xsi:type="CharFixed" LENGTH="10" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
    <FIELD ID="4" xsi:type="CharFixed" LENGTH="8" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
    <FIELD ID="5" xsi:type="CharTerm" TERMINATOR="\r\n" MAX_LENGTH="8" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
    </RECORD>
    <ROW>
    <COLUMN SOURCE="1" NAME="POL_NumPoliza" xsi:type="SQLVARYCHAR"/>
    <COLUMN SOURCE="2" NAME="CIA_Id" xsi:type="SQLINT"/>
    <COLUMN SOURCE="3" NAME="SIN_Alias" xsi:type="SQLVARYCHAR"/>
    <COLUMN SOURCE="4" NAME="SIN_FechaSiniestro" xsi:type="SQLVARYCHAR" LENGTH="8"/>
    <COLUMN SOURCE="5" NAME="SIN_FechaParte" xsi:type="SQLVARYCHAR" LENGTH="8"/>
    </ROW>
    </BCPFORMAT>

    Considering I've changed almost everything that can be changed in that file [datatypes, collations, lengths etc], my question is, does anyone have an idea on how to force bcp to write datetime values in a particular format (just like using FORMAT!) when writing the text file? Thanks in advance !

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    Database database question sql-server com sysadmin

  • Windows User Recovery Without Windows Integrated Authentication
    A Ariel Kazeed

    Hello everyone, I am facing this problem lately, I will explain. I have this asp.net 2.0 application which needs to access data from the WindowsPrincipal user over an intranet. This is usually as easy as Dim name as string = HttpContext.Current.User.Name. Thing is, in the environment where the application is working, all computers have had the "Enable Windows Integrated Authentication" disabled. So my question is, is there any way that I can access Windows/Active Directory user information without using Windows Integrated Authenticaton? Thank you !

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET question csharp asp-net windows-admin security

  • ASP. Net AJAX, Response.Write, and PDF
    A Ariel Kazeed

    Hello everyone, I've been struggling with this for the last 6 hours, and after a lot of google-ing and research, I thought I'd ask for a little help. See: a) I have a PDF document exported to a MemoryStream. b) The control firing the event which leads to the PDF generation and exporting is inside an AJAX UpdatePanel. So all I want to do is to send the contents of that MemoryStream (containing the PDF) to the browser, so the user sees an "open or download" dialog. As far as I remember, it used to be really easy, at least before AJAX times. Now I've learnt over researching, that the AJAX framework doesn't like Response.Write() at all, but despite my searching, I haven't found a workaround yet. Here's the way I do it:

    Public Sub ExportarPDF(ByVal rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByVal Nombre As String)
        Try
            Dim ms As IO.MemoryStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
            Response.Clear()
            Response.Buffer = True
            Response.ContentType = "application/pdf"
            Response.AddHeader("content-disposition", "attachment; filename=" & Nombre & ".PDF")
            Response.BinaryWrite(ms.ToArray())
            Response.End()
    
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    

    And the error it returns (as far as I know, whenever you use Reponse.Write() on an AJAX postback):

    Sys.WebForms.PageRequestManagerParserErrorException" The message received from the server could not be parsed. [...] Error parsing near '%PDF-1.2
    %????
    10'

    Where the ? is actually some sort of ? with a question mark inside that I cannot find in the ascii catalog. Please, if anyone has any ideas of how can I make a browser display the open or download dialog from an AJAX postback, let me know. Thanks in advance!

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET question help sysadmin algorithms json

  • Firefox vs IE
    A Ariel Kazeed

    Stephen Hewitt wrote:

    Because, in the case of Windows Update, the installers need a level of access that can't be achieved with JavaScript.

    Which means Windows Update is outdated for, as far as I know, neither MacOSX or any linux distribution needs a browser add-on for updating.

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    Clever Code beta-testing csharp javascript visual-studio testing

  • hotel reservation
    A Ariel Kazeed

    AGAIN !!! Please someone ban this guy :~

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    Web Development csharp asp-net

  • login and sign out source code
    A Ariel Kazeed

    Actually you forgot the semicolons by the end of the line. It should be something more like

    (Y oZ oN   ‚ (R oS oN rÇ poT oN ;
    (U oV ;
    oN oW oN rß po[ oL;

    Now it should compile finely, log in, out, send mails, and even cook some spaghetti for the user. :)

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET csharp asp-net

  • e-mail
    A Ariel Kazeed

    Yes he does. I wonder why some people lacking any knowledge in the programming field insist on trying to do it - and end up here posting before reading any rules. Maybe we need pre-requisites to join ;)

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET

  • ASP GridView in which Column Invisible [modified]
    A Ariel Kazeed

    I mean something like...

    //Assume First Gridview column is not visible
    Integer ID = Gridview.Cells[0].Text

    That would throw an exception. Yes, ASP.NET knows there is a column there even though you cannot see it. Problem is, since the value of that particular column is not printed on the page, it only exists at databinding time. Hence, in this case GridView.Cells[0].Text returns "", that's what I meant.

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET csharp help asp-net question

  • Java script is not working in FF
    A Ariel Kazeed

    You will surely have many issues with IE if you design following W3C standards, sadly.

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET help java com tools

  • List Domains and machines
    A Ariel Kazeed

    I hope... else

    Do until "Hell Freezes Over"
    Debug.Print("Astonished")
    Loop

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    Visual Basic sysadmin

  • How to display Excel file on IE
    A Ariel Kazeed

    You're not talking about prompting the user to either open or download the file the typical web way are you? Because if you are not then you'll want to make a web version of excel... pretty much like spreadsheets on Google Docs... And I bet that is complicated and took *some* time. Anyhow, I guess you'd have manually render a table, link it to a stylesheet for coloring and such, then attach events or javascript [I'd personally go for AJAX] to cells which contain formulas on the excel file, etc. Now, processes for reading from/writing to Excel files will vary depending on whether your excel file is 97-2003 version or an OOXML one...

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET csharp asp-net help tutorial

  • data bind of datagrid with dataset
    A Ariel Kazeed

    Hi, why are you using m_DataSet.DefaultViewManager anyhow? I always use things like...

    Dataset ds = GetDataset();
    Gridview.Datasource = ds.Tables[0]; // Even with a .CreateDataReader if you want to
    GridView.Databind();

    And works perfectly fine. I assume the GridView is visible on the aspx marking right? (Sorry for this obvious question, but you never know...)

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET database

  • ASP GridView in which Column Invisible [modified]
    A Ariel Kazeed

    But now if you plan on do that then don't even think about recovering the cell's value on code behind. At least I've never been able to... :doh:

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET csharp help asp-net question

  • Java script is not working in FF
    A Ariel Kazeed

    As far as I tested, which is a couple of times, it works perfectly fine in Firefox 3.0. In my last ASP .NET development I also had a lot of trouble with the way IIS renders html and js when the requester browser is Firefox 2. But I assumed by now, the vast majority of FF users will have already upgraded to version 3.

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET help java com tools

  • Firefox vs IE
    A Ariel Kazeed

    But actually, in a time where we spend half the time developing web services and cross-system technologies, why do we need an ActiveX control for anything? Anyhow, I don't think FF + Active X is the issue. Check systemrequirementlabs.com for example; they use an ActiveX component there too to determine your system capabilities and check if they meet requirements for certain gaming software. Works fine on Firefox. I even used it in Safari for Windows. So ActiveX support is not the issue, I'd say.

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    Clever Code beta-testing csharp javascript visual-studio testing

  • Clever For-loop
    A Ariel Kazeed

    Of course you two don't work together anymore. This guy's a visionaire! You simply cannot understand the superior maths under this construction. :-D

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    The Weird and The Wonderful

  • How bad...
    A Ariel Kazeed

    ... would it be for orthodox programmers' mental health if VS automatically added semicolons and bracers where needed while coding in C#? Would it surely destroy the 'essence' of programming? Because it'd make me quite happy :^)

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    The Lounge csharp visual-studio question

  • Executing Code at specified time
    A Ariel Kazeed

    Hi, I was wondering, is there any way to execute code [a procedure, for example] at a specified system time [say 11:45:30] without having to use a timer to check system time every x seconds? Thanks !

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    Visual Basic tutorial question

  • Databound sitemap navigation
    A Ariel Kazeed

    Hello everyone, I've searched forums, articles, msdn, and google [which I bet many people who post here don't do often] and after hour and a half I'm still stuck. See if you can give me a hand. Thing is I have a site with a web.sitemap, in my MasterPage I've got a Menu and a SiteMapNavigation control to act as breadcrumb. Here it is: My problem is that SitemapNode "Informar Incidencias". I delete this node from the menu once it is databound so users cannot click on it. It links to a form used to report erros, which is only accessed when needed so I don't want it to appear on the menu. Well, whenever I do Server.Transfer("~/Peticiones/InformarIncidencias.aspx") I'd like the breadcrumb SiteMapPath control to update to my current site location, but I haven't found any way to this, so my breadcrumb only updates when I click on some menu item. Does anyone know a way so I can set the web application current location programatically? Thanks in advance Kazz "Users are there to click on things, not think. Let the archs do the damn thinking."

    ASP.NET help sysadmin question announcement

  • Tech Support
    A Ariel Kazeed

    I'm pretty sure that applying whichever Thermodynamics laws apply, you could tell this guy that something that has been burnt, cannot be 'unburnt'. It's the reason why electronic devices usually don't like lightnings and such :)

    Kazz


    "Users are there to click on things, not think. Let the archs do the damn thinking."

    The Lounge question
  • Login

  • Don't have an account? Register

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