Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 28, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Need help again!
Andrew
Posts: 29
 
Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 May 09 9:45 PM
Why when inserting new record this statment works:

Handle = DBOpenSql(strSql, false)
DBInsert Handle

...
...
DBSetValue Handle, "ModifyDate", cstr(Now)
DBPost Handle
DBClose Handle

but when updating this same record with:

strSql="Update vendor set vend_name = '" & GetPropertyOf("EdtBx1","Text") & _
........
.........
"', ModifyDate = '" & cstr(Now) & _
"' where VENDORID = '" & vend_ID & "'"

DBExecuteSQL(strSql)

does not?????

Error message: "Invalid modify request. conversion error from string "5/6/2009 9:30:20 PM""


Thanks!
Andrew
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:36 AM
Andrew, not to put too fine a point on it - you are flogging a dead horse!
There's no point practicing on this version any more - whilst it still works there's no real point and is pretty much a waste of everyone's time.

Your code doesn't work - as you've not handled the date/time conversion issue - you can't just read a date off the screem and throw it into the database. You'd need to convert it to a proper database date. In any event, the first piece of code is preferred for clarity and will always work. A direct update, such as the 2nd, will always be prone to typing errors, missing quotes, date/time conversion issues and a whole host of other things.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 8:15 AM
Try this instead:

strSql = "SELECT * FROM VENDER WHERE VENDORID = '" & vend_ID & "'"
Handle = DBOpenSql(strSql, false)
DBEdit Handle
DBSetValue Handle, "VEND_NAME", GetPropertyOf("EdtBx1","Text")
DBSetValue Handle, "ModifyDate", cstr(Now)
DBSetValue Handle, "ModifyUser", CurrentUserID
DBPost Handle
DBClose Handle
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 8:17 AM
Also, don't you need to properly format the date on the ISO format if you are building your SQL statement?
e.g. YYYYMMDD HH:mm:ss
[Reply][Quote]
Kris Halsrud
Posts: 88
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 11:51 AM
Yes, unless put into the correct format the database update might happen correctly but the data will not synchronize to remotes. (If that is a consideration). Also remeber that SalesLogix stores dates in UTC format so in a direct in-line SQL update you would need to account for that as well.
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 1:04 PM
Quote:
Originally posted by Raul A. Chavez

Try this instead:

strSql = "SELECT * FROM VENDER WHERE VENDORID = '" & vend_ID & "'"
Handle = DBOpenSql(strSql, false)
DBEdit Handle
DBSetValue Handle, "VEND_NAME", GetPropertyOf("EdtBx1","Text")
DBSetValue Handle, "ModifyDate", cstr(Now)
DBSetValue Handle, "ModifyUser", CurrentUserID
DBPost Handle
DBClose Handle


Error:
Window name: - "Saleslogix"
"General: Error on line: 26"
next:
Window name: - "Basic had an error...."
Text: "Context: Save @0: Basic Personal:save_edit", "Status: 0x1A"


Andrew
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 1:10 PM
Did you just cut and paste my sample code?

I just noticed that I miss spelled the Vendor table name, not sure what else I might have.....
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 1:50 PM
Quote:
Originally posted by Raul A. Chavez

Also, don't you need to properly format the date on the ISO format if you are building your SQL statement?
e.g. YYYYMMDD HH:mm:ss



Well.... I don't know.
I don't know how to format date....
I dont have any literature/manual/sdk in this area. You and this forum are my only source of informaiton.

Andrew
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 1:50 PM
Quote:
Originally posted by Raul A. Chavez

Also, don't you need to properly format the date on the ISO format if you are building your SQL statement?
e.g. YYYYMMDD HH:mm:ss



Well.... I don't know.
I don't know how to format date....
I dont have any literature/manual/sdk in this area. You and this forum are my only source of informaiton.

Andrew
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:03 PM
Quote:
Originally posted by Mike Spragg

