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
G

Gennady Oster

@Gennady Oster
About
Posts
85
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Looking for a term
    G Gennady Oster

    Distributed recordset ?

    My English is permanently under construction. Be patient !!

    The Lounge question lounge

  • Five Rules to Remember in Life
    G Gennady Oster

    In Russian there is the phrase like your p.2. Here is it in my translation (don't bit the pianist...): "Money doesn't create the happiness, but helps to suffer it's absence".

    My English is permanently under construction. Be patient !!

    The Lounge help

  • Sudden cast problem using executescalar
    G Gennady Oster

    Thanks, Richard. Saying truth, I've already understand where I made a mistake. I anyway want ExecuteScalar to return db error, so I simply added the test is byte for result before casting:

                Object sqlResult = ExecuteScalar(sql);
                if (!(sqlResult is byte))
                {
                    return sqlResult.ToString();
                }
    

    This is the internal module, and WHERE clause is generated programmatically, so I don't see the ability to SQL Injection. Thanks once more. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Database help database question sysadmin

  • Sudden cast problem using executescalar
    G Gennady Oster

    Hi ! Here is the snip of code in question:

    .......
    sql = "select " + picField + " from " + table + " where " + where;
    conn = new SqlConnection(connectionstring);
    byte[] picture = (byte[])ExecuteScalar(sql); // Shows error
    Image source = Image.FromStream(new MemoryStream(picture));
    Image th = source.GetThumbnailImage(w, h, null, IntPtr.Zero);
    .......
    public object ExecuteScalar(string strCommand)
    {
    object res=null;
    conn.Open();
    SqlCommand cmd = new SqlCommand(strCommand, conn);
    try
    {
    res = cmd.ExecuteScalar();
    }
    catch(Exception e)
    { res = e.Message; }
    finally
    {
    conn.Close();
    }
    return res;
    }

    It worked like a sharm some time ago. Code was not changed. The table definition also was not changed and field declaration is as follows: [Picture_Image] [image] NOT NULL But now I get error: unable to cast object of type 'system.string' to type 'system.byte ' I suppose that something may be changed in the server and/or DB settings. But what ?? Can somebody please shed a light on this issue? Thanks in advance. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Database help database question sysadmin

  • You will be on board if you answer this...
    G Gennady Oster

    The main difference is that exe runs in it's own address space as the independent process. The DLL works in the address space of the parent process, so the prolog executed during loading is different, and any entry point of the DLL cannot be called directly by OS. Only parent process can load and call DLL. That's why you need regsvr32 hosting exe to use DllRegisterServer "independent" entry point. Regards, Gennady

    My English is permanently under construction. Be patient !!

    The Weird and The Wonderful question career

  • CDC and views
    G Gennady Oster

    Hi ! I need to track changes in the MS SQL 2008 DB, where the user works with the most updated data through views. One of my tasks is to show to the user two data chunks (before month and current) with highlighted changes. CDC evidently works on the table basis. So my question: are there any tools/tutorials/walkthoughs that may help me recreate the view record and syncronize LSNs for different tables. In other words - represent the view record for certain point in time. Thanks in advance. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Database database tools help question

  • Registering global HttpModule
    G Gennady Oster

    Hi ! Thanks for your response and sorry for delay - I had no access to the internet. Yes, this is one of methodes that I thought about. Another is - place the short web.config to the root of web site. I'm not sure that any one of these methodes is right, so I wanted to get the "authoritive" answer. I'm new in this field, so when my first HttpModule will fail to work, I'd like to exclude the registration mistakes. At least. Regards, Gennady

    My English is permanently under construction. Be patient !!

    ASP.NET question

  • Registering global HttpModule
    G Gennady Oster

    Hi ! I need to create the HttpModule that will work not for specific application, but rather for the whole site, like ISAPI filter defined on the Web Site level. How I can register it without application, and hence without web.config? Seems to be simple question, but I burned away enough time looking for the answer in the internet (including CP site) with no luck. All examples end up in application and it's web.config. May be it is evident, and I simply too dumb to see it? Thanks in advance. Regards, Gennady

    My English is permanently under construction. Be patient !!

    ASP.NET question

  • Error 53 (HRESULT 0x80070002) calling DLL from DLL
    G Gennady Oster

    Hi ! Finally the problem solved. Thanks to Ben Peterson and his A .NET assembly viewer[^] !! Among Referenced Assemblies I've found the ADODB assembly, that is absent on the third machine. Now all works as expected. Thanks to everyone who tried to help me. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Visual Basic help csharp css com

  • Error 53 (HRESULT 0x80070002) calling DLL from DLL
    G Gennady Oster

    I've checked it. Versions 2.0,3.0 and 3.5 are installed on all three machines. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Visual Basic help csharp css com

  • Error 53 (HRESULT 0x80070002) calling DLL from DLL
    G Gennady Oster

    Good point. I'll check it tomorrow morning (it's 20:45 now). I suppose that 3.5 on the target computer is installed, but it's worth to check. Thanks. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Visual Basic help csharp css com

  • Error 53 (HRESULT 0x80070002) calling DLL from DLL
    G Gennady Oster

    All DLLs and .exe are in the same folder. Thanks. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Visual Basic help csharp css com

  • Error 53 (HRESULT 0x80070002) calling DLL from DLL
    G Gennady Oster

    Hi ! I have two DLLs (VB.NET converted from VB6 COM). First of them is instantiated in the test windows executable. Then the method of this DLL is called, that in turn has to instantiate the second DLL and to call it's method. On two computers it works, on the third - fails with error in subject on instantiating second assembly. The only difference between these computers is the VS2008. On the first two it is installed, on the third - not. I've tried all that I could find in the Internet and that looks more or less close to my problem. With no luck. Can somebody please help me to solve this problem and to understand - why this happens. The issue is very urgent. Thanks in advance. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Visual Basic help csharp css com

  • Browser Issues with Websites
    G Gennady Oster

    Idea is not so bad. But don't think that loading foreign engines is a good solution. As somebody already noted here, you'll bring to your new product the old sores. May be it has sense to create a kind of "syntactically oriented interpreter". With changable rules table. So this browser will use different rules tables for different browser models. From my experience, it's not a simple task though. Regards, Gennady

    My English is permanently under construction. Be patient !!

    The Lounge tutorial question

  • An ethical question...
    G Gennady Oster

    Actually your question may be shorten to: "Do you agree with the well known (at least in Russian) colloquialism: 'Money doesn't smell'?". My answer is - no. Regards, Gennady

    My English is permanently under construction. Be patient !!

    The Lounge question com help tutorial

  • Popup window problem
    G Gennady Oster

    Hi, Dominic ! Thanks. We solved the problem with the help of MS support. Using the debugdiag tool DebugDiag[^] we've found that one of asp pages loaded into the hidden frame (for debug purposes) filled out all available worker threads, executing the same one-time function more and more. This happened, as far as I could understand, after updating the SQL client on the server. Didn't understand the whole story yet. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Web Development help csharp html asp-net sysadmin

  • Popup window problem
    G Gennady Oster

    I'd like to add the results of two additional tests: 1. Use the pure html page with .asp extension 2. The same page is loaded not in popup window, but instead of current page: document.location = "test.asp"; In both cases the result is the same - blank window with busy cursor. Regards, Gennady

    My English is permanently under construction. Be patient !!

    Web Development help csharp html asp-net sysadmin

  • Re: Difference between windows and web applications
    G Gennady Oster

    BTW, you may do it programmatically too. Say, in the Page_Load of the first page you may set the session variable session("FirstPage") = 1 and in the Page_Load of the second page you may check this variable: if (session("FirstPage")==1) { // You're on the right way } else { // Accessing directly to second page } This is in the case when you use Server.Transfer, that preserves session. Response.Redirect - doesn't. Regards, Gennady

    My English is permanently under construction. Be patient !!

    modified on Tuesday, November 18, 2008 2:53 AM

    ASP.NET csharp asp-net question

  • Popup window problem
    G Gennady Oster

    Sorry, you may beat me, but I cannot understand what one thing and two declarations you're talking about. May be, it's because of my English, that is permanently under construction. Thanks anyway. Regards, Gennady

    Web Development help csharp html asp-net sysadmin

  • Popup window problem
    G Gennady Oster

    Where you get this idea that I didn't use window.open ? That was the first try. Simply in the question I tried to give the full picture of my "experiments and research". And additional question especially to you: did you read my message up to the end? :)

    Web Development help csharp html asp-net sysadmin
  • Login

  • Don't have an account? Register

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