
danielj
Members-
Content Count
15 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout danielj
-
Rank
Newbie
-
I did wonder why it wasn't array(array(...)). Thanks for that, I got it to work using: foreach ($posts_array as $key){ echo "<li>"; echo $key->{"post_name"}; echo "</li>"; }
-
I'm having trouble looping through an array. I admit that I'm not that great with associative arrays. The print_r line in my code below prints the array that I am trying to use. It looks like it is an array of associative arrays. Here is a small part of the output. [*]Array ( [0] => WP_Post Object ( [iD] => 52711 [post_author] => 31 [post_date] => 2014-06-05 15:19:12 [post_date_gmt] => 2014-06-05 19:19:12 [post_content] => Test [post_title] => Test [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => open [post_passw
-
What I'm trying to do is use an xml DOM created in php to display on my webpage using an ajax call. I'm pretty sure this is a JavaScript problem, but it's possible there may be an issue with my php code. Part of the php code is below if needed. The reason I believe the php code is fine, is because if I go directly to the page and uncomment the saveHTML() line, it displays fine. The first code below is my ajax call. I think the call fails, because what I get is the alert error message in my code (An error has occured). I'm not sure what the issue is. Thanks for any suggestions.
-
Thanks for taking the time to help. I figured I would try a slightly different approach, but this isn't working either. I get the error: Insert Error:Procedure or function 'SubmitCheck' expects parameter '@pfName', which was not supplied. From what I can see this should work. The code is below. SqlConnection conn = new SqlConnection(GetConnectionString()); try { conn.Open(); SqlCommand cmd = new SqlCommand("SubmitCheck", conn); SqlParameter sqlCheck = new SqlParameter("@check", DbType.Int16) {Direction=Parame
-
My goal is to have users fill out three fields and click on a button that will check an sql table to see if there is a record with those three fields already in the database. I'm not 100% sure, but I think my issue is in my C# code calling the procedure. I have tested my stored procedure from sql and it works. I've tried a few things, but nothing is working. The code below is one of my attempts that isn't working. I'm not sure, but when I step through the program it doesn't appear to be calling the procedure (though I could be wrong and the problem is elsewhere). SqlConnection conn =
-
Thanks, those links helped. I got it working. I don't know if I understand it 100%, but the web server needed to be to added to the Security Logins in SQL (using the SQL management tool). The login made is domainservername$ ($ included).
-
Edit: I got it to work print and it prints what I put in the connection string.
-
The thing is, is that it works when I run the page using Visual Studios. The connection string is called when I click the submit button. The submit button calls Button1_Click which calls ExecuteInsert, which creates a SqlConnection variable. That variable calls GetConnectionString and that is where the connection string is used.
-
I'm not sure if you are asking something else, but I'm connecting to it using the connection string. I haven't setup a connection to the database anywhere else. Edit: It had initially confused me since it appeared to be using the server's name to log in. I wasn't exactly sure if that was happening, but if it is, what could be causing that?
-
I replaced the actual names. The $ is after the name though.
-
I created an asp.net webform that submits to an sql database on an sql server. The web server is Windows server 2012. The page successfully submits when I run the page using Visual Studio 2012, but when I run it on the web server (not using Visual Studios) I get the error message below when I click submit. It says login failed for user domainservername$, but the username in the connection string is user we created for the sql database. It uses Windows Authentication. I setup the web server for asp.net. I haven't done it before, so I assume the issue is there or in the connection strin