The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
		
			|  | 
			
		
			|  | 
				
					| Immediate db Update  Posted: 22 May 10 10:59 AM
 |  
					| Hi all, 
 I am trying to make an update into the database as soon as a button is pressed.
 
 I am currently executing this code when a button is pressed, but nothing seems to be happening. What am i doing wrong (strContactID is populated correctly, and the field DS_REFER is present) ?
 
 dim strContactID
 dim objDSRRS, objDSRsql, objDSRDB
 set ObjDSRDB = New SLX_DB
 set objDSRRS = objDSRDB.GetNewRecordset
 strContactID = txtContactID.text
 objDSRsql = "SELECT DS_REFER FROM SYSDBA.CONTACT WHERE CONTACTID = '" & strContactID & "'"
 objDSRRS.Open objDSRsql, objDSRDB.Connection
 objDSRRS.MoveFirst
 objDSRRS.Fields("DS_REFER").Value = "T"
 objDSRRS.Update
 objDSRRS.Close
 set objDSRDB = nothing
 
 Any help you can give, will be most gratefully received.
 
 Thanks in advance.
 |  
					|  |  | 
			|  | 
				
					| Re: Immediate db Update  Posted: 23 May 10 9:59 PM
 |  
					| Run the SLXProfiler and see what is being executed. (should be in C:\Program Files\SalesLogix\SLXProfiler.exe) If it is being updated, is it a screen/form refresh issue? |  
					|  |  | 
			|  | 
				
					| Re: Immediate db Update  Posted: 24 May 10 2:09 AM
 |  
					| Yep, already ran it. I can see the select being executed, but not the update. |  
					|  |  | 
			|  | 
				
					| Re: Immediate db Update  Posted: 24 May 10 2:49 AM
 |  
					| Hi Hugh You do not need the SYSDBA prefix to your contact table.  Try removing it and seeing if the update runs then.
 good luck
 nick
 |  
					|  |  | 
			|  | 
				
					| Re: Immediate db Update  Posted: 24 May 10 2:53 AM
 |  
					| Just a thought: 
 What about trying the following:
 
 ObjDSRDB.ExecuteSQL "UPDATE CONTACT SET DS_REFER = 'T' WHERE CONTACTID = '" & strContactID & "'"
 
 
 |  
					|  |  | 
			|  | 
				
					| Re: Immediate db Update  Posted: 24 May 10 3:04 PM
 |  
					| Thanks guys. 
 I  found out today that SLX has a 'feature' where a newly created field isn't necessarily available properly for OLEDB related operations (although appears in SQL Mgt Studio/Architect normally). I have created a different field, and this is working correctly.
 
 Gratitude to MJD in the UK for this 'feature' and fix, but appreciate the help from y'all.
 
 BTW - is the site slow at times for all (with ASP errors sometimes), or is it just me? Has anyone notified Ryan?
 |  
					|  |  | 
			|  | 
				
					| Re: Immediate db Update  Posted: 24 May 10 4:56 PM
 |  
					| Really?   If the field is created in SLX Database manager (NOT in the MS SQL tools), it should be available for SLX Provider operations immediately. 
 
 |  
					|  |  | 
			|  |