CODE
SimpleFacebook simpleFacebook;
simpleFacebook = SimpleFacebook.getInstance(this);
Above is the part of code. When I used above object to get user profile info, it gave Nullpointer Exception. What is my problem?
Related
I'm sure this must be an easy fix, but I haven't been able to see my error. This code worked previously. I'm currently using VS 2019. I'm receiving an error that my tableadapter is not defined.
Dim mbtAdapter As New DataSet1TableAdapters.amongthehiddenTableAdapter
Dim mbtDataTable As DataSet1.amongthehiddenDataTable = Nothing
mbtDataTable = mbtAdapter.GetDataByQuestion(question)
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'DataSet1TableAdapters.amongthehiddenTableAdapter' is not defined.
Any suggestions greatly appreciated!
dataset1.xsd image
tableadapter image
--- update 7/31/20 ---
Expanded dataset
Dataset properties
Hover - namespace message
Look for the presence of this in your Solution Explorer:
Single click it and check your properties window looks like this:
Double click it and look for something like this:
If you got to here, let me know and I'll suggest some more stuff
I'm trying to get the distriqt Adverts extension to work in my AIR app.
On every device that I try my app on, I get that Adverts.service.interstitials.isSupported returns false.
On one device, I also get these Java errors, which is probably the reason why:
Error #2044: Unhandled error:. text=Attempt to invoke virtual method 'java.lang.String com.adobe.fre.FREObject.getAsString()' on a null object reference
Error #2044: Unhandled error:. text=Attempt to invoke interface method 'boolean com.distriqt.extension.adverts.platforms.AdvertPlatform.isInterstitialsSupported()' on a null object reference
I checked and double checked that all required extension are listed in the <extensions> section in the application descriptor xml, and that they are actually included in the APK.
Here is an excerpt of the AS code:
if (Adverts.isSupported)
{
var r:int = GoogleApiAvailability.instance.isGooglePlayServicesAvailable();
if (r == ConnectionResult.SUCCESS)
{
Adverts.service.initialisePlatform(AdvertPlatform.PLATFORM_ADMOB, myAppId);
if (Adverts.service.interstitials.isSupported)
{
// etc...
}
else trace("Interstitials not supported");
What am I doing wrong, or what could I do to find out what I am doing wrong?
(Could not add the adverts tag to this question because not enough reputation)
Check what the value of your myAppId is.
That first error would indicate that it is null and the initialisePlatform() call is failing.
PropertyAccessor opa = outlookitem.PropertyAccessor;
opa.SetProperty("http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Id", "100");
var val = opa.GetProperty("http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Id");
When i try this on my own calendar (outlookitem) created in my calendar it works fine. But when i add a colleagues calendar to my Outlook at try it there i get the following exception, when calling GetProperty.
Any ideas?
An exception of type 'System.Runtime.InteropServices.COMException' occurred in *** but was not handled in user code
Additional information: The property "http://schemas.microsoft.com/mapi/string/{FFF40745-D92F-4C11-9E14-92701F001EB3}/Id" is unknown or cannot be found.
had to save the item before a accessing the property. Not it works. Thanks
This code section i am getting error any ideas ?
public IEnumerable<LOBinfo> getLobinfo()
{
// var obj = from n in lobj.LOBinfoes select n;
return lobj.LOBinfoes.Select(m=>m).ToList();
// return obj.ToList();
}
I am not even using USING keyword ?
This issue been for a while and i referred many articles in stackoverflow itself but things looking bad for me .
Thank you for your suggestions
Underlying provider failed to open means, that at some point a database could not be reached, due to wrong connection settings for example or a previous failure etc...
The code you show here is allright, except for the fact you write a useless .Select you can drop the .Select(m=>m) and just leave the .ToList there.
Further, to find out what is causing your crash post the exact error message as well as the inner exception. (and the inner exception's inner exception and so on...)
Next to that the part "lobj.LOBinfoes" is probably a repository or something? You might as well post the code of that and the code of your data access object as well.
I'm trying to use SPWeb.GetListItem() to get an item by a known URL (MSDN).
So basically I'm doing the following:
using (SPSite spSite = SPContext.Current.Site)
{
using (SPWeb spWeb = spSite.RootWeb)
{
SPListItem spListItem = spWeb.GetListItem
("/sites/testSite/Lists/testList/Folder/Subfolder");
}
}
in case you are wondering, I'm trying to get the folder "Subfolder" to do stuff with it.
The problem is that the first time I call this, I get a COMExpeption:
Cannot complete this action.
Please try
again.<nativehr>0x80004005</nativehr><nativestack></nativestack>
Description: An unhandled exception
occurred during the execution of the
current web request. Please review the
stack trace for more information about
the error and where it originated in
the code.
Exception Details:
System.Runtime.InteropServices.COMException:
Cannot complete this action.
There are some reports about the COMException happening because you need to use the full relative site URL, so instead of /Lists/testList/Folder/SubFolder, you need to use /sites/testSite/Lists/... - I'm doing just that. I also tried using the absolute URL (http://sharepoint/sites/...). The problem remains: I get the COMException when trying to get the spListItem for the first time.
When I try to run the code again after the Exception, the SPListItem is received just fine. Also all subsequent calls work - only the first one fails.
AmI doing some initializing wrong or something like that?
Perhaps try SPWeb.GetFolder() instead... but again it depends on what exactly you want to do with the Folder. Seems strange though that you're using a method used for getting list items on a Folder.
http://msdn.microsoft.com/en-us/library/ms461547.aspx
Try to instantiate the web where the list item is located - _uiserWeb.
I tryed Site.RootWeb.GetListItem(item_url) - it gave me null first time after code redeployment and was fine second time.
_item = _userWeb.GetListItem(item_url)