problem with the loop

did you try this?

$custom_query_args = array(
    'post_type' => 'casestudy',
    'connected' => $post->ID
);

$the_query = new WP_Query();
$the_query->query($custom_query_args);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)