Andrew, not to put too fine a point on it - you are flogging a dead horse!
There's no point practicing on this version any more - whilst it still works there's no real point and is pretty much a waste of everyone's time.

Your code doesn't work - as you've not handled the date/time conversion issue - you can't just read a date off the screem and throw it into the database. You'd need to convert it to a proper database date. In any event, the first piece of code is preferred for clarity and will always work. A direct update, such as the 2nd, will always be prone to typing errors, missing quotes, date/time conversion issues and a whole host of other things.



You right, but cstr(Now) format is ok for inserting records, why than it not for update?
Well, the biggest waste is of mine time, but since I have time, but don't have other version of Saleslogix I have to stick with 3.10

Thanks,
Andrew
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:10 PM
Quote:
Originally posted by Andrew


Well, the biggest waste is of mine time


Well, that's not quite true is it !! By not knowing the answers - you're also involving others too !!

cstr(now) works as it should for DBInsert (controlled via SLX code/parser). But, you're no longer doing that - you are "bypassing" that and hitting the DB directly and, therefore, outside of what SLX will handle for you - so, in which case, you have to get it right yourself. And you aren't, hence - it fails. You need to modify the date format (from the object) into the valid/ISO date format (which Paul showed you above).

Mike
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:12 PM
BTW - if you don't want to be bothered with this - try this instead:

sql = "select * from vendor where vendorid = 'xx'"
h = DBOpenSQL(sql, false)
h = DBSetValue x,"xx"
DBUpdate h

This, again, reverts back to SLX - and you then don't have to deal with the vagaries of dates etc.
Mike
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:19 PM
Quote:
Originally posted by Raul A. Chavez

Did you just cut and paste my sample code?

I just noticed that I miss spelled the Vendor table name, not sure what else I might have.....



Yes, I did!

It is working now!!

Thank you!
Andrew
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:24 PM
Quote:
Originally posted by Mike Spragg

BTW - if you don't want to be bothered with this - try this instead:

sql = "select * from vendor where vendorid = 'xx'"
h = DBOpenSQL(sql, false)
h = DBSetValue x,"xx"
DBUpdate h

This, again, reverts back to SLX - and you then don't have to deal with the vagaries of dates etc.
Mike


Thank you, for your help.
I'm lernin something new from every post.

Thank you,
Andrew
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 2:52 PM
You're welcome.

I did do a lot of coding with Cypress Enabled VB, but in all, I am glad we no longer have to do so.

Any reason why you are still running that version?
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 3:17 PM
I was working with Saleslogix in 1999 to 2001 as a network/database admin. Later I did not have opportunity to work with Saleslogix, but I know so it is great software. Recently, I was reviewing my cd's and I found evaluation version, which I got from our vendor, when we were thinking about upgrading Saleslogix 2. something to 3.10. I don't remember exactly, I think we decided to skip version 3.1 and we went to SLX2000 sometimes in year 2000.
Now, as I'm looking for job, I'm trying to master my programming skills and knowledge of Saleslogix, hopping I may need it sometimes in the future. Other thing, I like challenges, time is running quicker when I’m thinking about something. I have a lot of satisfaction when finally I will get it to work, what I want to work, how I want it to work. To bad I don’t have any ref. manual, SDK or something like that for Saleslogix 3.10.

Thanks,
Andrew
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 3:28 PM
Well, I do then agree that it is quite pointless for you to learn how to Program SalesLogix on Cypress Enabled VB. At this point, it would be very unlikely to find anyone still running it, although there may be some people with some legacy code needing some support.

It may be better to learn VB Script and MS SQL 2K5 / 2K8, and probably start learning ASP.Net development.
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 4:23 PM
Probably, you right, but I don't have anything to practice with.
[Reply][Quote]
Andrew
Posts: 29
 
Re: Need help again!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 09 4:23 PM
Probably, you right, but I don't have anything to practice with.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/28/2025 5:56:44 PM