Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Reason for the exception:The system detected an invalid pointer address in attempting to use a pointer argument in a call

My Code:
C#
String connection_string = "Server=localhost;Database=test;Uid=root;Pwd=password;";
MySqlConnection con = new MySqlConnection(connection_string);
MySqlCommand cmd=con.CreateCommand();
con.Open();            //Exception at this line


Is there any problem in connection string? I have referred from here
Posted
Updated 23-May-13 13:59pm
v3

1 solution

Try setting your project to compile in x86 instead of the AnyCPU mode.
 
Share this answer
 
Comments
Monster Maker 23-May-13 23:58pm    
You mean to say,...problem lies in this?

<PropertyGroup>
<configuration condition=" '$(Configuration)' == '' ">Debug
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<schemaversion>2.0
<ProjectGuid>{16E589FC-5AEF-4662-9B18-481707473F2D}</ProjectGuid>
<outputtype>Exe
<appdesignerfolder>Properties
<rootnamespace>RSSCrawler
<assemblyname>RSSCrawler
<targetframeworkversion>v4.0
<targetframeworkprofile>Client
<filealignment>512
<PublishUrl>publish\</PublishUrl>
<install>true
<installfrom>Disk
<updateenabled>false
<updatemode>Foreground
<updateinterval>7
<updateintervalunits>Days
<updateperiodically>false
<updaterequired>false
<MapFileExtensions>true</MapFileExtensions>
<applicationrevision>0
<applicationversion>1.0.0.%2a
<iswebbootstrapper>false
<useapplicationtrust>false
<bootstrapperenabled>true
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<debugsymbols>true
<debugtype>full
<optimize>false
<outputpath>bin\Debug\
<defineconstants>DEBUG;TRACE
<errorreport>prompt
<warninglevel>4
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<debugtype>pdbonly
<optimize>true
<outputpath>bin\Release\
<defineconstants>TRACE
<errorreport>prompt
<warninglevel>4
</PropertyGroup>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900