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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
B

Branislav Vidovic

@Branislav Vidovic
About
Posts
20
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Unable to perform simple upload from simple HTML page
    B Branislav Vidovic

    Hello guys! I am trying to achieve a simple upload of a file and a text parameter from a html form. The html page is deployed on jboss 4.2.3.GA (but the result is the same even if you put it anywhere outside the server, etc. on your C drive). My POST request always seems to be empty. I am executing request in Firefox 4.0 browser. Here is the web page:

    Testing

    Use the form to call webservice

    	Picture:   
    	Name:   
    

    I am using HttpFox utility in Firefox to examine my request. The POST data always seems to be empty so the parameters in the servlet are also empty. If i change the enctype="multipart/form-data" to enctype="application/x-www-form-urlencoded" then i can get all parameters, but they are only strings. For name parameter this is ok, but for file i just get the file name string and that is not ok ;) I need a file. So does anyone has idea how is this accomplished? I am using jboss RESTeasy web service to read the request. But jboss resteasy webservices are just servlets in my opinion. But any way, the data does not even get into the request. So that is the main problem. The client does not even send it.

    Web Development html sysadmin testing beta-testing tools

  • A Collection is not thread-safe?
    B Branislav Vidovic

    Is this a part of method declaration or what ?

    Java question

  • Reflective constructor matching problem
    B Branislav Vidovic

    Thanks, big part of the problem is solved. Cheers

    Java java regex help tutorial question

  • Reflective constructor matching problem
    B Branislav Vidovic

    Hello guys, I have been working on dynamic construction of object by using reflection (Java 6 SE platform). I have noticed for example that there is a method:

    Class.getConstructor(Calss[])

    You pass the argument Class objects to this method and it gives you the corresponding constructor back. This works fine in most cases. But it has one problem. It dos not support autoboxing. For example if the constructor of my class takes an int parameter and and i ask the Class object for this class for the constructor like this: Class.getConstrucort(new Class[]{Integer.class}) i will get the NoSuchMethodException indicating that there is no matching constructor. If i match the constructor argument in the class definition exactly to the parameter type given to the getCosntructor() method then i will have no problem. Did anyone had any similar problems? If any one has a solution or a workaround for this, i would need an advice. Cheers

    Java java regex help tutorial question

  • Ordering rows by multiple coluimns
    B Branislav Vidovic

    Does not seem to help..

    Database algorithms help

  • Ordering rows by multiple coluimns
    B Branislav Vidovic

    Hy! Here is the situation: I am interested in ordering rows in a returned querie (full outer join querie) and I need to do the ordering for 2 columns. Now, the thing is, simple ORDER BY can't help me. If you use

    ORDER BY column1, column2

    the result is sorting querie by column1 and then column2. This does not satisfy my situation. I wolud like sorting to be in a way that sorting happens for these 2 columns at once. I would like the result to look like this if it is possible:

    column1 column2
    25.5.1984 null
    null 30.5.1985
    null 17.5.1993
    2.2.2005 null

    The columns are type short date/time. Cheers!

    Database algorithms help

  • FULL JOIN in Access 2003
    B Branislav Vidovic

    Yes I actually tried that and made it. IT is actually union of left join, right join and inner join :D

    Database database help tutorial question

  • FULL JOIN in Access 2003
    B Branislav Vidovic

    Hello everyone! I wonder is it possible to create SQL querie using FULL JOIN in Access 2003? When i try it i just get syntax error. So does anyone have an idea how to simulate full join in access? Cheers!

    Database database help tutorial question

  • Text size in WebBrowser control
    B Branislav Vidovic

    Thank you, this was helpfull! Cheers!

    C# question csharp help tutorial

  • Text size in WebBrowser control
    B Branislav Vidovic

    Hy guys! I have a question about text size in WebBrowser control in MS Visual C# 2005 Express Edition. You know when you view web pages in a browser you can alter the overal text size from the contex menu. For example when I open MSDN help in C#, from the context menu i can choose the text size. I actually found out that this operation afects also my webbrowser control. So if i choose "Larger" text size when i am viewing MSDN, my webbrowser control will also change it's text size. My question is: How can I control the text size in my webbrowser control? Is there a property or some way to do it? Thank you for your time. Cheers!

    C# question csharp help tutorial

  • Decimal field format problem
    B Branislav Vidovic

    Thank you! That was helpfull!

    Database tutorial database help question announcement

  • MDB opened indication
    B Branislav Vidovic

    Well you can improvise. Every time you check if some text file exists in the same directory as your databse. If it does not exists you create it. If it does exists that means that someone already opened the connection and you can implement code that generates warning. Just don't forget to delete this file when you close connection. As for the access client, every time you open mdb file with access or any other database managing software (this includes your connection that you create from your application) another file will be created in the same folder as your database. It will have the same name but different extension (.ldb). So you can combine this feature also with the one i described to get more detailed informatiopn. I will try to code one example here(let us say your database name is "base.mdb"):

    connection.Open();
    if(File.Exists("C:\\opened.txt") == true && File.Exists("base.ldb") == true)
    MessageBox.Show("Connection is opened by your application");
    if(File.Exists("base.ldb") == true)
    MessageBox.Show("Connection is opened by Access client");
    Else
    File.CreateText("C:\\opened.txt")

    Of course dont forget to delete the text file after closing connection:

    connection.Close();
    if(File.Exists("C:\\opened.txt") == true)
    File.Delete("C:\\opened.txt")

    Any way this is the general idea. In a text file you could write much additional information on who opened the databse, when, etc.. Cheers!

    Database csharp tutorial question

  • Decimal field format problem
    B Branislav Vidovic

    Hy! I have problem enetring data from my application to the database datable. Basicly this is the table in MS Access 2003 desgin: table name: details table fields: acountNum (Text, primary key) itemId (Integer, primary key) price(Decimal, format: 0,000) quantity(Long integer) The problem is when i use my insert method which has a line that goes like this:

    komanda.CommandText = "INSERT INTO details(acountNum, itemId, price, quantity) VALUES ('" + par1 + "', " + par2 + ", " + par3 + ", " + par4 + ")";

    I use step by stet debuging in studio and check that all the values are correct. But what happens is a problem on a third field of the table. It is formated to represent data in 0,000. That means if you enetr just 3 it wil show like 3,000 in the database. Or if you enetr 2,98 it will show as 2,980 etc.. So let us say that in above comand i pased in these values for variables that store values: par1 = "98bg", par2 = 12, par3 = 4.7 and part4 = 10. When you execute this command in step by step debuger and check the CommandText property it will look like this:

    komanda.CommandText = "INSERT INTO details(acountNum, itemId, price, quantity) VALUES ('98bg', 12, 4,700, 10)";

    We see that the command (which has its connection field already set to a opened connection prior to this) immediatly applied the format rule of price field and turned 4.7 into 4,700. Now of course when i execute the DataAdapter.Update method it will thorow an exception because now we have only 4 fields to insert values and actually 5 values ('98bg', 12, 4,700, 10). 4.7 became 4,700. Of course if i remove the format for the price field in my databse the command works perfectly. But in this situation i ned to have this format of numbers for the price. Does anyone have an idea how to over come this small problem? Cheers!

    Database tutorial database help question announcement

  • Problem inserting image into table!
    B Branislav Vidovic

    And what about the Gridview control. I know I can use it to display data from database very easy. And if the table in the database contains images will the gridview control display it automaticly as it does for the other fields?

    ASP.NET question database help

  • Problem inserting image into table!
    B Branislav Vidovic

    Hy guys, I have a question about images in SQL databses. When I am in database table viewer in Microsoft Visual Web Developer 2005 Express Edition and I am entering data into the table, how do I insert image into the image-type field? What are the pre-conditions for inserting a picture (which is on my hard drive) to image-type field in database? Thank you for your time. Cheers

    ASP.NET question database help

  • DateTime syntax help
    B Branislav Vidovic

    Hello guys.. Looks like I just need a litle help on my SQL syntax in C#.NET I have a field in my database which is DateTime type. Looks like I can't get the syntax right for comparing the value from the textBox with the field in database. Now what I have looks like: DateTime ShDate = DateTime.Parse(txtDate.Text); cmd1.CommandText = "SELECT ShipedDate FROM Details WHERE Details.ShipedDate = #ShDate#"; When I fill dataset with the adapter which has this SelectCommand it will report error in date in the syntax expresion. Now the variable ShDate has a DateTime type in C# and it stores a date from the textbox with a help of conversion and it is in a correct format(I cheked while debuging). I think the problem is somewhere here = #ShDate#. I bet I am missing some quotation marks ("") or single quote(''). So does any one have a clue? Thanks..

    Database help csharp database question

  • Missing "using" directive
    B Branislav Vidovic

    Thanks Dave, once again you were right. I am using Crystal Reports, and you were write with the using CrystalDecisions.CrystalReports.Engine; Now there is just one more thing left. It can't find class "TableLogOnInfo". Do you know where could that one be? Cheers We try !!

    Visual Studio help database graphics question

  • Missing "using" directive
    B Branislav Vidovic

    Hy, guys! I'm having a small problem here. I bet it is a trivial one, but I still can't solve it on my own. In my code I have a section which goes foreach (Table tbl in rpt.Database.Tables) { tbl.ApplyLogOnInfo(logOnInfo); } Anyway I keep geting an error message that I am missing a "using" directive and clause "Table" is underlined. Currently I have these "using" directives in my code: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; So I was wondering if anyone knows which "using" directive is necessary if you want to use the clause "Table"? Thank you for your time. Cheers!

    Visual Studio help database graphics question

  • C# Date functions
    B Branislav Vidovic

    Hi, I am hving troubles with inserting Date in my database. I have a field in my table in the databse whicih is Date/Time format. For example if I want to insert s specific date (let's say it is 19th july 2007) i need to insert 19.7.2007. Now that is not the problem. I have a string which is formated correctly. It goes as "19.7.2007". But when I insert it to database it reports error, because the dataset for that table needs a varaiable that is Date format and not a string. In visual Basic.NET i used Cdate function for converting strings in dates. What functions should I use in C#?

    C# csharp help database tutorial

  • VB.NET or C#
    B Branislav Vidovic

    Hi everyone!!! I am a student,graduate year.My interests are C# and VB programming. For now I am using C# and VB (visual studio.NET) for making applications. I am realy looking for an advice. Which programming language is better for making real comercial applciations? Is there a difference in performance of applications written in these programming languages? Soon I am expexcted to develop applications that will really be used by small and medium sized companies,so I am interested which of these languages should I go for? Or is it completely the same? I am looking forward to hear your appinions. Thank you! Cheers:)

    Visual Studio csharp visual-studio performance 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