Search Results

Search found 660 results on 27 pages for 'implicit'.

Page 12/27 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Returning date from Stored procedure in ASP.Net/VB.Net

    - by Mo
    Hi, I want to execute a method on VB.Net to return a date which is in the stored procedure. I tried using ExecuteScalar but it doesnt work it retruns error 'Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query' Any help would be much appreciated please? thank you below is the code Public Function GetHolidaydate(ByVal struserID as String) As DateTime Dim objArgs1 As New clsSQLStoredProcedureParams objArgs1.Add("@userID", Me.Tag) objArgs1.Add("@Date", 0, 0, ParameterDirection.Output) Return (CDate(ExecuteScalar(clsLibrary.MyStoredProcedure.GetHolidayDate, objArgs1))) End Function

    Read the article

  • mysql innodb max size of transaction

    - by chris
    Using mysql 5.1.41 and innodb I'm doing some data import, but can't use load data infile, so I'm manually issuing insert statements. I found that it's much faster to disable auto commit and issue say, 100 insert statements and then commit, instead of the implicit commit after each insert. It got me thinking, what limits are there to how much data I can put into a transaction? Is there a limit on the number of statements, or does it have to do with the size in bytes etc...?

    Read the article

  • Reverse PInvoke and create a full unmanaged C# program

    - by Fire-Dragon-DoL
    I know this is a strange question but the idea is simple: I prefer C# syntax rather than C++: -Setters and getters directly inside a property -interfaces -foreach statement -possibility to declare an implicit cast operator other small things... What I really don't know is if is possible to import a c++ dll (expecially std libraries) in C# if I don't use any namespace (even System) The idea is just to write a program using everything that you will normally use in C++ (nothing from CLR so), even printf for example Thanks for any answer

    Read the article

  • C++ copy constructor and shallow copy

    - by bartek
    Hi, suppose I have a class with many explicit (statically allocated) members and few pointers that are allocated dynamically. When I declare a copy constructor in witch I make a deep copy of manually allocated members, I wouldn't like to copy each statically allocated member explicite. How can I use implicit (default) copy constructor functionality in explicit copy constructor?

    Read the article

  • Link User32 with gcc

    - by Tim Cooper
    I have a C program which has a function call that is defined in windows.h (which I have included), however, when I try and compile it with gcc, I get the error: warning: implicit declaration of function `LockWorkStation' I looked at the MSDN documentation and I see that this function is the User32 library file, and I was wondering how I would go about linking that to my file.

    Read the article

  • Hibernate mapping to object that already exists

    - by teehoo
    I have two classes, ServiceType and ServiceRequest. Every ServiceRequest must specify what kind of ServiceType it is. All ServiceType's are predefined in the database, and ServiceRequest is created at runtime by the client. Here are my .hbm files: <hibernate-mapping> <class dynamic-insert="false" dynamic-update="false" mutable="true" name="xxx.model.entity.ServiceRequest" optimistic-lock="version" polymorphism="implicit" select-before-update="false"> <id column="USER_ID" name="id"> <generator class="native"/> </id> <property name="quantity"> <column name="quantity" not-null="true"/> </property> <many-to-one cascade="all" class="xxx.model.entity.ServiceType" column="service_type" name="serviceType" not-null="false" unique="false"/> </class> </hibernate-mapping> and <hibernate-mapping> <class dynamic-insert="false" dynamic-update="false" mutable="true" name="xxx.model.entity.ServiceType" optimistic-lock="version" polymorphism="implicit" select-before-update="false"> <id column="USER_ID" name="id"> <generator class="native"/> </id> <property name="description"> <column name="description" not-null="false"/> </property> <property name="cost"> <column name="cost" not-null="true"/> </property> <property name="enabled"> <column name="enabled" not-null="true"/> </property> </class> </hibernate-mapping> When I run this, I get com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails I think my problem is that when I create a new ServiceRequest object, ServiceType is one of its properties, and therefore when I'm saving ServiceRequest to the database, Hibernate attempts to insert the ServiceType object once again, and finds that it is already exists. If this is the case, how do I make it so that Hibernate points to the exists ServiceType instead of trying to insert it again?

    Read the article

  • Built-in precedence for Expression Trees?

    - by jdk
    I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it, maybe through helper methods or classes? I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.

    Read the article

  • how floating point numbers work in C

    - by hatorade
    Let's say I have this: float i = 1.5 in binary, this float is represented as: 0 01111111 10000000000000000000000 I broke up the binary to represent the 'signed', 'exponent' and 'fraction' chunks. What I don't understand is how this represents 1.5. The exponent is 0 once you subtract the bias (127 - 127), and the fraction part with the implicit leading one is 1.1. How does 1.1 scaled by nothing = 1.5???

    Read the article

  • Is it possible in .NET 3.5 to specify an enum type?

    - by RoboShop
    I have a enumerator which map to a bunch of int example enum MyEnum { Open = 1, Closed = 2, Exit = 4 } I find though that when I want to assign this to an integer, I have to cast it first. int myEnumNumber = **(int)** MyEnum.Open; Is it possible to specify the type of an enum so that it is implicit that there is a integer assigned to any value within the enum? That way, I do not need to keep casting it to an int if I want to use it thanks

    Read the article

  • C++ adding friend to a template class in order to typecast

    - by user1835359
    I'm currently reading "Effective C++" and there is a chapter that contains code similiar to this: template <typename T> class Num { public: Num(int n) { ... } }; template <typename T> Num<T> operator*(const Num<T>& lhs, const Num<T>& rhs) { ... } Num<int> n = 5 * Num<int>(10); The book says that this won't work (and indeed it doesn't) because you can't expect the compiler to use implicit typecasting to specialize a template. As a soluting it is suggested to use the "friend" syntax to define the function inside the class. //It works template <typename T> class Num { public: Num(int n) { ... } friend Num operator*(const Num& lhs, const Num& rhs) { ... } }; Num<int> n = 5 * Num<int>(10); And the book suggests to use this friend-declaration thing whenever I need implicit conversion to a template class type. And it all seems to make sense. But why can't I get the same example working with a common function, not an operator? template <typename T> class Num { public: Num(int n) { ... } friend void doFoo(const Num& lhs) { ... } }; doFoo(5); This time the compiler complaints that he can't find any 'doFoo' at all. And if i declare the doFoo outside the class, i get the reasonable mismatched types error. Seems like the "friend ..." part is just being ignored. So is there a problem with my understanding? What is the difference between a function and an operator in this case?

    Read the article

  • What is this conversion called?

    - by LoudNPossiblyRight
    Is there a name or a term for this type of conversion in the c++ community? Has anyone seen this conversion be referred to as "implicit conversion"? class ALPHA{}; class BETA{ public: operator ALPHA(){return alpha;} private: ALPHA alpha; }; void func(ALPHA alpha){} int main(){ BETA beta; func(beta); return 0; }

    Read the article

  • Tools to convert option strict off code into option strict on?

    - by deerchao
    I have to take over a project written in vb.net, which more than 400k lines of code written in option strict off mode. I want to build it under option strict on first before I do anything else -- which maybe converting it into C#. I found there's thousands of lines of code raises compilation error, mostly are about implicit type casts. Is there any tool would help to make it compile under option strict on mode if I don't want to correct every single line manually?

    Read the article

  • Can one create Sized Types in Scala?

    - by Jens Schauder
    Is it possible to create types like e.g. String(20) in scala? The aim would be to have compiler checks for things like: a: String(20) b: String(30) a = b; // throws a compiler exception when no implicit conversion is available b= a; // works just fine Note: It doesn't need to be/named String

    Read the article

  • Exporting DLL C++ Class , question about .def file

    - by Vhaerun
    I want to use implicit linking in my project , and nmake really wants a .def file . The problem is , that this is a class , and I don't know what to write in the exports section . Could anyone point me in the right direction ? The error message is the following : NMAKE : U1073: don't know how to make 'DLLCLASS.def' P.S: I'm trying to build using Windows CE Platform Builder .

    Read the article

  • How do i cast an object to a string when object is not a string?

    - by acidzombie24
    I have class A, B, C. They all can implicitly convert to a string public static implicit operator A(string sz_) { ... return sz; } I have code that does this object AClassWhichImplicitlyConvertsToString { ... ((KnownType)(String)AClassWhichImplicitlyConvertsToString).KnownFunc() } The problem is, AClassWhichImplicitlyConvertsToString isnt a string even though it can be typecast into one implicitly. I get a bad cast exception. How do i say its ok as long as the class has an operator to convert into a string?

    Read the article

  • Why do I need an intermediate conversion to go from struct to decimal, but not struct to int?

    - by Jesse McGrew
    I have a struct like this, with an explicit conversion to float: struct TwFix32 { public static explicit operator float(TwFix32 x) { ... } } I can convert a TwFix32 to int with a single explicit cast: (int)fix32 But to convert it to decimal, I have to use two casts: (decimal)(float)fix32 There is no implicit conversion from float to either int or decimal. Why does the compiler let me omit the intermediate cast to float when I'm going to int, but not when I'm going to decimal?

    Read the article

  • C++ superclass constructor calling rules

    - by levik
    What are the C++ rules for calling the superclass constructor from a subclass one?? For example I know in Java, you must do it as the first line of the subclass constructor (and if you don't an implicit call to a no-arg super constructor is assumed - giving you a compile error if that's missing).

    Read the article

  • I have a feeling that adding fields marked with @Transient annotation to entity is very bug-prone. A

    - by Roman
    I have some philosophical feeling that adding to an entity fields which doesn't mapped to the DB is a wrong way of solving problems. But are there any concrete situations where using @Transient fields leads to implicit and hard fixing problems? For example, is it possible that adding/removing 2nd level cache will break our app when there are @Transient fields in our entities?

    Read the article

  • How can c let a function declaration with any parameter type ?

    - by kamil çakir
    it lets this function declaration print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i gives error in this situation 44 C:\Users.. previous implicit declaration of 'print' was here (print(size,table); call in main) void print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i

    Read the article

  • How can c let a function declaration with any parameter type ?

    - by kamil çakir
    I forgot to write void parameter but it works the i put void it gives error it lets this: print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i it says"previos implicit declaration was here " (means the call in main) void print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >