| Author |
Topic |
|
Da_Retina
Posting Yak Master
109 Posts |
Posted - 2002-02-10 : 03:52:00
|
| Salute..This is really wierd!..When I make a command in VB and go to the command in the data environment..right click on the command..click properties..then set the command's "source of data" a stored procedure(Provided that it has PARAMETERS) and press ok THEN use the command IT WILL NOT WORK..IT NEVER DID..UNLESSSSSSSS...I GO TO the parameters TAB in the properties of the command and GO TO EVERY PARAMETER ,DELETE THE FIRST LETTER AND REWRITE IT!!!!!!!!!!!!!!!!!!!!!!...PLEASE DONT LAUGH..CUZ I AM CRYING!!..I dont know how the hell does this happen!!!..BUT I TRIED IT ZILLION TIMES!..Please..can U advise!..oh..I forgot to tell U that if I did that..and then added a parameter for example..and refreshed..it will appear...BUT WILL NOT WORK till i go through the cycle again!!..is this a BUG?...if it was ..it bit me really HARD!..lolSalute..--------------If I am to do it,I will, and NOW .. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-10 : 07:22:13
|
| How about: DON'T USE THE IDE TO CREATE AND SET COMMAND OBJECTS. Type in all the code yourself and set the properties. Ultimately that's all the IDE does anyway; it just generates the code for you. Since it's doing it wrong right now, you're no worse off if you type it by hand. |
 |
|
|
Da_Retina
Posting Yak Master
109 Posts |
Posted - 2002-02-10 : 07:29:00
|
| Salute..But that will be ALOT of un-needed code!..I mean if I go to each command that is a stored procedure and do that HOAX POAX thing it works..that is easier than creating a command and setting its properties specially if it has too many paramters!..But I would like to know if this happened with others??..--------------If I am to do it,I will, and NOW .. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-10 : 08:03:50
|
It's not a lot of unneeded code; all of these settings HAVE to go into code anyway...look at the .BAS and .FRM files in NotePad; you'll see all of the .Command.Parameters code there. It's all there, just hidden away.Actually, in all likelihood the IDE is setting a bunch of Command object parameters that you don't need to change from the defaults. Besides, TONS of ASP coders write all of their code by hand! Once you get the hang of it...and quit yer moaning! ...you'll be cranking out code in just as much time as it takes you to do it now.Would you rather type code correctly the first time, or waste time correcting the mistakes and bugs of an IDE or wizard that screws it up???? This type of crap is what made me dump InterDev after about 6 hours of using it. Started using NotePad and EditPad and love it! |
 |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-02-10 : 08:09:52
|
un-needed code What are you talking Retina . you didnt understood what Robvolk meant. he was trying to xplain you that the IDE anyway generates the code and you are getting problems with the code generated by the IDE. so, its better you write your own. its a good idea not depending on IDE's.and if you think its not a good idea creating a command and setting it for many parameters. but keep on repeating that HOAX POAX thing. then good luck dear.quote: But that will be ALOT of un-needed code!..I mean if I go to each command that is a stored procedure and do that HOAX POAX thing it works..that is easier than creating a command and setting its properties specially if it has too many paramters!..But I would like to know if this happened with others??..
--------------------------------------------------------------Dont Tell God how big your Problem is , Tell the Problem how Big your God is |
 |
|
|
Da_Retina
Posting Yak Master
109 Posts |
Posted - 2002-02-10 : 08:32:14
|
well well well..I think U got me wrong here!....let me explain few things!..My experience with IDEs was not bad at all!...I believe that human should not reinvent the weel!!.I thought that I was doing something wrong!..and didnt blame the IDE!..I wanted to know if it happened with someone else so that I can learn!..after all..this is why SQLTEAM EXISTS,right?..come on ppl...creating a command and setting its data sourse to a stored procedure an dforgetting about CREATING the ALREADY created parameters!!..If it can be done CORRECTLY..WHY NOT?..I wasnt MOANING . I was learning!!..------------------If I am to do it,I will, and NOW .. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-10 : 08:41:56
|
| The thing is, YOU'RE not doing anything wrong, but the IDE must be screwing something up if your command doesn't work when you fill in the settings it requires. You must admit the workaround you have is pretty silly; the IDE is supposed to make things EASIER! IMHO I wouldn't bother with it and just type the code by hand.Have you tried downloading and installing the Visual Studio Service Packs? If you never applied one it's very likely this is a bug with the original version of VS. You can find them at www.microsoft.com in the Download center (gotta search for them). I'm pretty sure there's at least an SP 5. |
 |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-02-10 : 08:47:26
|
yeah you shouldnt reinvent the wheel . but you cant carry on with a rotten wheel. either you buy a new one or in your case get another better option. i have always encountered the code generated by wizards isnt efficent , i personally write my own code and would suggest you to do it.you can certainly learn . Sqlteam not only teaches you how to do tasks but also teaches you how to do it efficently .your sounds did gave the suspicion tht you were moaning quote: My experience with IDEs was not bad at all!...I believe that human should not reinvent the weel!!.I thought that I was doing something wrong!..and didnt blame the IDE!..I wanted to know if it happened with someone else so that I can learn!..after all..this is why SQLTEAM EXISTS,right?..
--------------------------------------------------------------Dont Tell God how big your Problem is , Tell the Problem how Big your God isEdited by - Nazim on 02/10/2002 09:58:52Edited by - Nazim on 02/10/2002 10:47:45Edited by - Nazim on 02/10/2002 10:50:09 |
 |
|
|
Da_Retina
Posting Yak Master
109 Posts |
Posted - 2002-02-10 : 08:55:12
|
well.....maybe I sounded like moaning..I agree!... ok..I also agree that my solution is STUPID!..but THAT what made me dig into it MORE!..I am really curious to know why it happened and how it is getting solved MY WAY!..BUT WHAT I THINK..that it has to do with the "@" sign in the parameter's name..!..it revolves around it I am sure!!..and always SALUTE to U ALL!..p.s.I have V.S. 6 professional Service Pack 5------------------If I am to do it,I will, and NOW .. |
 |
|
|
Da_Retina
Posting Yak Master
109 Posts |
Posted - 2002-02-10 : 09:09:04
|
ok..Salute..More info!..I created a command..then opened the designer.dsr and found that under the parameter's settings it only has a REALNAME property like this:realname = "@AccountId"when I did my work around and opend the .dsr file it was like this:realname = "@AccountId"username = "AccountId"THE USERNAME property didnt exist the first time!..any clue?..or should I stop posting about it?..i mean if U find that this is a VB problem NOT SQL!..but come on guys!..whom DO I have in this world of db programming BUT my fellow YAKS!.............. ------------------If I am to do it,I will, and NOW .. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-10 : 10:40:58
|
| Well, it's definitely a VB-only problem, it appears to be a flaw in the IDE or data designer. I can't really advise you on whether it can be fixed or not, you should check the Microsoft knowledge base to see if there is a fix for it, maybe even contact MS tech support.I wish I could be more sympathetic (I'm not deliberately unsympathetic), it's just that I started playing with some of these tools, and they either didn't make things easier, or actually made things worse, so I stopped using them. You have to decide for yourself if this workaround is an acceptable amount of effort.IMHO it is never a good practice to rely on the particular features, bells & whistles of an IDE, because you KNOW the next version will be totally different, and you'll have to start allllllllllllll over again learning how to use it. At least TRY the manual approach; you can always go back to the IDE if it's too much effort. |
 |
|
|
|