Select statement to ADO control
-
hi all I Add this tool "Microsoft ADO Data Control 6.0" and connected it to my Database and i want to store the select statment in my variable like this:
dim dnsip as String dnsip = ado.RecordSource = "select ip1,ip2,ip3,ip4 from DNSTable where hostname like ('dnshostname ') "
This code does not store select statment in my variable dnsip How i can store the select statment in variable dnsip THANK'S-*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*
-
hi all I Add this tool "Microsoft ADO Data Control 6.0" and connected it to my Database and i want to store the select statment in my variable like this:
dim dnsip as String dnsip = ado.RecordSource = "select ip1,ip2,ip3,ip4 from DNSTable where hostname like ('dnshostname ') "
This code does not store select statment in my variable dnsip How i can store the select statment in variable dnsip THANK'S-*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*
I dunno how VB handles this sort of syntax, why not set dnsip first, THEN set teh RecordSource on the next line ?
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
hi all I Add this tool "Microsoft ADO Data Control 6.0" and connected it to my Database and i want to store the select statment in my variable like this:
dim dnsip as String dnsip = ado.RecordSource = "select ip1,ip2,ip3,ip4 from DNSTable where hostname like ('dnshostname ') "
This code does not store select statment in my variable dnsip How i can store the select statment in variable dnsip THANK'S-*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*
I'm not much of an expert on ado but I can see at least one thing is wrong here. You have 2 equals statements which I think is illegal. Either your first " should be between your = and ado.Recordsource if you are trying to turn that whole statement into a string or you should do this in 2 lines of code if you are trying to make 2 assignments.
-
hi all I Add this tool "Microsoft ADO Data Control 6.0" and connected it to my Database and i want to store the select statment in my variable like this:
dim dnsip as String dnsip = ado.RecordSource = "select ip1,ip2,ip3,ip4 from DNSTable where hostname like ('dnshostname ') "
This code does not store select statment in my variable dnsip How i can store the select statment in variable dnsip THANK'S-*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*
Seriously, pickup a beginners book on VB.NET and work through it. What you're doing is legal, but that statement doesn't work how you're thinking it does.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Seriously, pickup a beginners book on VB.NET and work through it. What you're doing is legal, but that statement doesn't work how you're thinking it does.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008No, he'd rather ask the same question again..... ( about 3 threads up )
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
No, he'd rather ask the same question again..... ( about 3 threads up )
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Christian Graus wrote:
No, he'd rather ask the same question again.....
:sigh: Why do we even bother...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Christian Graus wrote:
No, he'd rather ask the same question again.....
:sigh: Why do we even bother...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008For the few who listen....
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )