473,657 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

convert string to type for cmd parameter

83 New Member
hi guys got in pinch here...
Expand|Select|Wrap|Line Numbers
  1. rz.Parameters.Append rz.CreateParameter("@OldAccNo",adDecimal,adParamInput,9,OldAccNo)
  2. rz.Parameters.Append rz.CreateParameter("@NewAccNo",adChar,adParamInput,11,NewAccNo)
  3. rz.Parameters.Append rz.CreateParameter("@RewardNo",adVarChar,adParamInput,15,RewardNo)
  4. rz.Parameters.Append rz.CreateParameter("@NewICNo",adChar,adParamInput,12,NewICNo)
  5. rz.Parameters.Append rz.CreateParameter("@Amounts",adCurrency,adParamInput,,Amounts)
  6. rz.Parameters.Append rz.CreateParameter("@TransDate",adDate,adParamInput,,TransDate)
  7. rz.Parameters.Append rz.CreateParameter("@ReceiptNo",adNumeric,adParamInput,15,ReceiptNo)
  8. rz.Parameters.Append rz.CreateParameter("@POCode",adVarChar,adParamInput,5,POCode)
  9.  
I need to change all the parameter value from (current)String to selected data type...any ideas
Oct 28 '08 #1
1 2795
iam_clint
1,208 Recognized Expert Top Contributor
i'm really not sure what you are asking here?

Do you mean like
Expand|Select|Wrap|Line Numbers
  1. dim test
  2. test="1" 'this is a string obviously
  3. test=cint(test) 'this converts it to an int
  4.  
I need more detail on what you are doing and for cmd I am assuming for adodb command?
Oct 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5652
by: phancey | last post by:
I am trying to invoke a web service method dynamically. I have created a generic function that takes a method name, string of parameters and calls the web method using System.Reflection: MethodInfo mi = proxyInstance.GetType().GetMethod(methodName); object paramsArray = (object)methodParams.ToArray(typeof(object)); object result = mi.Invoke(proxyInstance, paramsArray); where methodParams is an array of parameters where the value...
6
5812
by: ORC | last post by:
I will use FieldInfo to import values from a XML file into the fields of an objects. But how to convert to the proper type like in this: public void Load(object MyClass) { foreach( FieldInfo field in MyClass.GetType().GetFields() ) { field.SetValue(MyClass, String_From_XML_Representing_The_Field_Value); }
2
10899
by: Simon Harris | last post by:
I have created a web service, which when I call in my browser presents the text form etc. When I click the button, I get this error: System.ArgumentException: Cannot convert to System.Int32. Parameter name: type ---> System.FormatException: Input string was not in a correct format. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
4
25339
by: John Cotsell | last post by:
Basically I have a class called Dog and when using the objectdatasource I can use a string parameter to pass into the selectmethod. so I pass in a string = 'Dog' now once in the selectmethod I need to convert that string into and object of type Dog...I hope this makes sense. Do anyone know how to do this???? i guess I need a similar method to Eval in javascript. Please need urgent so could replies also go to johncotsell@hotmail.com ...
3
16807
by: kaizen | last post by:
Hi, i wrote the code in C and compiled in VC++ compiler. at that time it has thrown the below mentioned error. error C2664: 'strcpy' : cannot convert parameter 2 from 'char' to 'const char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
5
3780
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public List<RoleData> GetRoles() { return GetRoles(null, false); }
2
1453
by: Nemisis | last post by:
Hi, Is it possible to pass in an object and parameter into a function and return it as a string. i.e. To make a call to the function i would put the following Dim str as String = MyTestFunction(myObject.Parameter)
7
16672
by: groups | last post by:
This is my first foray into writing a generic method and maybe I've bitten off more than I can chew. My intent is to have a generic method that accepts a value name and that value will be returned from the source. My first attempt was as follows; (please ignore that error handling is not present in this example) public T GetValue<T(string objName) { T results;
6
4256
by: Ken Fine | last post by:
This is a basic question. What is the difference between casting and using the Convert.ToXXX methods, from the standpoint of the compiler, in terms of performance, and in other ways? e.g. this.ContentID = (int)ci.Conid; vs. this.ContentID = Convert.ToInt32(ci.Conid); I tend to use the latter form because it seems more descriptive to me, but it would be good to know what's best practice. I'm guessing those methods
14
13489
by: rtillmore | last post by:
Hello, I did a quick google search and nothing that was returned is quite what I am looking for. I have a 200 character hexadecimal string that I need to convert into a 100 character string. This is what I have so far: #include <stdio.h> #include <stdlib.h> #include <string.h>
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.