Search Results

Search found 21111 results on 845 pages for 'null pointer'.

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

  • The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

    - by Matthew Chambers
    Hello I am getting the below message on a table i am trying to create The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs Anyone know the answer to this please -- Table warrington_central.job -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS warrington_central.job ( id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT , alias_title VARCHAR(255) NOT NULL , reference_number VARCHAR(100) NOT NULL , title VARCHAR(255) NOT NULL , primary_category SMALLINT(5) UNSIGNED NOT NULL , secondary_category SMALLINT(5) UNSIGNED NOT NULL , tertiary_category SMALLINT(5) UNSIGNED NULL , address_id BIGINT(20) UNSIGNED NOT NULL , geolocation_id BIGINT(20) UNSIGNED NULL , company VARCHAR(255) NOT NULL , description VARCHAR(10000) NOT NULL , skills_required VARCHAR(10000) NOT NULL , job_type TINYINT(2) UNSIGNED NOT NULL , experience_months_required TINYINT(2) UNSIGNED NOT NULL , experience_years_required TINYINT(2) UNSIGNED NOT NULL , salary_range VARCHAR(30) NOT NULL , extra_benefits_above_salary VARCHAR(500) NOT NULL , available_from DATE NULL , available_to DATE NULL , extra_location_details VARCHAR(1000) NOT NULL , contact_email VARCHAR(100) NOT NULL , contact_phone_number VARCHAR(20) NOT NULL , contact_mobile_number VARCHAR(20) NOT NULL , terms_conditions_application VARCHAR(5000) NOT NULL , link_to_profile ENUM('0','1') NOT NULL , created_on DATETIME NOT NULL , updated_on DATETIME NOT NULL , updated_by BIGINT(20) UNSIGNED NOT NULL , add_contact_form ENUM('0','1') NOT NULL , admin_package_id TINYINT(1) UNSIGNED NOT NULL , package_start_date DATETIME NOT NULL , package_end_date DATETIME NULL , package_comment VARCHAR(500) NOT NULL , viewable_to_members_only ENUM('0','1') NOT NULL , advertise_to DATETIME NULL , show_comment ENUM('0','1') NOT NULL , hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 , visible ENUM('0','1') NOT NULL DEFAULT '0' , approved ENUM('I/* large SQL query (3.9 KB), snipped at 2,000 characters / / SQL Error (1118): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs */ SHOW WARNINGS;

    Read the article

  • Cannot pass null to server using jQuery AJAX. Value received at the server is the string "null".

    - by Tom
    I am converting a javascript/php/ajax application to use jQuery to ensure compatibility with browsers other than Firefox. I am having trouble passing true, false, and null values using jQuery's ajax function. Javascript code: $.ajax ( { url : <server_url>, dataType: 'json', type : 'POST', success : receiveAjaxMessage, data: { valueTrue : true, valueFalse : false, valueNull : null } } ); PHP code: var_dump($_POST); Server output: array(3) { ["valueTrue"]=> string(4) "true" ["valueFalse"]=> string(5) "false" ["valueNull"]=> string(4) "null" } The problem is that the null, true, and false values are being converted to strings. The Javascript AJAX code currently in use passes null, true, and false correctly but only works in Firefox. Does anyone know how to solve this problem using jQuery? Here is some working code (not using jQuery) to compare with the code not-working code given above. Javascript Code: ajaxPort.send ( <server_url>, { valueTrue : true, valueFalse : false, valueNull : null } ); PHP code: var_dump(json_decode(file_get_contents('php://input'), true)); Server output: array(3) { ["valueTrue"]=> bool(true) ["valueFalse"]=> bool(false) ["valueNull"]=> NULL } Note that the null, true, and false values are correctly received. Note also that in the second method the $_POST array is not used in the PHP code. I think this is the key to the problem, but I cannot find a way to replicate this behavior using jQuery.

    Read the article

  • "Invalid use of Null" when using Str() with a Null Recordset field, but Str(Null) works fine

    - by Mike Spross
    I'm banging my head against the wall on this one. I was looking at some old database reporting code written in VB6 and case across this line (the code is moving data from a "source" database into a reporting database): rsTarget!VehYear = Trim(Str(rsSource!VehYear)) When rsSource!VehYear is Null, the above line generates an "Invalid use of Null" run-time error. If I break on the above line and type the following in the Immediate pane: ?rsSource!VehYear It outputs Null. Fine, that makes sense. Next, I try to reproduce the error: ?Str(rsSource!VehYear) I get an "Invalid use of Null" error. However, if I type the following into the Immediate window: ?Str(Null) I don't get an error. It simply outputs Null. If I repeat the same experiment with Trim() instead of Str(), everything works fine. ?Trim(rsSource!VehYear) returns Null, as does ?Trim(Null). No run-time errors. So, my question is, how can Str(rsSource!VehYear) possibly throw an "Invalid use of Null" error when Str(Null) does not, when I know that rsSource!VehYear is equal to Null?

    Read the article

  • $_FILES is null, $_POST is not null

    - by Cory Dee
    When I am going to upload a file, my $_POST variable knows the file name, but the $_FILES variable is null. I've used this code before, so I'm really stumped. Here's what I'm using for input: <label for="importFile">Attach Resume:</label> <input type="hidden" name="MAX_FILE_SIZE" value="10000000"> <input type="file" name="importFile" id="importFile" class="validate['required']"> And for processing: $uploaddir = "E:/Sites/OPL/2008/assets/apps/newjobs/resumes/"; $uploadfile = $uploaddir . time() . '-' . urlencode(basename($_FILES['importFile']['name'])); if (!move_uploaded_file($_FILES['importFile']['tmp_name'], $uploadfile)) { echo 'Error uploading file. Error number: ' . $_FILES['importFile']['error']; var_dump($_FILES['importFile']); echo $_POST['importFile']; die(); } Which is giving me this result: Error uploading file. Error number: NULL Maintaining The OPL Website.doc Any help would be greatly appreciated.

    Read the article

  • C++ vector pointer/reference problem

    - by sub
    Please take a look at this example: #include <iostream> #include <vector> #include <string> using namespace std; class mySubContainer { public: string val; }; class myMainContainer { public: mySubContainer sub; }; void doSomethingWith( myMainContainer &container ) { container.sub.val = "I was modified"; } int main( ) { vector<myMainContainer> vec; /** * Add test data */ myMainContainer tempInst; tempInst.sub.val = "foo"; vec.push_back( tempInst ); tempInst.sub.val = "bar"; vec.push_back( tempInst ); // 1000 lines of random code here int i; int size = vec.size( ); myMainContainer current; for( i = 0; i < size; i ++ ) { cout << i << ": Value before='" << vec.at( i ).sub.val << "'" << endl; current = vec.at( i ); doSomethingWith( current ); cout << i << ": Value after='" << vec.at( i ).sub.val << "'" << endl; } system("pause");//i suck } A hell lot of code for an example, I know. Now so you don't have to spend years thinking about what this [should] do[es]: I have a class myMainContainer which has as its only member an instance of mySubContainer. mySubContainer only has a string val as member. So I create a vector and fill it with some sample data. Now, what I want to do is: Iterate through the vector and make a separate function able to modify the current myMainContainer in the vector. However, the vector remains unchanged as the output tells: 0: Value before='foo' 0: Value after='foo' 1: Value before='bar' 1: Value after='bar' What am I doing wrong? doSomethingWith has to return void, I can't let it return the modified myMainContainer and then just overwrite it in the vector, that's why I tried to pass it by reference as seen in the doSomethingWith definition above.

    Read the article

  • C++ pointer to different array

    - by begun
    Assume I have an array a and an array b. Both have the same type and size but different values. Now I create 3 or so pointers that point to different elements in a, you could say a[ 0 ], a[ 4 ] and a[ 13 ]. Now if I overwrite a with b via a=b - Where will the pointers point? Do the pointers still point to their original positions in a but the values they point to are now those of b?

    Read the article

  • C++: Copying to dereferenced pointer...

    - by bbb
    Hi. I currently have a weird problem with a program segfaulting but im not able to spot the error. I think the problem boils down to this. struct S {int a; vector<sometype> b;} S s1; // fill stuff into a and b S* s2 = new S(); *s2 = s1; Could it be that the final copying is illegal in some way? Im really confused right now... Thanks

    Read the article

  • Pointer-like behavior in Java

    - by Shmoo
    I got the following: class A{ int foo; } class B extends A{ public void bar(); } I got a instance of A and want to convert it to an instance of B without losing the reference to the variable foo. For example: A a = new A(); a.foo = 2; B b = a; <-- what I want to do. //use b b.foo = 3; //a.foo should now be 3 Thanks for any help!

    Read the article

  • MySQL "ERROR 1005 (HY000): Can't create table 'foo.#sql-12c_4' (errno: 150)"

    - by Ankur Banerjee
    Hi, I was working on creating some tables in database foo, but every time I end up with errno 150 regarding the foreign key. Firstly, here's my code for creating tables: CREATE TABLE Clients ( client_id CHAR(10) NOT NULL , client_name CHAR(50) NOT NULL , provisional_license_num CHAR(50) NOT NULL , client_address CHAR(50) NULL , client_city CHAR(50) NULL , client_county CHAR(50) NULL , client_zip CHAR(10) NULL , client_phone INT NULL , client_email CHAR(255) NULL , client_dob DATETIME NULL , test_attempts INT NULL ); CREATE TABLE Applications ( application_id CHAR(10) NOT NULL , office_id INT NOT NULL , client_id CHAR(10) NOT NULL , instructor_id CHAR(10) NOT NULL , car_id CHAR(10) NOT NULL , application_date DATETIME NULL ); CREATE TABLE Instructors ( instructor_id CHAR(10) NOT NULL , office_id INT NOT NULL , instructor_name CHAR(50) NOT NULL , instructor_address CHAR(50) NULL , instructor_city CHAR(50) NULL , instructor_county CHAR(50) NULL , instructor_zip CHAR(10) NULL , instructor_phone INT NULL , instructor_email CHAR(255) NULL , instructor_dob DATETIME NULL , lessons_given INT NULL ); CREATE TABLE Cars ( car_id CHAR(10) NOT NULL , office_id INT NOT NULL , engine_serial_num CHAR(10) NULL , registration_num CHAR(10) NULL , car_make CHAR(50) NULL , car_model CHAR(50) NULL ); CREATE TABLE Offices ( office_id INT NOT NULL , office_address CHAR(50) NULL , office_city CHAR(50) NULL , office_County CHAR(50) NULL , office_zip CHAR(10) NULL , office_phone INT NULL , office_email CHAR(255) NULL ); CREATE TABLE Lessons ( lesson_num INT NOT NULL , client_id CHAR(10) NOT NULL , date DATETIME NOT NULL , time DATETIME NOT NULL , milegage_used DECIMAL(5, 2) NULL , progress CHAR(50) NULL ); CREATE TABLE DrivingTests ( test_num INT NOT NULL , client_id CHAR(10) NOT NULL , test_date DATETIME NOT NULL , seat_num INT NOT NULL , score INT NULL , test_notes CHAR(255) NULL ); ALTER TABLE Clients ADD PRIMARY KEY (client_id); ALTER TABLE Applications ADD PRIMARY KEY (application_id); ALTER TABLE Instructors ADD PRIMARY KEY (instructor_id); ALTER TABLE Offices ADD PRIMARY KEY (office_id); ALTER TABLE Lessons ADD PRIMARY KEY (lesson_num); ALTER TABLE DrivingTests ADD PRIMARY KEY (test_num); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Offices FOREIGN KEY (office_id) REFERENCES Offices (office_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Instructors FOREIGN KEY (instructor_id) REFERENCES Instructors (instructor_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Cars FOREIGN KEY (car_id) REFERENCES Cars (car_id); ALTER TABLE Lessons ADD CONSTRAINT FK_Lessons_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); ALTER TABLE Cars ADD CONSTRAINT FK_Cars_Offices FOREIGN KEY (office_id) REFERENCES Offices (office_id); ALTER TABLE Clients ADD CONSTRAINT FK_DrivingTests_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); These are the errors that I get: mysql> ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Cars FOREIGN KEY (car_id) REFERENCES Cars (car_id); ERROR 1005 (HY000): Can't create table 'foo.#sql-12c_4' (errno: 150) I ran SHOW ENGINE INNODB STATUS which gives a more detailed error description: ------------------------ LATEST FOREIGN KEY ERROR ------------------------ 100509 20:59:49 Error in foreign key constraint of table practice9/#sql-12c_4: FOREIGN KEY (car_id) REFERENCES Cars (car_id): Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint. Note that the internal storage type of ENUM and SET changed in tables created with >= InnoDB-4.1.12, and such columns in old tables cannot be referenced by such columns in new tables. See http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html for correct foreign key definition. ------------ I searched around on StackOverflow and elsewhere online - came across a helpful blog post here with pointers on how to resolve this error - but I can't figure out what's going wrong. Any help would be appreciated!

    Read the article

  • JQuery getJSON Callback Returning Null Data

    - by user338828
    I have a getJSON call that is called back correctly, but the data variable is null. The python code posted below is executed by the getJSON call to the demandURL. Any ideas? javascript: var demandURL = "/demand/washington/"; $.getJSON(demandURL, function(data) { console.log(data); }); python: data = {"demand_count":"one"} json = simplejson.dumps(data) return HttpResponse(json, mimetype="application/json")

    Read the article

  • null value exception thrown when deserializing null value JSON.net

    - by Bharath
    Hi Friends I am trying to deserialize a hidden control field into a json object the code is as follows Dim settings As New Newtonsoft.Json.JsonSerializerSettings() settings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore Return Newtonsoft.Json.JsonConvert.DeserializeObject(Of testContract)(txtHidden.Text, settings) But I am getting the following exception. value cannot be null parameter name s: I even added the following lines but it still does not work out. Please help settings.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore settings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore settings.ObjectCreationHandling = Newtonsoft.Json.ObjectCreationHandling.Replace Thanks Bharath

    Read the article

  • What do you think about ??= operator in C#?

    - by TN
    Do you think that C# will support something like ??= operator? Instead of this: if (list == null) list = new List<int>(); It might be possible to write: list ??= new List<int>(); Now, I could use (but it seems to me not well readable): list = list ?? new List<int>();

    Read the article

  • GetHashCode on null fields?

    - by Shimmy
    How do I deal with null fields in GetHashCode function? Module Module1 Sub Main() Dim c As New Contact Dim hash = c.GetHashCode End Sub Public Class Contact : Implements IEquatable(Of Contact) Public Name As String Public Address As String Public Overloads Function Equals(ByVal other As Contact) As Boolean _ Implements System.IEquatable(Of Contact).Equals Return Name = other.Name AndAlso Address = other.Address End Function Public Overrides Function Equals(ByVal obj As Object) As Boolean If ReferenceEquals(Me, obj) Then Return True If TypeOf obj Is Contact Then Return Equals(DirectCast(obj, Contact)) Else Return False End If End Function Public Overrides Function GetHashCode() As Integer Return Name.GetHashCode Xor Address.GetHashCode End Function End Class End Module

    Read the article

  • DPAPI encryted section returns null

    - by Jay
    Hi, I am encrypting the appSettings and the connectionStrings sections in the app.config file. But when I try to read the value, its always returning null. I am not sure if I am missing something. I thought the decryption was transparent. Has anyone else had any success with reading DPAPI protected sections in the app.config file.

    Read the article

  • linq null refactoring code

    - by user276640
    i have code public List<Files> List(int? menuId) { if (menuId == null) { return _dataContext.Files.ToList(); } else { return _dataContext.Files.Where(f => f.Menu.MenuId == menuId).ToList(); } } is it possible to make it only one line like return _dataContext.Files.Where(f = f.Menu.MenuId == menuId).ToList();?

    Read the article

  • SmartGWT throws JavaScriptException: (null): null

    - by elviejo
    When using GWT 2.0.x and SmartGWT 2.2 Code as simple as: public class SmartGwtTest implements EntryPoint { public void onModuleLoad() { IButton button = new IButton("say hello"); } } will generate the exception. com.google.gwt.core.client.JavaScriptException: (null): This only happens in hosted (devmode) ant hosted I also suspect that maybe the GWT Development Plugin might have something to do with it. Have you found a similar problem? How did you solve it?

    Read the article

  • Eclipse getResourceAsStream returning null

    - by Chris
    I cannot get getResourceAsStream to find a file. I have put the file in the top level dir, target dir, etc, etc and have tried it with a "/" in front as well. Everytime it returns null. Any suggestions ? Thanks. public class T { public static final void main(String[] args) { InputStream propertiesIS = T.class.getClassLoader().getResourceAsStream("test.txt"); System.out.println("Break"); } }

    Read the article

  • How to check null objects in jQuery

    - by Prashant
    I am using jQuery, I want to check existence of an element in my page. I have done following code, but its not working? if ($("#btext" + i) != null){ //alert($("#btext" + i).text()); $("#btext" + i).text("Branch " + i); } Please tell me what will be the right code? Thanks

    Read the article

  • Elegant check for null and exit in C#

    - by aip.cd.aish
    What is an elegant way of writing this? if (lastSelection != null) { lastSelection.changeColor(); } else { MessageBox.Show("No Selection Made"); return; } changeColor() is a void function and the function that is running the above code is a void function as well.

    Read the article

  • NetBeans IDE 7.3 Knows Null

    - by Geertjan
    What's the difference between these two methods, "test1" and "test2"? public int test1(String str) {     return str.length(); } public int test2(String str) {     if (str == null) {         System.err.println("Passed null!.");         //forgotten return;     }     return str.length(); } The difference, or at least, the difference that is relevant for this blog entry, is that whoever wrote "test2" apparently thinks that the variable "str" may be null, though did not provide a null check. In NetBeans IDE 7.3, you see this hint for "test2", but no hint for "test1", since in that case we don't know anything about the developer's intention for the variable and providing a hint in that case would flood the source code with too many false positives:  Annotations are supported in understanding how a piece of code is intended to be used. If method return types use @Nullable, @NullAllowed, @CheckForNull, the value is considered to be "strongly possible to be null", as well as if the variable is tested to be null, as shown above. When using @NotNull, @NonNull, @Nonnull, the value is considered to be non-null. (The exact FQNs of the annotations are ignored, only simple names are checked.) Here are examples showing where the hints are displayed for the non-null hints (the "strongly possible to be null" hints are not shown below, though you can see one of them in the screenshot above), together with a comment showing what is shown when you hover over the hint: There isn't a "one size fits all" refactoring for these various instances relating to null checks, hence you can't do an automated refactoring across your code base via tools in NetBeans IDE, as shown yesterday for class member reordering across code bases. However, you can, instead, go to Source | Inspect and then do a scan throughout a scope (e.g., current file/package/project or combinations of these or all open projects) for class elements that the IDE identifies as potentially having a problem in this area: Thanks to Jan Lahoda, who reports that this currently also works in NetBeans IDE 7.3 dev builds for fields but that may need to be disabled since right now too many false positives are returned, for help with the info above and any misunderstandings are my own fault!

    Read the article

  • WHERE x = @x OR @x IS NULL

    - by steveh99999
    Every SQL DBA and developer should read the blog of MVP Erland Sommarskog – but particularly  his article on dynamic search conditions in T-SQL. I’ve linked above to his SQL 2005 article but his 2008 version is also a must-read. I seem to regularly come across uses of the SQL in the title above… Erland’s article explains in detail why this is inefficient, but I came across a nice example recently… A stored procedure contained the following code :- WHERE @Name is null or [Name] like @Name as a nonclustered index exists on the Name column, you might assume this would be handled efficiently by SQL Server. However, I got the following output from SET STATISTICS IO Table 'xxxxx'. Scan count 15, logical reads 47760, physical reads 9, read-ahead reads 13872, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Note the high number of logical reads… After a bit of investigation, we found that @Name could never actually be set to NULL in this particular example. ie the @x IS NULL was spurious… So, we changed the call to WHERE  [Name] like @Name Now, how much more efficient is this code ? Table 'xxxxx'. Scan count 3, logical reads 24, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0 A nice easy win in this case…… a full index scan has been replaced by a significantly more efficient index seek. I managed to recreate the same behaviour on Adventureworks – here’s a quick query to demonstrate :- USE adventureworks SET STATISTICS IO ON DECLARE @id INT = 51721 SELECT * FROM Sales.SalesOrderDetail WHERE @id IS NULL OR salesorderid = @id SELECT * FROM Sales.SalesOrderDetail WHERE salesorderid = @id Take a look at the STATISTICS IO output and compare the actual query plans used to prove the impact of  WHERE @id IS NULL. And just to follow some of Erland’s advice – here’s how you could get similar performance if it was possible that @id could actually sometimes contain NULL. DECLARE @sql NVARCHAR(4000), @parameterlist NVARCHAR(4000) DECLARE @id INT = 51721 – or change to NULL to prove query is functionally correct SET @sql = 'SELECT * FROM Sales.SalesOrderDetail WHERE 1 = 1' IF @id IS NOT NULL SET @sql = @sql + ' AND salesorderid = @id' IF @id IS NULL SET @sql = @sql + ' AND salesorderid IS NULL' SET @parameterlist = '@id INT' EXEC sp_executesql @sql, @parameterlist,@id Sometimes I think we focus too much on hardware and SQL Server configuration – when really the answer is focus on writing efficient SQL.

    Read the article

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