Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't figure out why?
Message
From
14/09/2006 02:41:15
 
 
To
14/09/2006 02:29:30
Czarina Joyce Villanueva
Innovision Systems International
Manila, Philippines
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01153598
Message ID:
01153600
Views:
24
>The C#.Net code below works:
>
>private void pckCustomer_ItemSelected(object sender, mmPickerItemSelectedEventArgs e)
>{
>   this.oOrder.GetOrdersByCustomerID("Select Orders.OrderID, Orders.OrderDate, Orders.RequiredDate, Orders.ShippedDate, Orders.ShipName, Customers.ContactName From Orders, Customers Where Orders.CustomerID = Customers.CustomerID And Orders.CustomerID Like '%"+this.pckCustomer.Text+"%'", 1 );
>}
>
>
>But if the code is put in multiple lines like below, it gives me an error:
>
>private void pckCustomer_ItemSelected(object sender, mmPickerItemSelectedEventArgs e)
>{
>    this.oOrder.GetOrdersByCustomerID("Select Orders.OrderID,
>        Orders.OrderDate, Orders.RequiredDate,
>        Orders.ShippedDate, Orders.ShipName,
>        Customers.ContactName From Orders, Customers
>        Where Orders.CustomerID = Customers.CustomerID And
>        Orders.CustomerID Like '%"+this.pckCustomer.Text+"%'", 1 );
>}
>
>What's wrong here? It seems that it does not recognize multiple lines...

Czarina,

I don't know anything about .net, but is seems a string is spanning multiple lines
Try to add a backslash before each crlf

Not sure it will help though

>
>private void pckCustomer_ItemSelected(object sender, mmPickerItemSelectedEventArgs e)
>{
>    this.oOrder.GetOrdersByCustomerID("Select Orders.OrderID, \
>        Orders.OrderDate, Orders.RequiredDate, \
>        Orders.ShippedDate, Orders.ShipName, \
>        Customers.ContactName From Orders, Customers \
>        Where Orders.CustomerID = Customers.CustomerID And \
>        Orders.CustomerID Like '%"+this.pckCustomer.Text+"%'", 1 );
>}
>
or concatenate

>
>private void pckCustomer_ItemSelected(object sender, mmPickerItemSelectedEventArgs e)
>{
>    this.oOrder.GetOrdersByCustomerID("Select Orders.OrderID, "
>        + "Orders.OrderDate, Orders.RequiredDate, "
>        + "Orders.ShippedDate, Orders.ShipName, "
>        + "Customers.ContactName From Orders, Customers "
>        + "Where Orders.CustomerID = Customers.CustomerID And "
>        + "Orders.CustomerID Like '%" 
         + this.pckCustomer.Text
         + "%'", 1 );
>}
>
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform