Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Undefined function Getdate

Author  Topic 

BrOkEn_iCe
Starting Member

25 Posts

Posted - 2010-09-19 : 06:24:00
please i am looking for some help.....
hi all i need some help plz

We connect access as front end db to sql 2005 as back end db.
and we execute some sql statments to fetsh sql table to access table using vb6
but it gives me a message error :
"Undefined function Getdate"

the used sql code is as follows:

insert into x_trans select group_code, file_no, stamp_date AS doc_date, doc_type, value_date, doc_value from trans where group_code = 30101 and file_no = 17276 and doc_type >= 5 and doc_type <= 8 and value_date >= '2010-03-01' and value_date <= '2010-05-31'"

i use the sql statmen in sql server query and it work perfect but in vb6 don't work
i don't know what is the problem

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-09-19 : 06:51:56
Sorry but I can't see any getdate() in your code.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-19 : 07:12:18
That doesn't even look like a SQL error. Call a built-in function that doesn't exist and you don't get "Undefined function <function name>", you get
Msg 195, Level 15, State 10, Line 1
'<function name>' is not a recognized built-in function name.

Can you post the VB code? Might be something in there.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-09-19 : 07:41:37
Gail, where did you see the error message "Msg 195" ? I don't see that in OP's post.

Maybe i should go back to the store and ask for a refund on my new glasses





KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-19 : 07:59:47
It's not there, that's the point.

He said he's getting an error "Undefined function Getdate" and he posted the SQL that he thought caused it.
My point is that "Undefined function Getdate" is not the error that SQL generates when it encounters a function that doesn't exist.
Hence it's possible that the SQL is not the code causing the error, especially since there's no getdate in that piece of SQL.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-09-19 : 09:05:08
Ah i see that now. Thanks for the explanation Gail


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -